mirror of
https://github.com/espressif/esp-lwip.git
synced 2026-06-05 21:04:45 +00:00
sockets: Make IPv6 only netconn type IPv6 aware
This commit is contained in:
committed by
David Čermák
parent
3ec12c3be0
commit
c816f0ee5c
+1
-1
@@ -184,7 +184,7 @@ static void sockaddr_to_ipaddr_port(const struct sockaddr *sockaddr, ip_addr_t *
|
||||
IP6ADDR_PORT_TO_SOCKADDR((struct sockaddr_in6*)(void*)(sockaddr), ip_2_ip6(ipaddr), port)
|
||||
#define SOCKADDR_TO_IPADDR_PORT(sockaddr, ipaddr, port) \
|
||||
SOCKADDR6_TO_IP6ADDR_PORT((const struct sockaddr_in6*)(const void*)(sockaddr), ipaddr, port)
|
||||
#define DOMAIN_TO_NETCONN_TYPE(domain, netconn_type) (netconn_type)
|
||||
#define DOMAIN_TO_NETCONN_TYPE(domain, type) ((enum netconn_type)((type) | NETCONN_TYPE_IPV6))
|
||||
#else /*-> LWIP_IPV4: LWIP_IPV4 && LWIP_IPV6 */
|
||||
#define IS_SOCK_ADDR_LEN_VALID(namelen) ((namelen) == sizeof(struct sockaddr_in))
|
||||
#define IS_SOCK_ADDR_TYPE_VALID(name) ((name)->sa_family == AF_INET)
|
||||
|
||||
Reference in New Issue
Block a user