KallistiOS  2.0.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Data Fields
sockaddr_in Struct Reference

Structure used to store an IPv4 address for a socket. More...

#include <netinet/in.h>

Data Fields

sa_family_t sin_family
 Family for the socket. Must be AF_INET.
in_port_t sin_port
 Port for the socket. Must be in network byte order.
struct in_addr sin_addr
 Address for the socket. Must be in network byte order.
unsigned char sin_zero [8]
 Empty space, ignored for all intents and purposes.

Detailed Description

Structure used to store an IPv4 address for a socket.

This structure is the standard way to set up addresses for sockets in the AF_INET address family. Generally you will not send one of these directly to a function, but rather will cast it to a struct sockaddr. Also, this structure contains the old sin_zero member which is no longer required by the standard (for compatibility with applications that expect it).


Field Documentation

struct in_addr sockaddr_in::sin_addr

Address for the socket. Must be in network byte order.

sa_family_t sockaddr_in::sin_family

Family for the socket. Must be AF_INET.

in_port_t sockaddr_in::sin_port

Port for the socket. Must be in network byte order.

unsigned char sockaddr_in::sin_zero[8]

Empty space, ignored for all intents and purposes.


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