Network Component  Version 7.19.0
MDK Middleware for IPv4 and IPv6 Networking
Structures

Structures of the BSD Socket. More...

Structures

struct  SOCKADDR
 Generic Socket Address structure. More...
 
struct  IN_ADDR
 Generic IPv4 Address structure. More...
 
struct  IN6_ADDR
 Generic IPv6 Address structure. More...
 
struct  SOCKADDR_IN
 IPv4 Socket Address structure. More...
 
struct  SOCKADDR_IN6
 IPv6 Socket Address structure. More...
 
struct  SOCKADDR_STORAGE
 Socket Address storage structure. More...
 
struct  HOSTENT
 BSD Host Entry structure. More...
 
struct  timeval
 BSD timeval structure. More...
 
struct  fd_set
 BSD fd_set structure. More...
 
struct  IOVEC
 BSD scatter/gather array of items. More...
 
struct  MSGHDR
 BSD message header structure. More...
 
struct  CMSGHDR
 BSD cmsg header structure. More...
 
union  IN_ADDR.u
 Union members for different data accesses. More...
 
struct  IN_ADDR.u.s_b
 IP address, byte access. More...
 
struct  IN_ADDR.u.s_w
 IP address, unsigned short integer access. More...
 
union  IN6_ADDR.u
 Union members for different data accesses. More...
 

Description

Structures of the BSD Socket.


Data Structure Documentation

◆ SOCKADDR

struct SOCKADDR

Generic Socket Address structure.

Parameter for:

Data Fields
int8_t sa_data[14] Direct address (up to 14 bytes)
uint16_t sa_family Address family.

◆ IN_ADDR

struct IN_ADDR

Generic IPv4 Address structure.

Parameter for:

Data Fields
union IN_ADDR.u u Union members for different data accesses.

◆ IN6_ADDR

struct IN6_ADDR

Generic IPv6 Address structure.

Parameter for:

Data Fields
union IN6_ADDR.u u Union members for different data accesses.

◆ SOCKADDR_IN

struct SOCKADDR_IN

IPv4 Socket Address structure.

Used in:

Data Fields
IN_ADDR sin_addr IP address.
int16_t sin_family Socket domain.
uint16_t sin_port Port.
int8_t sin_zero[8] reserved

◆ SOCKADDR_IN6

struct SOCKADDR_IN6

IPv6 Socket Address structure.

Used in:

Data Fields
IN6_ADDR sin6_addr IP6 address.
int16_t sin6_family Socket domain.
uint32_t sin6_flowinfo IP6 flow information.
uint16_t sin6_port Port.

◆ SOCKADDR_STORAGE

struct SOCKADDR_STORAGE

Socket Address storage structure.

The structure is sufficiently large to store SOCKADDR_IN or SOCKADDR_IN6 address information.

Data Fields
int32_t __ss_align reserved, structure alignment
int8_t __ss_pad1[2] reserved
int8_t __ss_pad2[16] reserved
int16_t ss_family Address family.

◆ HOSTENT

struct HOSTENT

BSD Host Entry structure.

Returned by:

Data Fields
char ** h_addr_list Pointer to an array of IPv4 addresses.
int16_t h_addrtype Address Type: AF_INET, AF_NETBIOS.
char ** h_aliases Pointer to an array of alias names.
int16_t h_length Length of address in bytes.
char * h_name Official name of host.

◆ timeval

struct timeval

BSD timeval structure.

Used in:

Data Fields
uint32_t tv_sec Time interval: seconds.
uint32_t tv_usec Time interval: microseconds.

◆ fd_set

struct fd_set

BSD fd_set structure.

Used in:

Data Fields
uint32_t fd_bits[(FD_SETSIZE+31)> >5] Set of sockets bit-mask.

◆ IOVEC

struct IOVEC

BSD scatter/gather array of items.

Used in:

Data Fields
void * iov_base Starting address.
uint32_t iov_len Number of bytes to transfer.

◆ MSGHDR

struct MSGHDR

BSD message header structure.

Used in:

Data Fields
void * msg_control Ancillary data.
uint32_t msg_controllen Ancillary data buffer length.
int32_t msg_flags Flags on received message.
IOVEC * msg_iov An array of iovec buffers for the message.
int32_t msg_iovlen Number of elements in msg_iov.
void * msg_name Optional pointer to source address.
uint32_t msg_namelen Size of address buffer.

◆ CMSGHDR

struct CMSGHDR

BSD cmsg header structure.

Used in:

Data Fields
uint32_t cmsg_len Data byte count, including the cmsghdr.
int32_t cmsg_level Originating protocol.
int32_t cmsg_type Protocol-specific type.

◆ IN_ADDR.u

union IN_ADDR.u

Union members for different data accesses.

Data Fields
uint32_t s_addr IP address, unsigned integer access in network byte order.
struct IN_ADDR.u.s_b s_b IP address, byte access.
struct IN_ADDR.u.s_w s_w IP address, unsigned short integer access.

◆ IN_ADDR.u.s_b

struct IN_ADDR.u.s_b

IP address, byte access.

Data Fields
uint8_t s_b1 byte 1
uint8_t s_b2 byte 2
uint8_t s_b3 byte 3
uint8_t s_b4 byte 4

◆ IN_ADDR.u.s_w

struct IN_ADDR.u.s_w

IP address, unsigned short integer access.

Data Fields
uint16_t s_w1 unsigned short integer 1
uint16_t s_w2 unsigned short integer 2

◆ IN6_ADDR.u

union IN6_ADDR.u

Union members for different data accesses.

Data Fields
uint8_t s6_b[16] IP6 address, array for byte access.
uint16_t s6_w[8] IP6 address, array for unsigned short integer access.