-
Une structure compatible par famille.
- Exemple : Famille PF_UNIX :
Fichier d'inclusion <sys/un.h>
struct sockaddr_un {
uint16_t sun_family;
uint8_t sun_path[UNIX_PATH_MAX];
};
- Exemple : Famille PF_INET :
Fichier d'inclusion <netinet/in.h>
struct in_addr { uint32_t s_addr; };
struct sockaddr_in {
uint16_t sin_family;
uint16_t sin_port;
struct in_addr sin_addr;
uint8_t sin_zero[8];
};
- Exemple : Famille PF_INET6 :
Fichier d'inclusion <netinet/in.h>
struct in6_addr {
union {
uint8_t u6_addr8[16];
uint16_t u6_addr16[8];
uint32_t u6_addr32[4];
} in6_u;
#define s6_addr in6_u.u6_addr8
#define s6_addr16 in6_u.u6_addr16
#define s6_addr32 in6_u.u6_addr32
};
struct sockaddr_in6 {
uint16_t sin6_family;
uint16_t sin6_port;
uint32_t sin6_flowinfo;
struct in6_addr sin6_addr;
uint32_t sin6_scope_id;};