Add IPv6-related header definitions
This commit is contained in:
@@ -64,6 +64,27 @@ struct ip_mreq
|
||||
struct in_addr imr_interface;
|
||||
};
|
||||
|
||||
/*
|
||||
* IPv6 is not supportedn, but some programs need these declarations
|
||||
* nevertheless; these declarations are based on
|
||||
* http://www.opengroup.org/onlinepubs/000095399/basedefs/netinet/in.h.html
|
||||
*/
|
||||
struct in6_addr
|
||||
{
|
||||
uint8_t s6_addr[16];
|
||||
};
|
||||
|
||||
struct sockaddr_in6
|
||||
{
|
||||
sa_family_t sin6_family;
|
||||
in_port_t sin6_port;
|
||||
uint32_t sin6_flowinfo;
|
||||
struct in6_addr sin6_addr;
|
||||
uint32_t sin6_scope_id;
|
||||
};
|
||||
|
||||
#define INET6_ADDRSTRLEN 46
|
||||
|
||||
/* Definitions that are not part of the Open Group Base Specifications */
|
||||
#define IN_CLASSA(i) (((uint32_t)(i) & 0x80000000) == 0)
|
||||
#define IN_CLASSA_NET 0xff000000
|
||||
|
||||
Reference in New Issue
Block a user