REMOTE_NDIS_PACKET_MSG
REMOTE_NDIS_PACKET_MSG encapsulates NDIS data packets to form a single data message.
Concatenating multiple REMOTE_NDIS_PACKET_MSG elements forms a multipacket message. Each individual REMOTE_NDIS_PACKET_MSG component is constructed as described below. The difference from the single-packet message is that the MessageLength field in each REMOTE_NDIS_PACKET_MSG header includes some additional padding bytes. These padding bytes are appended to all but the last REMOTE_NDIS_PACKET_MSG so that the 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 starting from the beginning of the multipacket message. When the host sends a multipacket message to the device, it will adhere to the PacketAlignmentFactor that the device specifies.
The REMOTE_NDIS_PACKET_MSG format is defined in the following table.
Offset | Size | Field | Description |
---|---|---|---|
0 |
4 |
MessageType |
Specifies the type of message being sent. Set to 0x1. |
4 |
4 |
MessageLength |
Message length in bytes, including appended packet data, OOB data, per-packet information data, and both internal and external padding. |
8 |
4 |
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. |
12 |
4 |
DataLength |
Specifies the number of bytes in the data content of this message. |
16 |
4 |
OOBDataOffset |
Specifies the offset in bytes of the first 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. |
20 |
4 |
OOBDataLength |
Specifies in bytes the total length of the OOB data. |
24 |
4 |
NumOOBDataElements |
Specifies the number of OOB records in this message. |
28 |
4 |
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-packet information data record. Set to zero if there is no per-packet data. Otherwise, this is an integer multiple of 4. |
32 |
4 |
PerPacketInfoLength |
Specifies in bytes the total length of the per-packet information contained in this message. |
36 |
4 |
VcHandle |
Reserved for connection-oriented devices. Set to zero. |
40 |
4 |
Reserved |
Reserved. Set to zero. |
The format of a single OOB data record is indicated in the following table.
Offset | Size | Field | Description |
---|---|---|---|
0 |
4 |
Size |
Length in bytes of this OOB header and appended OOB data and padding. This is an integer multiple of 4. |
4 |
4 |
Type |
None defined for 802.3 devices. |
8 |
4 |
ClassInformationOffset |
The byte offset from the beginning of this OOB data record to the beginning of the OOB data. |
(N) |
... |
OOB Data |
OOB Data; consult Microsoft Windows Driver Development Kit (DDK) documentation for more information. |
Note
(N) is equal to the value of ClassInformationOffset.
The following table defines the format of a per-packet information data record.
Offset | Size | Field | Description |
---|---|---|---|
0 |
4 |
Size |
Length in bytes of this per-packet header and appended per-packet data and padding. This value is an integer multiple of 4. |
4 |
4 |
Type |
Set to one of the legal values for NDIS_PER_PACKET_INFO_FROM_PACKET, as described in the Windows 2000 Driver Development Kit (DDK). |
8 |
4 |
PerPacketInformationOffset |
The byte offset from the beginning of this per-packet information data record to the beginning of the per-packet information data. |
(N) |
... |
Per-Packet Data |
Per-Packet Data; consult Windows 2000 DDK documentation for more information. |
Note
(N) is equal to the value of PerPacketInformationOffset.
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 the NDIS specification in the Windows 2000 DDK.
If multiple OOB data blocks are attached to a REMOTE_NDIS_PACKET_MSG message, each subsequent OOB data record must immediately follow the previous OOB record's data.
No OOB information is 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. For more information about per-packet information data, see the Windows 2000 DDK.
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.
A Remote NDIS device must send and receive data through NDIS data packets. The bus that the device uses determines how these packets are passed from host to device and device to host. It could be shared memory or, in the case of USB, Isoch and Bulk pipes. NDIS packets may also contain out-of-band (OOB) data as well as the data that goes across the network.
A Remote NDIS device transfers NDIS packets, encapsulated as REMOTE_NDIS_PACKET_MSG across the data channel. Both connectionless (such as 802.3) and connection-oriented (such as ATM) devices use the same packet message structure to facilitate common code for packet processing. Each REMOTE_NDIS_PACKET_MSG message contains information about a single network data unit (such s an Ethernet 802.3 frame).
For more information about out-of-band packet data or per-packet-info data, see the Windows 2000 DDK NDIS sections.
Requirements
Version |
Available in Microsoft Windows XP and later versions of the Windows operating systems. Also available in Windows 2000 as redistributable binaries. |
Header |
Rndis.h (include Rndis.h) |