D-GSM 2/n: implement mDNS method of mslookup server
Implement the mslookup server's mDNS responder, to actually service remote
mslookup requests:
- VTY mslookup/server config with service names,
- the mslookup_mdns_server listening for mslookup requests,
For a detailed overview of the D-GSM and mslookup related files, please see the
elaborate comment at the top of mslookup.c (already added in an earlier patch).
Change-Id: I5cae6459090588b4dd292be90a5e8903432669d2
diff --git a/include/osmocom/hlr/hlr.h b/include/osmocom/hlr/hlr.h
index 5a10856..e24eaf7 100644
--- a/include/osmocom/hlr/hlr.h
+++ b/include/osmocom/hlr/hlr.h
@@ -26,6 +26,7 @@
#include <osmocom/core/linuxlist.h>
#include <osmocom/gsm/ipa.h>
#include <osmocom/core/tdef.h>
+#include <osmocom/core/sockaddr_str.h>
#define HLR_DEFAULT_DB_FILE_PATH "hlr.db"
@@ -70,9 +71,20 @@
unsigned int subscr_create_on_demand_rand_msisdn_len;
struct {
+ bool allow_startup;
struct {
+ /* Whether the mslookup server should be active in general (all lookup methods) */
+ bool enable;
uint32_t local_attach_max_age;
struct llist_head local_site_services;
+ struct {
+ /* Whether the mDNS method of the mslookup server should be active. */
+ bool enable;
+ /* The mDNS bind address and domain suffix as set by the VTY, not necessarily in use. */
+ struct osmo_sockaddr_str bind_addr;
+ char *domain_suffix;
+ struct osmo_mslookup_server_mdns *running;
+ } mdns;
} server;
} mslookup;
};