Packet Out-of-Band Data (NDIS 5.1)

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.

Every NDIS_PACKET-type descriptor has an associated out-of-band (OOB) data block in which media-specific and priority information is passed. This substructure is defined as:

typedef struct _NDIS_PACKET_OOB_DATA {
    Union {
        ULONGLONG   TimeToSend;
        ULONGLONG   TimeSent
         }
    ULONGLONG       TimeReceived;
    UINT            HeaderSize;
    UINT            SizeMediaSpecificInfo;
    PVOID           MediaSpecificInformation;
    NDIS_STATUS     Status;
    } NDIS_PACKET_OOB_DATA, *PNDIS_PACKET_OOB_DATA;

A miniport driver that has support for OOB data should use the NDIS macros provided for accessing such data. It should never attempt to calculate offsets or otherwise take actions that depend on knowing the exact structure of a packet's OOB data.

The NDIS macros for OOB data include the following:

NDIS_OOB_DATA_FROM_PACKET( Packet )

Returns a pointer to the NDIS_PACKET_OOB_DATA substructure. This pointer can be used to access members of NDIS_PACKET_OOB_DATA by member name.

NDIS_SET_PACKET_STATUS( Packet, Status)

Sets the Status member.

NDIS_SET_PACKET_TIME_TO_SEND( Packet, TimeToSend)

Sets the TimeToSend member.

NDIS_SET_PACKET_TIME_SENT( Packet, TimeSent)

Sets the TimeSent member.

NDIS_SET_PACKET_TIME_RECEIVED( Packet, TimeReceived)

Sets the TimeReceived member.

NDIS_SET_PACKET_HEADER_SIZE( Packet, HeaderSize)

Sets the HeaderSize member.

NDIS_SET_PACKET_MEDIA_SPECIFIC_INFO( Packet, MediaSpecificInfo, SizeMediaSpecificInfo)

Sets the MediaSpecificInformation and SizeMediaSpecificInfo members)

NDIS_GET_PACKET_STATUS( Packet)

Returns the Status member.

NDIS_GET_PACKET_TIME_TO_SEND( Packet)

Returns the TimeToSend member.

NDIS_GET_PACKET_TIME_SENT( Packet)

Returns the TimeSent member.

NDIS_GET_PACKET_TIME_RECEIVED( Packet)

Returns the TimeReceived member.

NDIS_GET_PACKET_HEADER_SIZE( Packet)

Returns the HeaderSize member.

NDIS_GET_PACKET_MEDIA_SPECIFIC_INFO( Packet, pMediaSpecificInfo, pSizeMediaSpecificInfo)

Returns media-specific information in a buffer whose address is provided by the caller. Returns the size in bytes of that information stored in a caller-supplied variable.

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft