33#ifndef _TUSB_CDC_RNDIS_H_
34#define _TUSB_CDC_RNDIS_H_
43#pragma diag_suppress 66
83#pragma diag_default 66
116 uint32_t reserved[2] ;
130 uint8_t oid_buffer[] ;
133TU_VERIFY_STATIC(
sizeof(
rndis_msg_query_t) == 28,
"Make sure flexible array member does not affect layout");
144 uint8_t oid_buffer[] ;
147TU_VERIFY_STATIC(
sizeof(
rndis_msg_query_cmplt_t) == 24,
"Make sure flexible array member does not affect layout");
183 uint32_t request_id ;
207 uint32_t reserved[2] ;
208 uint32_t payload[0] ;
243 RNDIS_OID_GEN_MAXIMUM_LOOKAHEAD = 0x00010105,
266 RNDIS_OID_GEN_MEDIA_CAPABILITIES = 0x00010201,
291 RNDIS_PACKET_TYPE_NO_LOCAL = 0x00010000,
rndis_oid_type_t
NDIS Object ID.
Definition cdc_rndis.h:237
rndis_packet_filter_type_t
RNDIS Packet Filter Bits RNDIS_OID_GEN_CURRENT_PACKET_FILTER.
Definition cdc_rndis.h:278
rndis_msg_status_t
RNDIS Message Status Values.
Definition cdc_rndis.h:73
rndis_msg_type_t
RNDIS Message Types.
Definition cdc_rndis.h:48
@ RNDIS_OID_GEN_TRANSMIT_BUFFER_SPACE
Transmit buffer space.
Definition cdc_rndis.h:246
@ RNDIS_OID_GEN_CURRENT_PACKET_FILTER
Current packet filter (encoded)
Definition cdc_rndis.h:252
@ RNDIS_OID_GEN_TRANSPORT_HEADER_OFFSET
Size of packets' additional headers.
Definition cdc_rndis.h:265
@ RNDIS_OID_GEN_MAXIMUM_TOTAL_SIZE
Maximum total packet length in bytes.
Definition cdc_rndis.h:255
@ RNDIS_OID_GEN_LINK_SPEED
Link speed in units of 100 bps.
Definition cdc_rndis.h:245
@ RNDIS_OID_GEN_VENDOR_ID
Vendor NIC code.
Definition cdc_rndis.h:250
@ RNDIS_OID_GEN_MEDIA_SUPPORTED
Media types supported (encoded)
Definition cdc_rndis.h:241
@ RNDIS_OID_GEN_CURRENT_LOOKAHEAD
Current lookahead size in bytes.
Definition cdc_rndis.h:253
@ RNDIS_OID_GEN_PHYSICAL_MEDIUM
Physical media supported by the miniport driver (encoded)
Definition cdc_rndis.h:267
@ RNDIS_OID_GEN_RECEIVE_BLOCK_SIZE
Amount of storage, in bytes, that a single packet occupies in the receive buffer space of the NIC.
Definition cdc_rndis.h:249
@ RNDIS_OID_GEN_VENDOR_DRIVER_VERSION
Vendor-assigned version number of the driver.
Definition cdc_rndis.h:262
@ RNDIS_OID_GEN_MAXIMUM_SEND_PACKETS
The maximum number of send packets the driver can accept per call to its MiniportSendPacketsfunction.
Definition cdc_rndis.h:259
@ RNDIS_OID_802_3_MAXIMUM_LIST_SIZE
Maximum size of multicast address list.
Definition cdc_rndis.h:273
@ RNDIS_OID_GEN_PROTOCOL_OPTIONS
Optional protocol flags (encoded)
Definition cdc_rndis.h:256
@ RNDIS_OID_GEN_DRIVER_VERSION
NDIS version number used by the driver.
Definition cdc_rndis.h:254
@ RNDIS_OID_GEN_MEDIA_CONNECT_STATUS
Whether the NIC is connected to the network.
Definition cdc_rndis.h:258
@ RNDIS_OID_GEN_TRANSMIT_BLOCK_SIZE
Minimum amount of storage, in bytes, that a single packet occupies in the transmit buffer space of th...
Definition cdc_rndis.h:248
@ RNDIS_OID_GEN_MEDIA_IN_USE
Media types in use (encoded)
Definition cdc_rndis.h:242
@ RNDIS_OID_802_3_MULTICAST_LIST
Current multicast address list.
Definition cdc_rndis.h:272
@ RNDIS_OID_GEN_MAXIMUM_FRAME_SIZE
Maximum frame size in bytes.
Definition cdc_rndis.h:244
@ RNDIS_OID_GEN_SUPPORTED_LIST
List of supported OIDs.
Definition cdc_rndis.h:239
@ RNDIS_OID_GEN_MAC_OPTIONS
Optional NIC flags (encoded)
Definition cdc_rndis.h:257
@ RNDIS_OID_GEN_SUPPORTED_GUIDS
The custom GUIDs (Globally Unique Identifier) supported by the miniport driver.
Definition cdc_rndis.h:263
@ RNDIS_OID_802_3_PERMANENT_ADDRESS
Permanent station address.
Definition cdc_rndis.h:270
@ RNDIS_OID_GEN_RECEIVE_BUFFER_SPACE
Receive buffer space.
Definition cdc_rndis.h:247
@ RNDIS_OID_GEN_HARDWARE_STATUS
Hardware status.
Definition cdc_rndis.h:240
@ RNDIS_OID_GEN_VENDOR_DESCRIPTION
Vendor network card description.
Definition cdc_rndis.h:251
@ RNDIS_OID_802_3_CURRENT_ADDRESS
Current station address.
Definition cdc_rndis.h:271
@ RNDIS_OID_GEN_NETWORK_LAYER_ADDRESSES
List of network-layer addresses associated with the binding between a transport and the driver.
Definition cdc_rndis.h:264
@ RNDIS_PACKET_TYPE_DIRECTED
Directed packets. Directed packets contain a destination address equal to the station address of the ...
Definition cdc_rndis.h:279
@ RNDIS_PACKET_TYPE_MAC_FRAME
NIC driver frames that a Token Ring NIC receives.
Definition cdc_rndis.h:290
@ RNDIS_PACKET_TYPE_ALL_LOCAL
All packets sent by installed protocols and all packets indicated by the NIC that is identified by a ...
Definition cdc_rndis.h:286
@ RNDIS_PACKET_TYPE_GROUP
Packets sent to the current group address.
Definition cdc_rndis.h:287
@ RNDIS_PACKET_TYPE_SOURCE_ROUTING
All source routing packets. If the protocol driver sets this bit, the NDIS library attempts to act as...
Definition cdc_rndis.h:283
@ RNDIS_PACKET_TYPE_ALL_FUNCTIONAL
All functional address packets, not just the ones in the current functional address.
Definition cdc_rndis.h:288
@ RNDIS_PACKET_TYPE_BROADCAST
Broadcast packets.
Definition cdc_rndis.h:282
@ RNDIS_PACKET_TYPE_MULTICAST
Multicast address packets sent to addresses in the multicast address list.
Definition cdc_rndis.h:280
@ RNDIS_PACKET_TYPE_PROMISCUOUS
Specifies all packets regardless of whether VLAN filtering is enabled or not and whether the VLAN ide...
Definition cdc_rndis.h:284
@ RNDIS_PACKET_TYPE_FUNCTIONAL
Functional address packets sent to addresses included in the current functional address.
Definition cdc_rndis.h:289
@ RNDIS_PACKET_TYPE_ALL_MULTICAST
All multicast address packets, not just the ones enumerated in the multicast address list.
Definition cdc_rndis.h:281
@ RNDIS_PACKET_TYPE_SMT
SMT packets that an FDDI NIC receives.
Definition cdc_rndis.h:285
@ RNDIS_STATUS_FAILURE
Unspecified error.
Definition cdc_rndis.h:75
@ RNDIS_STATUS_NOT_SUPPORTED
Unsupported request error.
Definition cdc_rndis.h:77
@ RNDIS_STATUS_SUCCESS
Success.
Definition cdc_rndis.h:74
@ RNDIS_STATUS_MEDIA_DISCONNECT
Device is disconnected from the medium.
Definition cdc_rndis.h:79
@ RNDIS_STATUS_MEDIA_CONNECT
Device is connected to a network medium.
Definition cdc_rndis.h:78
@ RNDIS_STATUS_INVALID_DATA
Invalid data error.
Definition cdc_rndis.h:76
@ RNDIS_MSG_PACKET
The host and device use this to send network data to one another.
Definition cdc_rndis.h:49
@ RNDIS_MSG_INITIALIZE_CMPLT
Device response to an initialize message.
Definition cdc_rndis.h:52
@ RNDIS_MSG_RESET
Sent by the host to perform a soft reset on the device.
Definition cdc_rndis.h:62
@ RNDIS_MSG_QUERY
Sent by the host to send a query OID.
Definition cdc_rndis.h:56
@ RNDIS_MSG_RESET_CMPLT
Device response to reset message.
Definition cdc_rndis.h:63
@ RNDIS_MSG_KEEP_ALIVE
During idle periods, sent every few seconds by the host to check that the device is still responsive....
Definition cdc_rndis.h:67
@ RNDIS_MSG_QUERY_CMPLT
Device response to a query OID.
Definition cdc_rndis.h:57
@ RNDIS_MSG_SET_CMPLT
Device response to a set OID.
Definition cdc_rndis.h:60
@ RNDIS_MSG_INDICATE_STATUS
Sent by the device to indicate its status or an error when an unrecognized message is received.
Definition cdc_rndis.h:65
@ RNDIS_MSG_KEEP_ALIVE_CMPLT
The device response to a keepalivemessage. The host can respond with this message to a keepalive mess...
Definition cdc_rndis.h:68
@ RNDIS_MSG_HALT
Sent by the host to halt the device. This does not have a response. It is optional for the device to ...
Definition cdc_rndis.h:54
@ RNDIS_MSG_INITIALIZE
Sent by the host to initialize the device.
Definition cdc_rndis.h:51
@ RNDIS_MSG_SET
Sent by the host to send a set OID.
Definition cdc_rndis.h:59
Initialize Complete Message.
Definition cdc_rndis.h:104
uint32_t type
Message Type, must be RNDIS_MSG_INITIALIZE_CMPLT.
Definition cdc_rndis.h:105
uint32_t major_version
the highest-numbered RNDIS Protocol version supported by the device.
Definition cdc_rndis.h:109
uint32_t status
The initialization status of the device, has value from rndis_msg_status_t.
Definition cdc_rndis.h:108
uint32_t max_xfer_size
The maximum size, in bytes, of any single bus data transfer that the device expects to receive from t...
Definition cdc_rndis.h:114
uint32_t minor_version
the highest-numbered RNDIS Protocol version supported by the device.
Definition cdc_rndis.h:110
uint32_t request_id
A 32-bit integer value from request_id field of the rndis_msg_initialize_t to which this message is a...
Definition cdc_rndis.h:107
uint32_t max_packet_per_xfer
The maximum number of concatenated RNDIS_MSG_PACKET messages that the device can handle in a single b...
Definition cdc_rndis.h:113
uint32_t packet_alignment_factor
The byte alignment the device expects for each RNDIS message that is part of a multimessage transfer ...
Definition cdc_rndis.h:115
uint32_t length
Message length in bytes, must be 0x30.
Definition cdc_rndis.h:106
uint32_t device_flags
MUST be set to 0x000000010. Other values are reserved for future use.
Definition cdc_rndis.h:111
uint32_t medium
is 0x00 for RNDIS_MEDIUM_802_3
Definition cdc_rndis.h:112
Initialize Message.
Definition cdc_rndis.h:93
uint32_t max_xfer_size
The maximum size, in bytes, of any single bus data transfer that the host expects to receive from the...
Definition cdc_rndis.h:99
uint32_t request_id
A 32-bit integer value, generated by the host, used to match the host's sent request to the response ...
Definition cdc_rndis.h:96
uint32_t length
Message length in bytes, must be 0x18.
Definition cdc_rndis.h:95
uint32_t type
Message type, must be RNDIS_MSG_INITIALIZE.
Definition cdc_rndis.h:94
uint32_t minor_version
The minor version of the RNDIS Protocol implemented by the host.
Definition cdc_rndis.h:98
uint32_t major_version
The major version of the RNDIS Protocol implemented by the host.
Definition cdc_rndis.h:97
Keep Alive Message.
Definition cdc_rndis.h:180
uint32_t length
Message length in bytes, MUST be 0x10.
Definition cdc_rndis.h:182
uint32_t type
Message Type.
Definition cdc_rndis.h:181
Definition cdc_rndis.h:224
uint32_t size
Length, in bytes, of this header and appended data and padding. This value MUST be an integer multipl...
Definition cdc_rndis.h:225
uint32_t offset
The byte offset from the beginning of this record to the beginning of data.
Definition cdc_rndis.h:227
uint32_t type
MUST be as per host operating system specification.
Definition cdc_rndis.h:226
Packet Data Message.
Definition cdc_rndis.h:197
uint32_t per_packet_info_length
Specifies, in bytes, the total length of per-packetinformation contained in this message.
Definition cdc_rndis.h:206
uint32_t type
Message Type, must be RNDIS_MSG_PACKET.
Definition cdc_rndis.h:198
uint32_t out_of_band_data_length
Specifies, in bytes, the total length of the out-of-band data.
Definition cdc_rndis.h:203
uint32_t per_packet_info_offset
Specifies the offset, in bytes, of the start of per-packet-info data record from the start of the dat...
Definition cdc_rndis.h:205
uint32_t num_out_of_band_data_elements
Specifies the number of out-of-band records in this message.
Definition cdc_rndis.h:204
uint32_t data_length
Specifies the number of bytes in the payload of this message.
Definition cdc_rndis.h:201
uint32_t data_offset
Specifies the offset, in bytes, from the start of this data_offset field of this message to the start...
Definition cdc_rndis.h:200
uint32_t length
Message length in bytes, The total length of this RNDIS message including the header,...
Definition cdc_rndis.h:199
uint32_t out_of_band_data_offet
Specifies the offset, in bytes, of the first out-of-band data record from the start of the DataOffset...
Definition cdc_rndis.h:202
Query Complete Message.
Definition cdc_rndis.h:137
uint32_t buffer_offset
The offset, in bytes, from the beginning of request_id field where the response data for the query is...
Definition cdc_rndis.h:143
uint32_t status
The status of processing for the query request, has value from rndis_msg_status_t.
Definition cdc_rndis.h:141
uint32_t type
Message Type, must be RNDIS_MSG_QUERY_CMPLT.
Definition cdc_rndis.h:138
uint32_t buffer_length
The length, in bytes, of the data in the response to the query. This MUST be set to 0 when there is n...
Definition cdc_rndis.h:142
uint32_t request_id
A 32-bit integer value from request_id field of the rndis_msg_query_t to which this message is a resp...
Definition cdc_rndis.h:140
uint32_t length
Message length in bytes, including the header and the oid_buffer.
Definition cdc_rndis.h:139
Query Message.
Definition cdc_rndis.h:122
uint32_t request_id
A 32-bit integer value, generated by the host, used to match the host's sent request to the response ...
Definition cdc_rndis.h:125
uint32_t type
Message Type, must be RNDIS_MSG_QUERY.
Definition cdc_rndis.h:123
uint32_t oid
The integer value of the host operating system-defined identifier, for the parameter of the device be...
Definition cdc_rndis.h:126
uint32_t buffer_offset
The offset, in bytes, from the beginning of request_id field where the input data for the query is lo...
Definition cdc_rndis.h:128
uint32_t buffer_length
The length, in bytes, of the input data required for the OID query. This MUST be set to 0 when there ...
Definition cdc_rndis.h:127
uint32_t length
Message length in bytes, including the header and the oid_buffer.
Definition cdc_rndis.h:124
Reset Complete Message.
Definition cdc_rndis.h:160
uint32_t type
Message Type, must be RNDIS_MSG_RESET_CMPLT.
Definition cdc_rndis.h:161
uint32_t length
Message length in bytes, MUST be 0x10.
Definition cdc_rndis.h:162
uint32_t status
The status of processing for the rndis_msg_reset_t, has value from rndis_msg_status_t.
Definition cdc_rndis.h:163
uint32_t addressing_reset
This field indicates whether the addressing information, which is the multicast address list or packe...
Definition cdc_rndis.h:164
Reset Message.
Definition cdc_rndis.h:152
uint32_t type
Message Type, must be RNDIS_MSG_RESET.
Definition cdc_rndis.h:153
uint32_t length
Message length in bytes, MUST be 0x06.
Definition cdc_rndis.h:154
Set Complete Message.
Definition cdc_rndis.h:188
uint32_t status
The status of processing for the request message request by the device to which this message is the r...
Definition cdc_rndis.h:192
uint32_t length
Message length in bytes, MUST be 0x10.
Definition cdc_rndis.h:190
uint32_t request_id
must be the same as requesting message
Definition cdc_rndis.h:191
uint32_t type
Message Type.
Definition cdc_rndis.h:189