31,7 → 31,7 |
*/ |
|
/** @file |
* |
* INET6 family common definitions. |
*/ |
|
#ifndef __NET_IN6_H__ |
42,21 → 42,48 |
#include "ip_protocols.h" |
#include "inet.h" |
|
/** INET6 string address maximum length. |
*/ |
#define INET6_ADDRSTRLEN ( 8 * 4 + 7 + 1 ) |
|
/** Type definition of the INET6 address. |
* @see in6_addr |
*/ |
typedef struct in6_addr in6_addr_t; |
|
/** Type definition of the INET6 socket address. |
* @see sockaddr_in6 |
*/ |
typedef struct sockaddr_in6 sockaddr_in6_t; |
|
/** INET6 address. |
*/ |
struct in6_addr{ |
unsigned char s6_addr[ 16 ]; // IPv6 address |
/** 16 byte IPv6 address. |
*/ |
unsigned char s6_addr[ 16 ]; |
}; |
|
/** INET6 socket address. |
* @see sockaddr |
*/ |
struct sockaddr_in6{ |
uint16_t sin6_family; // address family, AF_INET6 |
uint16_t sin6_port; // port number, Network Byte Order |
uint32_t sin6_flowinfo; // IPv6 flow information |
struct in6_addr sin6_addr; // IPv6 address |
uint32_t sin6_scope_id; // Scope ID |
/** Address family. |
* Should be AF_INET6. |
*/ |
uint16_t sin6_family; |
/** Port number. |
*/ |
uint16_t sin6_port; |
/** IPv6 flow information. |
*/ |
uint32_t sin6_flowinfo; |
/** IPv6 address. |
*/ |
struct in6_addr sin6_addr; |
/** Scope identifier. |
*/ |
uint32_t sin6_scope_id; |
}; |
|
#endif |