Go to the documentation of this file.
39 #ifndef RNDIS_MAC_ADDR
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
255 uint8_t oidInputBuffer[];
272 uint8_t oidInputBuffer[];
299 uint8_t diagnosticInfoBuffer[];
360 uint8_t oidInputBuffer[];
446 uint8_t perPacketData[];
Response to a RNDIS Initialize message.
uint32_t numOobDataElements
size_t encapsulatedRespLen
uint32_t perPacketInfoOffset
error_t rndisFormatHaltMsg(void)
Format RNDIS Halt message.
error_t rndisFormatKeepAliveCmplt(uint32_t requestId)
Format RNDIS Keep-Alive Cmplt message.
RNDIS Indicate Status message.
error_t rndisProcessSetMsg(const RndisSetMsg *message, size_t length)
Process RNDIS Set message.
Response to a RNDIS Query message.
error_t rndisProcessInitializeMsg(const RndisInitializeMsg *message, size_t length)
Process RNDIS Initialize message.
Per-packet information data record.
uint32_t maxPacketsPerTransfer
error_t rndisFormatIndicateStatusMsg(uint32_t status)
Format RNDIS Indicate Status message.
Device notification message.
error_t rndisFormatResetCmplt(void)
Format RNDIS Reset Cmplt message.
error_t rndisProcessResetMsg(const RndisResetMsg *message, size_t length)
Process RNDIS Reset message.
Response to a RNDIS Keep-Alive message.
error_t rndisFormatInitializeCmplt(uint32_t requestId)
Format RNDIS Initialize Cmplt message.
error_t rndisProcessKeepAliveMsg(const RndisKeepAliveMsg *message, size_t length)
Process RNDIS Keep-Alive message.
uint32_t packetAlignmentFactor
error_t rndisProcessQueryMsg(const RndisQueryMsg *message, size_t length)
Process RNDIS Query message.
Response to a RNDIS Set message.
RNDIS Initialize message.
error_t rndisProcessMsg(const RndisMsg *message, size_t length)
Process incoming RNDIS message.
error_t rndisProcessHaltMsg(const RndisHaltMsg *message, size_t length)
Process RNDIS Halt message.
void rndisChangeState(RndisState newState)
Update RNDIS state.
error_t rndisFormatSetCmplt(uint32_t requestId, uint32_t status)
Format RNDIS Set Cmplt message.
#define RNDIS_MAX_TRANSFER_SIZE
uint32_t infoBufferLength
uint32_t infoBufferLength
error_t rndisFormatQueryCmplt(uint32_t requestId, uint32_t status, uint32_t length)
Format RNDIS Query Cmplt message.
uint32_t perPacketInfoLength
RndisContext rndisContext
@ RNDIS_STATE_INITIALIZED
uint32_t infoBufferOffset
uint32_t infoBufferOffset
uint32_t infoBufferOffset
@ RNDIS_STATE_UNINITIALIZED
Response to a RNDIS Reset message.
uint32_t infoBufferLength
@ RNDIS_STATE_DATA_INITIALIZED
uint32_t perPacketInfoOffset
uint32_t statusBufferLength
RNDIS Keep-Alive message.
@ RNDIS_STATE_BUS_INITIALIZED
error_t rndisSendNotification(uint32_t notification)
Send RNDIS notification message.
void rndisInit(void)
RNDIS core initialization.
uint32_t statusBufferOffset