in_addr3type
Socket address
Part of sockaddr(3type).
Usage
#include <sys/socket.h>
struct sockaddr { sa_family_t sa_family; /* Address family */ char sa_data[]; /* Socket address */ };
struct sockaddr_storage { sa_family_t ss_family; /* Address family */ };
typedef /* ... */ socklen_t; typedef /* ... */ sa_family_t;
Library
Standard C library (libc)
Overview
- sockaddr
-
Describes a socket address.
- sockaddr_storage
-
A structure at least as large as any other sockaddr_* address structures. It's aligned so that a pointer to it can be cast as a pointer to other sockaddr_* structures and used to access its fields.
- socklen_t
-
Describes the length of a socket address. This is an integer type of at least 32 bits.
- sa_family_t
-
Describes a socket's protocol family. This is an unsigned integer type.
Internet domain sockets
See sockaddr_in(3type) and sockaddr_in6(3type).
UNIX domain sockets
See sockaddr_un(3type).
Notes
socklen_t is also defined in <netdb.h>.
sa_family_t is also defined in <netinet/in.h> and <sys/un.h>.
Releases
3 releases since Debian 12 (Bookworm); the text changed 2 times.