Share via


REMOTE_NDIS_PACKET_MSG

This message encapsulates NDIS data packets to form a single data message. By concatenating multiple REMOTE_NDIS_PACKET_MSG elements, you can form a multi-packet message.

Each individual REMOTE_NDIS_PACKET_MSG component is constructed as described in the following syntax.

REMOTE_NDIS_PACKET_MSG
(UINT32) NdisMessageType;
(UINT32) MessageLength;
(UINT32) DataOffset;
(UINT32) DataLength;
(UINT32) OOBDataOffset;
(UINT32) OOBDataLength;
(UINT32) NumOOBDataElements;
(UINT32) PerPacketInfoOffset;
(UINT32) PerPacketInfoLength;
(RNDIS_HANDLE) VcHandle;
(UINT32) Reserve; 
(UINT32) Size;
(RNDIS_CLASS_ID) Type;
(UINT32) ClassInformationOffset;
(UINT32) Size;
(UINT32) Type;
(UINT32) PerPacketInformationOffset;

Parameters

  • NdisMessageType
    Specifies the RNDIS message type, which is set to REMOTE_NDIS_PACKET_MSG.
  • MessageLength
    Specifies the total length of this RNDIS message in bytes, including appended packet data, out-of-bound data, per-packet-info data, and both internal and external padding.
  • RequestId
    Specifies the Remote NDIS message identifier value. This value is used to match device responses to host sent messages.
  • DataOffset
    Specifies the offset in bytes from the start of the DataOffset field of this message to the start of the data. This is an integer multiple of 4.
  • DataLength
    Specifies the number of bytes in the data content of this message.
  • OOBDataOffset
    Specifies the offset in bytes of the first out-of-band (OOB) data record from the start of the DataOffset field of this message. Set to zero if there is no OOB data. Otherwise this is an integer multiple of 4.
  • OOBDataLength
    Specifies, in bytes, the total length of the OOB data.
  • NumOOBDataElements
    Specifies the number of OOB records in this message.
  • PerPacketInfoOffset
    Specifies, in bytes, the offset from the beginning of the DataOffset field in the REMOTE_NDIS_PACKET_MSG data message to the start of the first per-packetinformation data record. Set to zero if there is no per-packet data. Otherwise this is an integer multiple of 4.
  • PerPacketInfoLength
    Specifies, in bytes, the total length of the per-packet information contained in this message.
  • VcHandle
    Set to 0. Reserved for connection-oriented devices.
  • Reserved
    Set to 0. Reserved.
  • Size
    This is an integer multiple of 4. Length, in bytes, of this OOB header and appended OOB data and padding.
  • Type
    None defined for 802.3 devices.
  • ClassInformationOffset
    The byte offset from the beginning of this OOB data record to the beginning of the OOB data.
  • Size
    This value is an integer multiple of 4. Length, in bytes, of this per-packet header and appended per-packet data and padding.
  • Type
    Set to one of the legal values for NDIS_PER_PACKET_INFO_FROM_PACKET.
  • PerPacketInformationOffset
    The byte offset from the beginning of this per-packet information data record to the beginning of the per-packet information data.

Return Values

None.

Remarks

Each REMOTE_NDIS_PACKET_MSG may contain one or more OOB data records. NumOOBDataElements indicates the number of OOB data records in this message. The OOB data records must appear in sequence. The OOBDataLength field indicates the length, in bytes, of the entire OOB data block. The OOBDataOffset field indicates the byte offset from the beginning of the DataOffset field to the beginning of the OOB data block. For more information about OOB Packet Data, see Accessing OOB Information.

If there are multiple OOB data blocks attached to a REMOTE_NDIS_PACKET_MSG message, each subsequent OOB data record must immediately follow the previous OOB record's data. There is no OOB information currently defined for 802.3 devices.

Each REMOTE_NDIS_PACKET_MSG may contain one or more per-packet-info data records. Per-packet-info is used to convey packet metadata, such as TCP checksum. The PerPacketInfoOffset field indicates the byte offset from the beginning of the DataOffset field to the beginning of the per-packet information data record. The OOBDataLength field indicates the byte length of the per-packet information data record. If there are multiple per-packet information data blocks, each subsequent per-packet information data record must immediately follow the previous per-packet information record's data.

In contrast to a single-packet message, each REMOTE_NDIS_PACKET_MSG header includes some additional padding bytes in the MessageLength field. These padding bytes are appended to all but the last REMOTE_NDIS_PACKET_MSG to ensure that each succeeding REMOTE_NDIS_PACKET_MSG starts at an appropriate byte boundary. For messages sent from the device to the host, this padding should result in each REMOTE_NDIS_PACKET_MSG starting at a byte offset that is a multiple of 8 bytes from the beginning of the multi-packet message.

When the host sends a multi-packet message to the device, the message will adhere to the PacketAlignmentFactor specified by the device.

All RNDIS messages start with two UINT32 fields, NdisMessageType and MessageLength that identify the type of message being sent and its length. All messages that expect a response from a remote device and all responses to such messages from a remote device also include a third UINT32 field, RequestId, that is used to match device responses to host sent messages.

Requirements

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

See Also

Accessing OOB Information | NDIS_PER_PACKET_INFO_FROM_PACKET | RNDIS_CLASS_ID

 Last updated on Tuesday, May 18, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.