40 #define RNDIS_MAC_ADDR "02-00-00-12-34-02"
44#ifndef RNDIS_VENDOR_DESCRIPTION
45 #define RNDIS_VENDOR_DESCRIPTION "Unknown"
49#define RNDIS_MAJOR_VERSION 1
50#define RNDIS_MINOR_VERSION 0
53#define RNDIS_MAX_TRANSFER_SIZE 2048
56#define RNDIS_PACKET_MSG 0x00000001
57#define RNDIS_INITIALIZE_MSG 0x00000002
58#define RNDIS_INITIALIZE_CMPLT 0x80000002
59#define RNDIS_HALT_MSG 0x00000003
60#define RNDIS_QUERY_MSG 0x00000004
61#define RNDIS_QUERY_CMPLT 0x80000004
62#define RNDIS_SET_MSG 0x00000005
63#define RNDIS_SET_CMPLT 0x80000005
64#define RNDIS_RESET_MSG 0x00000006
65#define RNDIS_RESET_CMPLT 0x80000006
66#define RNDIS_INDICATE_STATUS_MSG 0x00000007
67#define RNDIS_KEEPALIVE_MSG 0x00000008
68#define RNDIS_KEEPALIVE_CMPLT 0x80000008
71#define RNDIS_NOTIFICATION_RESP_AVAILABLE 0x00000001
74#define RNDIS_STATUS_SUCCESS 0x00000000
75#define RNDIS_STATUS_FAILURE 0xC0000001
76#define RNDIS_STATUS_INVALID_DATA 0xC0010015
77#define RNDIS_STATUS_NOT_SUPPORTED 0xC00000BB
78#define RNDIS_STATUS_MEDIA_CONNECT 0x4001000B
79#define RNDIS_STATUS_MEDIA_DISCONNECT 0x4001000C
82#define RNDIS_DF_CONNECTIONLESS 0x00000001
83#define RNDIS_DF_CONNECTION_ORIENTED 0x00000002
86#define RNDIS_MEDIUM_802_3 0x00000000
89#define OID_GEN_SUPPORTED_LIST 0x00010101
90#define OID_GEN_HARDWARE_STATUS 0x00010102
91#define OID_GEN_MEDIA_SUPPORTED 0x00010103
92#define OID_GEN_MEDIA_IN_USE 0x00010104
93#define OID_GEN_MAXIMUM_LOOKAHEAD 0x00010105
94#define OID_GEN_MAXIMUM_FRAME_SIZE 0x00010106
95#define OID_GEN_LINK_SPEED 0x00010107
96#define OID_GEN_TRANSMIT_BUFFER_SPACE 0x00010108
97#define OID_GEN_RECEIVE_BUFFER_SPACE 0x00010109
98#define OID_GEN_TRANSMIT_BLOCK_SIZE 0x0001010A
99#define OID_GEN_RECEIVE_BLOCK_SIZE 0x0001010B
100#define OID_GEN_VENDOR_ID 0x0001010C
101#define OID_GEN_VENDOR_DESCRIPTION 0x0001010D
102#define OID_GEN_CURRENT_PACKET_FILTER 0x0001010E
103#define OID_GEN_CURRENT_LOOKAHEAD 0x0001010F
104#define OID_GEN_DRIVER_VERSION 0x00010110
105#define OID_GEN_MAXIMUM_TOTAL_SIZE 0x00010111
106#define OID_GEN_PROTOCOL_OPTIONS 0x00010112
107#define OID_GEN_MAC_OPTIONS 0x00010113
108#define OID_GEN_MEDIA_CONNECT_STATUS 0x00010114
109#define OID_GEN_MAXIMUM_SEND_PACKETS 0x00010115
110#define OID_GEN_VENDOR_DRIVER_VERSION 0x00010116
111#define OID_GEN_SUPPORTED_GUIDS 0x00010117
112#define OID_GEN_NETWORK_LAYER_ADDRESSES 0x00010118
113#define OID_GEN_TRANSPORT_HEADER_OFFSET 0x00010119
114#define OID_GEN_MACHINE_NAME 0x0001021A
115#define OID_GEN_RNDIS_CONFIG_PARAMETER 0x0001021B
116#define OID_GEN_VLAN_ID 0x0001021C
119#define OID_GEN_MEDIA_CAPABILITIES 0x00010201
120#define OID_GEN_PHYSICAL_MEDIUM 0x00010202
123#define OID_GEN_XMIT_OK 0x00020101
124#define OID_GEN_RCV_OK 0x00020102
125#define OID_GEN_XMIT_ERROR 0x00020103
126#define OID_GEN_RCV_ERROR 0x00020104
127#define OID_GEN_RCV_NO_BUFFER 0x00020105
130#define OID_GEN_DIRECTED_BYTES_XMIT 0x00020201
131#define OID_GEN_DIRECTED_FRAMES_XMIT 0x00020202
132#define OID_GEN_MULTICAST_BYTES_XMIT 0x00020203
133#define OID_GEN_MULTICAST_FRAMES_XMIT 0x00020204
134#define OID_GEN_BROADCAST_BYTES_XMIT 0x00020205
135#define OID_GEN_BROADCAST_FRAMES_XMIT 0x00020206
136#define OID_GEN_DIRECTED_BYTES_RCV 0x00020207
137#define OID_GEN_DIRECTED_FRAMES_RCV 0x00020208
138#define OID_GEN_MULTICAST_BYTES_RCV 0x00020209
139#define OID_GEN_MULTICAST_FRAMES_RCV 0x0002020A
140#define OID_GEN_BROADCAST_BYTES_RCV 0x0002020B
141#define OID_GEN_BROADCAST_FRAMES_RCV 0x0002020C
142#define OID_GEN_RCV_CRC_ERROR 0x0002020D
143#define OID_GEN_TRANSMIT_QUEUE_LENGTH 0x0002020E
146#define OID_802_3_PERMANENT_ADDRESS 0x01010101
147#define OID_802_3_CURRENT_ADDRESS 0x01010102
148#define OID_802_3_MULTICAST_LIST 0x01010103
149#define OID_802_3_MAXIMUM_LIST_SIZE 0x01010104
150#define OID_802_3_MAC_OPTIONS 0x01010105
151#define OID_802_3_RCV_ERROR_ALIGNMENT 0x01020101
152#define OID_802_3_XMIT_ONE_COLLISION 0x01020102
153#define OID_802_3_XMIT_MORE_COLLISIONS 0x01020103
154#define OID_802_3_XMIT_DEFERRED 0x01020201
155#define OID_802_3_XMIT_MAX_COLLISIONS 0x01020202
156#define OID_802_3_RCV_OVERRUN 0x01020203
157#define OID_802_3_XMIT_UNDERRUN 0x01020204
158#define OID_802_3_XMIT_HEARTBEAT_FAILURE 0x01020205
159#define OID_802_3_XMIT_TIMES_CRS_LOST 0x01020206
160#define OID_802_3_XMIT_LATE_COLLISIONS 0x01020207
163#define RNDIS_HARDWARE_STATUS_READY 0x00000000
164#define RNDIS_HARDWARE_STATUS_INITIALIZING 0x00000001
165#define RNDIS_HARDWARE_STATUS_RESET 0x00000002
166#define RNDIS_HARDWARE_STATUS_CLOSING 0x00000003
167#define RNDIS_HARDWARE_STATUS_NOT_READY 0x00000004
170#define RNDIS_MEDIUM_802_3 0x00000000
173#define RNDIS_MEDIA_STATE_CONNECTED 0x00000000
174#define RNDIS_MEDIA_STATE_DISCONNECTED 0x00000001
177#define RNDIS_PACKET_TYPE_DIRECTED 0x00000001
178#define RNDIS_PACKET_TYPE_MULTICAST 0x00000002
179#define RNDIS_PACKET_TYPE_ALL_MULTICAST 0x00000004
180#define RNDIS_PACKET_TYPE_BROADCAST 0x00000008
181#define RNDIS_PACKET_TYPE_SOURCE_ROUTING 0x00000010
182#define RNDIS_PACKET_TYPE_PROMISCUOUS 0x00000020
183#define RNDIS_PACKET_TYPE_SMT 0x00000040
184#define RNDIS_PACKET_TYPE_ALL_LOCAL 0x00000080
185#define RNDIS_PACKET_TYPE_GROUP 0x00000100
186#define RNDIS_PACKET_TYPE_ALL_FUNCTIONAL 0x00000200
187#define RNDIS_PACKET_TYPE_FUNCTIONAL 0x00000400
188#define RNDIS_PACKET_TYPE_MAC_FRAME 0x00000800
197 RNDIS_STATE_UNINITIALIZED = 0,
198 RNDIS_STATE_BUS_INITIALIZED = 1,
199 RNDIS_STATE_INITIALIZED = 2,
200 RNDIS_STATE_DATA_INITIALIZED = 3
210 uint32_t messageType;
211 uint32_t messageLength;
221 uint32_t messageType;
222 uint32_t messageLength;
224 uint32_t majorVersion;
225 uint32_t minorVersion;
226 uint32_t maxTransferSize;
236 uint32_t messageType;
237 uint32_t messageLength;
248 uint32_t messageType;
249 uint32_t messageLength;
252 uint32_t infoBufferLength;
253 uint32_t infoBufferOffset;
255 uint8_t oidInputBuffer[];
265 uint32_t messageType;
266 uint32_t messageLength;
269 uint32_t infoBufferLength;
270 uint32_t infoBufferOffset;
272 uint8_t oidInputBuffer[];
282 uint32_t messageType;
283 uint32_t messageLength;
294 uint32_t messageType;
295 uint32_t messageLength;
297 uint32_t statusBufferLength;
298 uint32_t statusBufferOffset;
299 uint8_t diagnosticInfoBuffer[];
310 uint32_t errorOffset;
320 uint32_t messageType;
321 uint32_t messageLength;
332 uint32_t messageType;
333 uint32_t messageLength;
336 uint32_t majorVersion;
337 uint32_t minorVersion;
338 uint32_t deviceFlags;
340 uint32_t maxPacketsPerTransfer;
341 uint32_t maxTransferSize;
342 uint32_t packetAlignmentFactor;
343 uint32_t afListOffset;
354 uint32_t messageType;
355 uint32_t messageLength;
358 uint32_t infoBufferLength;
359 uint32_t infoBufferOffset;
360 uint8_t oidInputBuffer[];
370 uint32_t messageType;
371 uint32_t messageLength;
383 uint32_t messageType;
384 uint32_t messageLength;
386 uint32_t addressingReset;
396 uint32_t messageType;
397 uint32_t messageLength;
409 uint32_t messageType;
410 uint32_t messageLength;
413 uint32_t oobDataOffset;
414 uint32_t oobDataLength;
415 uint32_t numOobDataElements;
416 uint32_t perPacketInfoOffset;
417 uint32_t perPacketInfoLength;
432 uint32_t classInfoOffset;
445 uint32_t perPacketInfoOffset;
446 uint8_t perPacketData[];
456 uint32_t notification;
472 uint32_t packetFilter;
473 uint8_t rxBuffer[RNDIS_MAX_TRANSFER_SIZE];
475 uint8_t encapsulatedResp[RNDIS_MAX_TRANSFER_SIZE];
476 size_t encapsulatedRespLen;
478 uint32_t data[512 / 4];
497error_t rndisFormatHaltMsg(
void);
498error_t rndisFormatIndicateStatusMsg(uint32_t status);
500error_t rndisFormatInitializeCmplt(uint32_t requestId);
501error_t rndisFormatQueryCmplt(uint32_t requestId, uint32_t status, uint32_t length);
502error_t rndisFormatSetCmplt(uint32_t requestId, uint32_t status);
503error_t rndisFormatResetCmplt(
void);
504error_t rndisFormatKeepAliveCmplt(uint32_t requestId);
506error_t rndisSendNotification(uint32_t notification);
error_t
Error codes.
Definition error.h:43
RndisState
RNDIS states.
Definition rndis.h:196
RNDIS context.
Definition rndis.h:466
Diagnostic information.
Definition rndis.h:308
RNDIS Halt message.
Definition rndis.h:235
RNDIS Indicate Status message.
Definition rndis.h:293
Response to a RNDIS Initialize message.
Definition rndis.h:331
RNDIS Initialize message.
Definition rndis.h:220
Response to a RNDIS Keep-Alive message.
Definition rndis.h:395
RNDIS Keep-Alive message.
Definition rndis.h:319
Generic RNDIS message.
Definition rndis.h:209
Device notification message.
Definition rndis.h:455
Out-of-band data record.
Definition rndis.h:429
RNDIS Packet message.
Definition rndis.h:408
Per-packet information data record.
Definition rndis.h:442
Response to a RNDIS Query message.
Definition rndis.h:353
RNDIS Query message.
Definition rndis.h:247
Response to a RNDIS Reset message.
Definition rndis.h:382
RNDIS Reset message.
Definition rndis.h:281
Response to a RNDIS Set message.
Definition rndis.h:369
RNDIS Set message.
Definition rndis.h:264