NDIS_PACKET_EXTENSION_FROM_PACKET (Windows CE 5.0)

Send Feedback

This macro returns a pointer to the NDIS_PACKET_EXTENSION structure associated with a packet descriptor.

PNDIS_PACKET_EXTENSION NDIS_PACKET_EXTENSION_FROM_PACKET(PNDIS_PACKET_P);

Parameters

  • _P
    Points to a packet descriptor.

Return Values

The return value is a pointer to the NDIS_PACKET_EXTENSION structure associated with the given packet descriptor. The return value is NULL if there is no per-packet information for the packet.

Remarks

The NDIS_PACKET_EXTENSION structure contains an array of PVOID, each of which either points to or contains a specific type of per-packet information. After obtaining the pointer to the NDIS_PACKET_EXTENSION structure, the driver can use the appropriate array index to access a particular type of per-packet information.

A protocol or miniport driver should call this macro when it needs to read and/or write more than one type of per-packet information associated with a packet descriptor. If the driver needs to access just one type of per-packet information, it should call the NDIS_PER_PACKET_INFO_FROM_PACKET macro.

After obtaining the pointer to the NDIS_PACKET_EXTENSION structure returned by NDIS_PACKET_EXTENSION_FROM_PACKET, a driver can use array indexes to access a particular type of per-packet information.

The following table shows the possible array indexes a driver can use.

Array Index Description
TcpIpChecksumPacketInfo Indexes a pointer to an NDIS_TCP_IP_CHECKSUM_PACKET_INFO structure.
IpSecPacketInfo Not supported in Windows CE.
TcpLargeSendPacketInfo Indexes 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.
ClassificationHandlePacketInfo This is reserved.
ScatterGatherListPacketInfo Not supported in Windows CE.
Ieee8021pPriority Indexes a UINT, which specifies 802.1p priority information that is used to establish packet priority in shared-media 802 networks. The bits that are set to one in this UINT specify an 802.1p priority value.

Note   Windows CE does not support 802.1p packet prioritization.

OriginalPacketInfo Indexes a pointer to a NDIS_PACKET structure. This structure 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. Each driver in the layered stack can access the out-of-band (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.

The NDIS_PACKET_EXTENSION_FROM_PACKET macro is defined as follows.

#define NDIS_PACKET_EXTENSION_FROM_PACKET(_P)  ((PNDIS_PACKET_EXTENSION)((PUCHAR)(_P) + (_P)->Private.NdisPacketOobOffset + sizeof(NDIS_PACKET_OOB_DATA)))

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Ndis.h.

See Also

NDIS_PACKET | NDIS_PER_PACKET_INFO_FROM_PACKET | NDIS_PACKET_EXTENSION | NdisIMCopySendCompletePerPacketInfo | NdisIMCopySendPerPacketInfo | NDIS_PACKET_OOB_DATA | NDIS_TCP_IP_CHECKSUM_PACKET_INFO

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.