Compartilhar via


TRANSPORT_HEADER_OFFSET (Windows CE 5.0)

Send Feedback

Transports use a TRANSPORT_HEADER_OFFSET 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 processing 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.

The following syntax defines TRANSPORT_HEADER_OFFSET.

typedef struct _TRANSPORT_HEADER_OFFSET {  USHORTProtocolType;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 precedes 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 NIC supports, including the header, transports use OID_GEN_MAXIMUM_TOTAL_SIZE. To request the maximum packet size in bytes that a NIC supports, not including 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 within 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

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

See Also

OID_GEN_MAXIMUM_TOTAL_SIZE | OID_GEN_MAXIMUM_FRAME_SIZE | OID_GEN_TRANSPORT_HEADER_OFFSET

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.