sockaddr_in(3type)

NAME
sockaddr_in, in_addr, in_addr_t, in_port_t - IPv4 socket address

LIBRARY
Standard C library (libc)

SYNOPSIS
    #include <netinet/in.h>

struct sockaddr_in {
    sa_family_t     sin_family;     /* AF_INET */
    in_port_t       sin_port;       /* Port number */
    struct in_addr  sin_addr;       /* IPv4 address */
};

struct in_addr {
    in_addr_t s_addr;
};

typedef uint32_t in_addr_t;
typedef uint16_t in_port_t;

DESCRIPTION

sockaddr_in
    Describes an IPv4 Internet domain socket address.

    .sin_port and .sin_addr are stored in network byte order.

STANDARDS
POSIX.1-2024.

HISTORY
POSIX.1-2001.

SEE ALSO
sockaddr(3type), sockaddr_in6(3type)