NdisSetPacketPoolProtocolId function

Note   NDIS 5. x has been deprecated and is superseded by NDIS 6. x. For new NDIS driver development, see Network Drivers Starting with Windows Vista. For information about porting NDIS 5. x drivers to NDIS 6. x, see Porting NDIS 5.x Drivers to NDIS 6.0.

NdisSetPacketPoolProtocolId associates a packet pool with a protocol.

Syntax

VOID NdisSetPacketPoolProtocolId(
  _In_ NDIS_HANDLE PacketPoolHandle,
  _In_ UINT        ProtocolId
);

Parameters

  • PacketPoolHandle [in]
    Handle to a packet pool.

  • ProtocolId [in]
    Specifies the identifier of a protocol with which to associate the packet pool.

Return value

None

Remarks

NdisSetPacketPoolProtocolId must be called before any packet descriptors ( NDIS_PACKET) are allocated from the packet pool that is specified by PacketPoolHandle.

Calling NdisSetPacketPoolProtocolId causes all packet descriptors that are allocated from the pool to be associated with the specified protocol identifier ( ProtocolId parameter). Drivers can test the protocol identifier that is associated with a packet descriptor to determine whether to perform an operation on a packet. For example, TCP/IP can call NdisSetPacketPoolProtocolId to set the protocol identifier to NDIS_PROTOCOL_ID_TCP_IP, which causes all of the packet descriptors that are allocated from the pool to be associated with NDIS_PROTOCOL_ID_TCP_IP. Before passing a TCP/IP checksum operation to its NIC, a miniport driver can test the protocol identifier that is associated with a packet descriptor. If the protocol identifier is not NDIS_PROTOCOL_ID_TCP_IP, the miniport driver's NIC should not perform checksum operations on the associated packet.

Requirements

Target platform

Universal

Version

Not supported for NDIS 6.0 drivers in Windows Vista. Supported for NDIS 5.1 drivers in Windows Vista and Windows XP.

Header

Ndis.h (include Ndis.h)

Library

Ndis.lib

IRQL

<= DISPATCH_LEVEL

See also

NDIS_PACKET

 

 

Send comments about this topic to Microsoft