mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-31 13:00:49 +00:00
Add SD query and response to mDNS
This commit is contained in:
1 parent
af7eaaa9b1
commit
66eac28c20
10 files changed
+444
-93
No files matched your search
@@ -8,7 +8,8 @@ char s_theone[] = "Server.local";
|
||||
static void mdns_ev_handler(struct mg_connection *c, int ev, void *ev_data) {
|
||||
if (ev == MG_EV_MDNS_RESP) { // is this the one ?
|
||||
struct mg_mdns_resp *resp = (struct mg_mdns_resp *) ev_data;
|
||||
if (mg_strcasecmp(mg_str(s_theone), resp->name) == 0)
|
||||
if (resp->rr->atype == MG_DNS_RTYPE_A &&
|
||||
mg_strcasecmp(mg_str(s_theone), resp->name) == 0)
|
||||
MG_INFO(("%.*s is: %M", resp->name.len, resp->name.buf, mg_print_ip, &resp->addr));
|
||||
}
|
||||
(void) c;
|
||||
|
||||
Reference in new issue
Block a user