Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

In the Internet address family, this structure is used by Windows Sockets to specify a local or remote endpoint address to which to connect a socket. This structure is IPv6-specific.

Syntax

struct sockaddr_in6 {
  short 
sin6_family;
  u_short 
sin6_port;
  u_long 
sin6_flowinfo;
  struct in6_addr 
sin6_addr;
  u_long 
sin6_scope_id;
};

Members

sin6_family

Address family; must be AF_INET6.

sin6_port

Transport-level port number

sin6_flowinfo

Ipv6 flow information.

sin6_addr

Ipv6 address.

sin6_scope_id

Set of interfaces for a scope.

Remarks

The IP address part of this structure is of type in6_addr.

If an application uses Windows Sockets 1.1 functions and requires IPv6 addresses, it may continue to use all the old functions that take the sockaddrstructure as one of the parameters ( bind (Windows Sockets), connect (Windows Sockets), sendto, recvfrom, accept (Windows Sockets), and so forth). The only change that is required is to use sockaddr_in6instead of sockaddr_in.

Requirements

Header ws2tcpip.h
Windows Embedded CE Windows CE .NET 4.1 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also