sockaddr_in6 structure

The SOCKADDR_IN6 structure specifies a transport address and port for the AF_INET6 address family.

Syntax

typedef struct sockaddr_in6 {
  ADDRESS_FAMILY sin6_family;
  USHORT         sin6_port;
  ULONG          sin6_flowinfo;
  IN6_ADDR       sin6_addr;
  union {
    ULONG    sin6_scope_id;
    SCOPE_ID sin6_scope_struct;
  };
} SOCKADDR_IN6_LH, *PSOCKADDR_IN6_LH, *LPSOCKADDR_IN6_LH;

Members

sin6_family

The address family for the transport address. This member should always be set to AF_INET6.

sin6_port

A transport protocol port number.

sin6_flowinfo

The IPv6 flow information.

sin6_addr

An IN6_ADDR structure that contains an IPv6 transport address.

__unnamed_union_06b2_1

__unnamed_union_06b2_1.sin6_scope_id

__unnamed_union_06b2_1.sin6_scope_struct

Remarks

All of the data in the SOCKADDR_IN6 structure, except for the address family, must be specified in network-byte-order (big-endian).

The size of the SOCKADDR_IN6 structure is too large to fit in the memory space that is provided by a SOCKADDR structure. For a structure that is guaranteed to be large enough to contain a transport address for all possible address families, see SOCKADDR_STORAGE.

Requirements

   
Minimum supported client Available in Windows Vista and later versions of the Windows operating systems.
Header ws2ipdef.h (include Ws2ipdef.h)

See Also

AF_INET6

IN6_ADDR

SOCKADDR

SOCKADDR_STORAGE