Partager via


IPv6ObtainPacketData function

The IPv6ObtainPacketData function retrieves the packet data from an IPv6 packet.

Syntax

uchar* IPv6ObtainPacketData(
  _In_ const void *PacketContext,
  _In_       uint DataLength,
  _In_       uint Alignment
);

Parameters

  • PacketContext [in]
    The packet context associated with an IPv6 network packet. An IPv6 firewall-hook driver specifies the value that the IPv6 network stack passed as the PacketContext parameter to the driver's FirewallHook function for this parameter.

  • DataLength [in]
    The length, in bytes, of packet data that the IPv6 firewall-hook driver is requesting from the IPv6 packet. This must be less than or equal to the value that the IPv6 network stack passed as the DataLength parameter to the driver's FirewallHook function.

  • Alignment [in]
    The requested byte alignment of the returned data pointer. This must be a power-of-two value that indicates the requested byte alignment. For example, a value of 8 specifies that the data is to be 8-byte aligned.

Return value

IPv6ObtainPacketData returns a constant pointer to a contiguous block of memory containing the packet data, or NULL if an error occurred.

Remarks

An IPv6 firewall-hook driver calls the IPv6ObtainPacketData function from within its FirewallHook function if it needs to examine the packet data to determine whether the network packet should be accepted or dropped.

Requirements

Target platform

Desktop

Version

Available on Microsoft Windows XP with Service Pack 2 (SP2) and Windows Server 2003 with Service Pack 1 (SP1).

Header

Ip6firewall.h (include Ip6firewall.h)

Library

Tcpip6.lib

IRQL

Any level

See also

FirewallHook

 

 

Send comments about this topic to Microsoft