Freigeben über


TRANSPORT_HEADER_OFFSET (Compact 2013)

3/26/2014

Transports use this structure to indicate the size of additional headers for packets that a particular transport sends and receives.

OID_GEN_TRANSPORT_HEADER_OFFSET informs miniport and other layered drivers of this header size; these drivers can then use this information when they process packets. For example, a driver could use the sub-layer header size obtained from the transport to locate the beginning of higher layer information in packets, such as the start of the IP protocol header. The driver could then parse and adjust the fields of the IP protocol header as appropriate.

Syntax

typedef struct _TRANSPORT_HEADER_OFFSET {
  USHORT ProtocolType; 
  USHORT HeaderOffset; 
} TRANSPORT_HEADER_OFFSET, *PTRANSPORT_HEADER_OFFSET;

Members

  • ProtocolType
    Specifies the protocol type that sends this object identifier and that subsequently sends and receives packets using the specified sub-layer header size. The protocol is one of the following values:

    Value

    Description

    NDIS_PROTOCOL_ID_DEFAULT

    Default protocol

    NDIS_PROTOCOL_ID_TCP_IP

    TCP/IP protocol

    NDIS_PROTOCOL_ID_IPX

    Netware IPX protocol

    NDIS_PROTOCOL_ID_NBF

    NetBIOS protocol

  • HeaderOffset
    Specifies the size, in bytes, of the sub-layer header that comes before the protocol header for packets that the protocol subsequently sends to or receives from the miniport or other layered driver. For example, sizeof(Ethernet header) + sizeof(SNAP header).

Remarks

Typically, transports calculate the header size of packets from information that is retrieved from miniports. To request the maximum total packet size in bytes that a network adapter supports, including the header, transports use OID_GEN_MAXIMUM_TOTAL_SIZE. To request the maximum packet size in bytes that a network adapter supports, excluding a header, transports use OID_GEN_MAXIMUM_FRAME_SIZE. To calculate the maximum header size, transports subtract the maximum frame size from the maximum total size.

If a transport transmits packets that contain sub-layer header information, the transport must know the sub-layer header size of these packets and must inform underlying miniport and other layered drivers about the size so that the drivers can process the packets. Sending and receiving particular sub-layer header information in a packet may be an option that can be set in the registry for a particular protocol. Transports could then obtain information about sub-layer headers from the registry and pass the header size down to miniport or other layered drivers.

This object identifier is optional for miniport and other layered drivers. Because this object identifier is optional, drivers are not required to respond to requests that transports make using this object identifier.

Requirements

Header

ndis.h

See Also

Reference

NDIS 5.x Legacy Structures
OID_GEN_MAXIMUM_TOTAL_SIZE
OID_GEN_MAXIMUM_FRAME_SIZE
OID_GEN_TRANSPORT_HEADER_OFFSET
NDIS 5.x Legacy Reference