mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-24 11:54:49 +00:00
align mg_addr to 32- and 64-bits
This commit is contained in:
1 parent
df994df611
commit
cc069e7e5d
5 files changed
+27
-29
No files matched your search
@@ -14,7 +14,11 @@ struct mg_dns {
|
||||
};
|
||||
|
||||
struct mg_addr {
|
||||
uint8_t ip[16]; // Holds IPv4 or IPv6 address, in network byte order
|
||||
union { // Holds IPv4 or IPv6 address, in network byte order
|
||||
uint8_t ip[16];
|
||||
uint32_t ip4;
|
||||
uint64_t ip6[2];
|
||||
};
|
||||
uint16_t port; // TCP or UDP port in network byte order
|
||||
uint8_t scope_id; // IPv6 scope ID
|
||||
bool is_ip6; // True when address is IPv6 address
|
||||
|
||||
Reference in new issue
Block a user