Data Fields
sockaddr_in Struct Reference

IPv4 socket address. More...

#include <in.h>

Data Fields

sa_family_t sin_family
 Socket address family (part of struct sockaddr) More...
uint16_t sin_flags
 Flags (part of struct sockaddr_tcpip) More...
uint16_t sin_port
 TCP/IP port (part of struct sockaddr_tcpip) More...
uint16_t sin_scope_id
 Scope ID (part of struct sockaddr_tcpip) More...
struct in_addr sin_addr
 IPv4 address. More...
char pad [sizeof(struct sockaddr) -(sizeof(sa_family_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(struct in_addr))]
 Padding. More...

Detailed Description

IPv4 socket address.

Definition at line 82 of file in.h.

Field Documentation

◆ sin_family

sa_family_t sockaddr_in::sin_family

Socket address family (part of struct sockaddr)

Always set to AF_INET for IPv4 addresses

Definition at line 87 of file in.h.

Referenced by dns_xfer_deliver(), pxe_udp_deliver(), slam_open(), start_dhcp(), and start_pxebs().

◆ sin_flags

uint16_t sockaddr_in::sin_flags

Flags (part of struct sockaddr_tcpip)

Definition at line 89 of file in.h.

◆ sin_port

uint16_t sockaddr_in::sin_port

◆ sin_scope_id

uint16_t sockaddr_in::sin_scope_id

Scope ID (part of struct sockaddr_tcpip)

For multicast addresses, this is the network device index.

Definition at line 96 of file in.h.

Referenced by ipv4_netdev(), and ipv4_tx().

◆ sin_addr

struct in_addr sockaddr_in::sin_addr

◆ pad

char sockaddr_in::pad[sizeof(struct sockaddr) -(sizeof(sa_family_t)+ sizeof(uint16_t)+ sizeof(uint16_t)+ sizeof(uint16_t)+ sizeof(struct in_addr))]


This ensures that a struct sockaddr_in is large enough to hold a socket address for any TCP/IP address family.

Definition at line 109 of file in.h.

The documentation for this struct was generated from the following file: