다음을 통해 공유


NDIS_GET_PACKET_PROTOCOL_TYPE (Windows Embedded CE 6.0)

1/6/2010

This macro returns the protocol identifier associated with a given packet descriptor.

Syntax

UINT NDIS_GET_PACKET_PROTOCOL_TYPE(
  PNDIS_PACKET _Packet_,
);

Parameters

  • _Packet_
    Points to a packet descriptor.

Return Value

The return value is the protocol type associated with _Packet_. The following table shows the protocol types supported by NDIS.

Protocol type Description

NDIS_PROTOCOL_ID_DEFAULT

Unspecified

NDIS_PROTOCOL_ID_TCP_IP

TCP/IP

NDIS_PROTOCOL_ID_IPX

Internetwork packet exchange (IPX)

NDIS_PROTOCOL_ID_NBF

NetBEUI

Remarks

Drivers can test the protocol identifier associated with a packet descriptor to determine whether to perform an operation on a packet. For example, before passing a TCP/IP checksum operation to its NIC, a miniport could test the protocol identifier associated with a packet descriptor. If the protocol identifier is not NDIS_PROTOCOL_ID_TCP_IP, the miniport NIC should not perform checksum operations on the associated packet.

The NDIS_GET_PACKET_PROTOCOL_TYPE macro is defined as follows.

#define NDIS_GET_PACKET_PROTOCOL_TYPE(_Packet_) ((_Packet_)->Private.Flags & NDIS_PROTOCOL_ID_MASK)

Requirements

Header ndis.h
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

Network Driver Macros
NDIS_PACKET

Concepts

Protocol Drivers