Partager via


NDIS_PER_PACKET_INFO_FROM_PACKET (Windows CE 5.0)

Send Feedback

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);

Parameters

  • _P
    Points to a packet descriptor.
  • _Id
    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.
    Value Description
    TcpIpChecksumPacketInfo 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.
    IpSecPacketInfo Not supported.
    TcpLargeSendPacketInfo 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.

    ClassificationHandlePacketInfo This is reserved.
    ScatterGatherListPacketInfo Not supported.
    Ieee8021pPriority 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 CE does not support 802.1p packet prioritization.

    OriginalPacketInfo 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.

Return Values

The return value is a pointer to the per-packet information specified by _Id. The return value is NULL if there is no such per-packet information for the packet.

Remarks

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)]

Requirements

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

See Also

NDIS_PACKET | NDIS_PACKET_EXTENSION_FROM_PACKET | NDIS_TCP_IP_CHECKSUM_PACKET_INFO

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.