Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

in6_pktinfo structure

The in6_pktinfo structure is used to store received IPv6 packet address information, and is used by Windows to return information about received packets and also allows specifying the local IPv6 address to use for sending packets.

Syntax


typedef struct in6_pktinfo {
  IN6_ADDR ipi6_addr;
  ULONG    ipi6_ifindex;
} IN6_PKTINFO, *PIN6_PKTINFO;

Members

ipi6_addr

The destination IPv6 address from the IP header of the received packet when used with the WSARecvMsg function. The local source IPv6 address to set in the IP header when used with the WSASendMsg function.

ipi6_ifindex

The interface on which the packet was received when used with the WSARecvMsg function. The interface on which the packet should be sent when used with the WSASendMsg function.

Remarks

If the IPV6_PKTINFO socket option is set on a socket of type SOCK_DGRAM or SOCK_RAW, one of the control data objects returned by the WSARecvMsg function will contain an in6_pktinfo structure used to store received packet address information.

On an IPv6 socket of type SOCK_DGRAM or SOCK_RAW, an application can specific the local IP source address to use for sending with the WSASendMsg function. One of the control data objects passed in the WSAMSG structure to the WSASendMsg function may contain an in6_pktinfo structure used to specify the local IPv6 address to use for sending.

On the Microsoft Windows Software Development Kit (SDK) released for Windows Vista and later, the organization of header files has changed and the in6_pktinfo structure is defined in the Ws2ipdef.h header file which is automatically included in the Ws2tcpip.h header file. The Ws2ipdef.h header files should never be used directly.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Ws2ipdef.h (include Ws2tcpip.h);
Ws2tcpip.h on Windows Server 2003 and Windows XP

See also

Dual-Stack Sockets for IPv6 Winsock Applications
in_pktinfo
IP_PKTINFO
IPPROTO_IPV6 Socket Options
IPV6_PKTINFO
WSAMSG
WSARecvMsg
WSASendMsg

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.