diff options
| author | yangwei <[email protected]> | 2023-08-30 14:12:00 +0800 |
|---|---|---|
| committer | yangwei <[email protected]> | 2023-08-30 14:12:00 +0800 |
| commit | d2d1106ab0637217462bc3cca3041bbfdf9709cf (patch) | |
| tree | 2af093e0a246e2f4d81573223acb7e4047f25b63 | |
| parent | f74d035b9ecc745bd73db9cfd18cba8711e6d5f2 (diff) | |
🐞 fix(IPV6_ADDR_LEN): redefine ipv6 addr len to IPV6_ADDR_LEN
| -rw-r--r-- | include/stellar/session.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/stellar/session.h b/include/stellar/session.h index e1ec40b..0f5e15c 100644 --- a/include/stellar/session.h +++ b/include/stellar/session.h @@ -65,10 +65,13 @@ struct session_addr_ipv4{ }; #include <netinet/in.h> +#ifndef IPV6_ADDR_LEN +#define IPV6_ADDR_LEN (sizeof(struct in6_addr)) +#endif struct session_addr_ipv6 { - uint8_t saddr[INET6_ADDRSTRLEN] ; - uint8_t daddr[INET6_ADDRSTRLEN] ; + uint8_t saddr[IPV6_ADDR_LEN] ; + uint8_t daddr[IPV6_ADDR_LEN] ; uint16_t sport; /* network order */ uint16_t dport; /* network order */ }; |
