SOCKADDR_STORAGE_LH structure (ws2def.h)

The SOCKADDR_STORAGE structure is a generic structure that specifies a transport address.

Syntax

typedef struct sockaddr_storage {
  ADDRESS_FAMILY ss_family;
  CHAR           __ss_pad1[_SS_PAD1SIZE];
  __int64        __ss_align;
  CHAR           __ss_pad2[_SS_PAD2SIZE];
} SOCKADDR_STORAGE_LH, *PSOCKADDR_STORAGE_LH, *LPSOCKADDR_STORAGE_LH;

Members

ss_family

The address family for the transport address. For more information about supported address families, see WSK Address Families.

__ss_pad1[_SS_PAD1SIZE]

A padding of 6 bytes that puts the __ss_align member on an eight-byte boundary within the structure.

__ss_align

A 64-bit value that forces the structure to be 8-byte aligned.

__ss_pad2[_SS_PAD2SIZE]

A padding of an additional 112 bytes that brings the total size of the SOCKADDR_STORAGE structure to 128 bytes.

Remarks

A WSK application typically does not directly access any of the members of the SOCKADDR_STORAGE structure except for the ss_family member. Instead, a pointer to a SOCKADDR_STORAGE structure is normally cast to a pointer to the specific SOCKADDR structure type that corresponds to a particular address family.

Requirements

Requirement Value
Minimum supported client Available in Windows Vista and later versions of the Windows operating systems.
Header ws2def.h (include Wsk.h)

See also

SOCKADDR