Freigeben über


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 IPv4 address to use for sending packets.

Syntax

typedef struct in_pktinfo {
  IN6_ADDR ipi6_addr;
  UINT     ipi6_ifindex;
} in_pktinfo;

Mitglieder

  • ipi6_addr
    The destination IPv6 address from the IP header of the received packet when used with the WSARecvMsg function. The local source 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.

Hinweise

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.

When this socket option is enabled on an IPv6 socket of type SOCK_DGRAM or SOCK_RAW, an application can also 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.

Anforderungen

Mindestens unterstützter Client

Windows XP

Mindestens unterstützter Server

Windows Server 2003

Header

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

Siehe auch

IPPROTO_IPV6 Socket Options

IPV6_PKTINFO

WSAMSG

WSARecvMsg

WSASendMsg