diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-05-25 01:21:50 +0800 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-05-25 15:39:59 +0800 |
commit | 66e7106d393368b2dd0d04c08f31781ed997380b (patch) | |
tree | 7880587c0e938f181261d580798d61c501409270 /openbsc/include | |
parent | ccd2312d10e14747e8a4d26d8f72b052ffcfc282 (diff) |
sgsn: Integrate c-ares with the osmocom event loop
c-ares is an asynchronous DNS resolver and we need it to
resolve the GGSN address. This is integrating the library
into our infrastructure. We will create and maintain a list
of registered FDs (c-ares is currently only using one of
them) and (re-)schedule the timer after events occurred.
Diffstat (limited to 'openbsc/include')
-rw-r--r-- | openbsc/include/openbsc/sgsn.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/sgsn.h b/openbsc/include/openbsc/sgsn.h index 0f9a59f25..8e4d532bf 100644 --- a/openbsc/include/openbsc/sgsn.h +++ b/openbsc/include/openbsc/sgsn.h @@ -7,6 +7,8 @@ #include <osmocom/gprs/gprs_ns.h> #include <openbsc/gprs_sgsn.h> +#include <ares.h> + struct gprs_gsup_client; enum sgsn_auth_policy { @@ -58,6 +60,11 @@ struct sgsn_instance { struct gprs_gsup_client *gsup_client; /* LLME inactivity timer */ struct osmo_timer_list llme_timer; + + /* c-ares event loop integration */ + struct osmo_timer_list ares_timer; + struct llist_head ares_fds; + ares_channel ares_channel; }; extern struct sgsn_instance *sgsn; @@ -99,4 +106,11 @@ int sndcp_llunitdata_ind(struct msgb *msg, struct gprs_llc_lle *lle, */ int sgsn_cdr_init(struct sgsn_instance *sgsn); + +/* + * C-ARES related functionality + */ +int sgsn_ares_init(struct sgsn_instance *sgsn); +int sgsn_ares_query(struct sgsn_instance *sgsm, const char *name, ares_host_callback cb, void *data); + #endif |