mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-24 20:21:49 +00:00
Obtain IP adress for MDNS automatically
This commit is contained in:
1 parent
44ef3b43d2
commit
0c794f19d2
8 files changed
+193
-85
No files matched your search
+8
-9
@@ -2950,12 +2950,11 @@ size_t mg_mqtt_next_prop(struct mg_mqtt_message *, struct mg_mqtt_prop *,
|
||||
|
||||
|
||||
|
||||
#define MG_DNS_RTYPE_A 1
|
||||
#define MG_DNS_RTYPE_PTR 12
|
||||
#define MG_DNS_RTYPE_TXT 16
|
||||
#define MG_DNS_RTYPE_AAAA 28
|
||||
#define MG_DNS_RTYPE_SRV 33
|
||||
|
||||
#define MG_DNS_RTYPE_A 1
|
||||
#define MG_DNS_RTYPE_PTR 12
|
||||
#define MG_DNS_RTYPE_TXT 16
|
||||
#define MG_DNS_RTYPE_AAAA 28
|
||||
#define MG_DNS_RTYPE_SRV 33
|
||||
|
||||
// Mongoose sends DNS queries that contain only one question:
|
||||
// either A (IPv4) or AAAA (IPv6) address lookup.
|
||||
@@ -2998,7 +2997,7 @@ struct mg_mdns_req {
|
||||
struct mg_dnssd_record *r;
|
||||
struct mg_str reqname; // requested name in RR
|
||||
struct mg_str respname; // actual name to use in response
|
||||
struct mg_addr addr;
|
||||
struct mg_addr *addr; // actual address to use in response
|
||||
bool is_listing;
|
||||
bool is_resp;
|
||||
bool is_unicast;
|
||||
@@ -3006,10 +3005,10 @@ struct mg_mdns_req {
|
||||
|
||||
struct mg_mdns_resp {
|
||||
struct mg_dns_rr *rr;
|
||||
// TODO(scaprile )struct mg_str srvcproto; struct mg_str txt; uint16_t port; ?
|
||||
// TODO(scaprile )struct mg_str srvcproto; struct mg_str txt; uint16_t port; ?
|
||||
struct mg_str name;
|
||||
struct mg_addr addr;
|
||||
// TODO(scaprile); bool has_A; bool has_PTR; bool has_SRV; bool has_TXT; ?
|
||||
// TODO(scaprile); bool has_A; bool has_PTR; bool has_SRV; bool has_TXT; ?
|
||||
};
|
||||
|
||||
void mg_resolve(struct mg_connection *, const char *url);
|
||||
|
||||
Reference in new issue
Block a user