mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-06 15:51:25 +00:00
Add IPv6 client test
This commit is contained in:
1 parent
fbab767b9f
commit
2e87783246
13 files changed
+515
-244
No files matched your search
@@ -3,13 +3,17 @@
|
||||
#include "net.h"
|
||||
#include "str.h"
|
||||
|
||||
// Mongoose sends DNS queries that contain only one question:
|
||||
// either A (IPv4) or AAAA (IPv6) address lookup.
|
||||
// Therefore, we expect zero or one answer.
|
||||
// If `resolved` is true, then `addr` contains resolved IPv4 or IPV6 address.
|
||||
struct mg_dns_message {
|
||||
uint16_t txnid; // Transaction ID
|
||||
bool resolved; // Resolve successful, ipaddr is set
|
||||
uint32_t ipaddr; // Resolved IPv4 address
|
||||
char name[256]; // Host name
|
||||
uint16_t txnid; // Transaction ID
|
||||
bool resolved; // Resolve successful, addr is set
|
||||
struct mg_addr addr; // Resolved address
|
||||
char name[256]; // Host name
|
||||
};
|
||||
|
||||
void mg_resolve(struct mg_mgr *, struct mg_connection *, struct mg_str *, int);
|
||||
void mg_resolve_cancel(struct mg_mgr *, struct mg_connection *);
|
||||
void mg_resolve(struct mg_connection *, struct mg_str *, int);
|
||||
void mg_resolve_cancel(struct mg_connection *);
|
||||
bool mg_dns_parse(const uint8_t *buf, size_t len, struct mg_dns_message *);
|
||||
Reference in new issue
Block a user