NDIS_PER_PACKET_INFO_FROM_PACKET (Windows Embedded CE 6.0)
This macro returns a pointer to a specific type of per-packet information associated with a packet descriptor.
PVOID NDIS_PER_PACKET_INFO_FROM_PACKET( PNDIS_PACKET _P, NDIS_PER_PACKET_INFO _Id );
Points to a packet descriptor.
Specifies, as one of the NDIS_PER_PACKET_INFO_FROM_PACKET values, the specific type of per-packet information to which this macro returns a pointer. The following table shows the type of per-packet information associated with each NDIS_PER_PACKET_INFO value.
Specifies checksum information used in offloading checksum tasks from the TCP/IP transport to a miniport. When this _id value is specified, the macro returns a pointer to an NDIS_TCP_IP_CHECKSUM_PACKET_INFO structure.
Specifies information used in offloading the segmentation of a large TCP packet from the TCP/IP transport to a miniport. When this _Id value is specified, the macro returns a pointer that contains a ULONG value.
Before passing a large TCP packet to a miniport for segmentation, the TCP/IP transport writes this value with the maximum segment size (MSS), which is the current maximum transmission unit (MTU). Before completing the send of a large TCP packet that it has segmented into smaller packets, a miniport writes this value with the total number of user data bytes that it sent in the packets segmented from the large TCP packet.
This is reserved.
Specifies 802.1p priority information that is used to establish packet priority in shared-media 802 networks. If this _Id value is specified, the macro returns an IEEE8021PPRIORITY type. The Ndis.h header file defines this IEEE8021PPRIORITY type as a UINT. The bits that are set to 1 in this UINT specify an 802.1p priority value. A driver can use NDIS_PER_PACKET_INFO_FROM_PACKET with this _Id value to either retrieve an 802.1p priority value from the packet descriptor or insert an 802.1p priority value into the packet descriptor.Note:Windows Embedded CE does not support 802.1p packet prioritization.
Specifies a packet descriptor that contains original information that was previously received over the network and indicated up by the lowest-level driver in a stack of NDIS drivers. If this _Id value is specified, the macro returns a pointer to a NDIS_PACKET structure. A driver uses NDIS_PER_PACKET_INFO_FROM_PACKET with this _Id value to either retrieve or insert this original-packet information. Using this method of inserting or retrieving, each driver in a layered stack of NDIS drivers can access the OOB data block that is associated with the packet that is received from the network without requiring that the packet be copied to each layer.
A protocol or miniport driver should call this macro when it needs to examine and/or set only a single type of per-packet information — such as checksum information or IP Security information — for a packet. If the driver needs to access more than one type of per-packet information for a packet, it should call the NDIS_PACKET_EXTENSION_FROM_PACKET macro.
The NDIS_PER_PACKET_INFO_FROM_PACKET macro is defined as followed.
#define NDIS_PER_PACKET_INFO_FROM_PACKET(_P, _Id) ((PNDIS_PACKET_EXTENSION)((PUCHAR)(_P) + (_P)->Private.NdisPacketOobOffset + sizeof(NDIS_PACKET_OOB_DATA)))->NdisPacketInfo[(_Id)]