3 * Copyright (c) 2009, Microsoft Corporation.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
16 * Place - Suite 330, Boston, MA 02111-1307 USA.
19 * Haiyang Zhang <haiyangz@microsoft.com>
20 * Hank Janssen <hjanssen@microsoft.com>
30 #ifndef STATUS_SUCCESS
31 #define STATUS_SUCCESS (0x00000000L)
34 #ifndef STATUS_UNSUCCESSFUL
35 #define STATUS_UNSUCCESSFUL (0xC0000001L)
38 #ifndef STATUS_PENDING
39 #define STATUS_PENDING (0x00000103L)
42 #ifndef STATUS_INSUFFICIENT_RESOURCES
43 #define STATUS_INSUFFICIENT_RESOURCES (0xC000009AL)
46 #ifndef STATUS_BUFFER_OVERFLOW
47 #define STATUS_BUFFER_OVERFLOW (0x80000005L)
50 #ifndef STATUS_NOT_SUPPORTED
51 #define STATUS_NOT_SUPPORTED (0xC00000BBL)
54 #define RNDIS_STATUS_SUCCESS (STATUS_SUCCESS)
55 #define RNDIS_STATUS_PENDING (STATUS_PENDING)
56 #define RNDIS_STATUS_NOT_RECOGNIZED (0x00010001L)
57 #define RNDIS_STATUS_NOT_COPIED (0x00010002L)
58 #define RNDIS_STATUS_NOT_ACCEPTED (0x00010003L)
59 #define RNDIS_STATUS_CALL_ACTIVE (0x00010007L)
61 #define RNDIS_STATUS_ONLINE (0x40010003L)
62 #define RNDIS_STATUS_RESET_START (0x40010004L)
63 #define RNDIS_STATUS_RESET_END (0x40010005L)
64 #define RNDIS_STATUS_RING_STATUS (0x40010006L)
65 #define RNDIS_STATUS_CLOSED (0x40010007L)
66 #define RNDIS_STATUS_WAN_LINE_UP (0x40010008L)
67 #define RNDIS_STATUS_WAN_LINE_DOWN (0x40010009L)
68 #define RNDIS_STATUS_WAN_FRAGMENT (0x4001000AL)
69 #define RNDIS_STATUS_MEDIA_CONNECT (0x4001000BL)
70 #define RNDIS_STATUS_MEDIA_DISCONNECT (0x4001000CL)
71 #define RNDIS_STATUS_HARDWARE_LINE_UP (0x4001000DL)
72 #define RNDIS_STATUS_HARDWARE_LINE_DOWN (0x4001000EL)
73 #define RNDIS_STATUS_INTERFACE_UP (0x4001000FL)
74 #define RNDIS_STATUS_INTERFACE_DOWN (0x40010010L)
75 #define RNDIS_STATUS_MEDIA_BUSY (0x40010011L)
76 #define RNDIS_STATUS_MEDIA_SPECIFIC_INDICATION (0x40010012L)
77 #define RNDIS_STATUS_WW_INDICATION RDIA_SPECIFIC_INDICATION
78 #define RNDIS_STATUS_LINK_SPEED_CHANGE (0x40010013L)
80 #define RNDIS_STATUS_NOT_RESETTABLE (0x80010001L)
81 #define RNDIS_STATUS_SOFT_ERRORS (0x80010003L)
82 #define RNDIS_STATUS_HARD_ERRORS (0x80010004L)
83 #define RNDIS_STATUS_BUFFER_OVERFLOW (STATUS_BUFFER_OVERFLOW)
85 #define RNDIS_STATUS_FAILURE (STATUS_UNSUCCESSFUL)
86 #define RNDIS_STATUS_RESOURCES (STATUS_INSUFFICIENT_RESOURCES)
87 #define RNDIS_STATUS_CLOSING (0xC0010002L)
88 #define RNDIS_STATUS_BAD_VERSION (0xC0010004L)
89 #define RNDIS_STATUS_BAD_CHARACTERISTICS (0xC0010005L)
90 #define RNDIS_STATUS_ADAPTER_NOT_FOUND (0xC0010006L)
91 #define RNDIS_STATUS_OPEN_FAILED (0xC0010007L)
92 #define RNDIS_STATUS_DEVICE_FAILED (0xC0010008L)
93 #define RNDIS_STATUS_MULTICAST_FULL (0xC0010009L)
94 #define RNDIS_STATUS_MULTICAST_EXISTS (0xC001000AL)
95 #define RNDIS_STATUS_MULTICAST_NOT_FOUND (0xC001000BL)
96 #define RNDIS_STATUS_REQUEST_ABORTED (0xC001000CL)
97 #define RNDIS_STATUS_RESET_IN_PROGRESS (0xC001000DL)
98 #define RNDIS_STATUS_CLOSING_INDICATING (0xC001000EL)
99 #define RNDIS_STATUS_NOT_SUPPORTED (STATUS_NOT_SUPPORTED)
100 #define RNDIS_STATUS_INVALID_PACKET (0xC001000FL)
101 #define RNDIS_STATUS_OPEN_LIST_FULL (0xC0010010L)
102 #define RNDIS_STATUS_ADAPTER_NOT_READY (0xC0010011L)
103 #define RNDIS_STATUS_ADAPTER_NOT_OPEN (0xC0010012L)
104 #define RNDIS_STATUS_NOT_INDICATING (0xC0010013L)
105 #define RNDIS_STATUS_INVALID_LENGTH (0xC0010014L)
106 #define RNDIS_STATUS_INVALID_DATA (0xC0010015L)
107 #define RNDIS_STATUS_BUFFER_TOO_SHORT (0xC0010016L)
108 #define RNDIS_STATUS_INVALID_OID (0xC0010017L)
109 #define RNDIS_STATUS_ADAPTER_REMOVED (0xC0010018L)
110 #define RNDIS_STATUS_UNSUPPORTED_MEDIA (0xC0010019L)
111 #define RNDIS_STATUS_GROUP_ADDRESS_IN_USE (0xC001001AL)
112 #define RNDIS_STATUS_FILE_NOT_FOUND (0xC001001BL)
113 #define RNDIS_STATUS_ERROR_READING_FILE (0xC001001CL)
114 #define RNDIS_STATUS_ALREADY_MAPPED (0xC001001DL)
115 #define RNDIS_STATUS_RESOURCE_CONFLICT (0xC001001EL)
116 #define RNDIS_STATUS_NO_CABLE (0xC001001FL)
118 #define RNDIS_STATUS_INVALID_SAP (0xC0010020L)
119 #define RNDIS_STATUS_SAP_IN_USE (0xC0010021L)
120 #define RNDIS_STATUS_INVALID_ADDRESS (0xC0010022L)
121 #define RNDIS_STATUS_VC_NOT_ACTIVATED (0xC0010023L)
122 #define RNDIS_STATUS_DEST_OUT_OF_ORDER (0xC0010024L)
123 #define RNDIS_STATUS_VC_NOT_AVAILABLE (0xC0010025L)
124 #define RNDIS_STATUS_CELLRATE_NOT_AVAILABLE (0xC0010026L)
125 #define RNDIS_STATUS_INCOMPATABLE_QOS (0xC0010027L)
126 #define RNDIS_STATUS_AAL_PARAMS_UNSUPPORTED (0xC0010028L)
127 #define RNDIS_STATUS_NO_ROUTE_TO_DESTINATION (0xC0010029L)
129 #define RNDIS_STATUS_TOKEN_RING_OPEN_ERROR (0xC0011000L)
131 /* Object Identifiers used by NdisRequest Query/Set Information */
132 /* General Objects */
133 #define RNDIS_OID_GEN_SUPPORTED_LIST 0x00010101
134 #define RNDIS_OID_GEN_HARDWARE_STATUS 0x00010102
135 #define RNDIS_OID_GEN_MEDIA_SUPPORTED 0x00010103
136 #define RNDIS_OID_GEN_MEDIA_IN_USE 0x00010104
137 #define RNDIS_OID_GEN_MAXIMUM_LOOKAHEAD 0x00010105
138 #define RNDIS_OID_GEN_MAXIMUM_FRAME_SIZE 0x00010106
139 #define RNDIS_OID_GEN_LINK_SPEED 0x00010107
140 #define RNDIS_OID_GEN_TRANSMIT_BUFFER_SPACE 0x00010108
141 #define RNDIS_OID_GEN_RECEIVE_BUFFER_SPACE 0x00010109
142 #define RNDIS_OID_GEN_TRANSMIT_BLOCK_SIZE 0x0001010A
143 #define RNDIS_OID_GEN_RECEIVE_BLOCK_SIZE 0x0001010B
144 #define RNDIS_OID_GEN_VENDOR_ID 0x0001010C
145 #define RNDIS_OID_GEN_VENDOR_DESCRIPTION 0x0001010D
146 #define RNDIS_OID_GEN_CURRENT_PACKET_FILTER 0x0001010E
147 #define RNDIS_OID_GEN_CURRENT_LOOKAHEAD 0x0001010F
148 #define RNDIS_OID_GEN_DRIVER_VERSION 0x00010110
149 #define RNDIS_OID_GEN_MAXIMUM_TOTAL_SIZE 0x00010111
150 #define RNDIS_OID_GEN_PROTOCOL_OPTIONS 0x00010112
151 #define RNDIS_OID_GEN_MAC_OPTIONS 0x00010113
152 #define RNDIS_OID_GEN_MEDIA_CONNECT_STATUS 0x00010114
153 #define RNDIS_OID_GEN_MAXIMUM_SEND_PACKETS 0x00010115
154 #define RNDIS_OID_GEN_VENDOR_DRIVER_VERSION 0x00010116
155 #define RNDIS_OID_GEN_NETWORK_LAYER_ADDRESSES 0x00010118
156 #define RNDIS_OID_GEN_TRANSPORT_HEADER_OFFSET 0x00010119
157 #define RNDIS_OID_GEN_MACHINE_NAME 0x0001021A
158 #define RNDIS_OID_GEN_RNDIS_CONFIG_PARAMETER 0x0001021B
160 #define RNDIS_OID_GEN_XMIT_OK 0x00020101
161 #define RNDIS_OID_GEN_RCV_OK 0x00020102
162 #define RNDIS_OID_GEN_XMIT_ERROR 0x00020103
163 #define RNDIS_OID_GEN_RCV_ERROR 0x00020104
164 #define RNDIS_OID_GEN_RCV_NO_BUFFER 0x00020105
166 #define RNDIS_OID_GEN_DIRECTED_BYTES_XMIT 0x00020201
167 #define RNDIS_OID_GEN_DIRECTED_FRAMES_XMIT 0x00020202
168 #define RNDIS_OID_GEN_MULTICAST_BYTES_XMIT 0x00020203
169 #define RNDIS_OID_GEN_MULTICAST_FRAMES_XMIT 0x00020204
170 #define RNDIS_OID_GEN_BROADCAST_BYTES_XMIT 0x00020205
171 #define RNDIS_OID_GEN_BROADCAST_FRAMES_XMIT 0x00020206
172 #define RNDIS_OID_GEN_DIRECTED_BYTES_RCV 0x00020207
173 #define RNDIS_OID_GEN_DIRECTED_FRAMES_RCV 0x00020208
174 #define RNDIS_OID_GEN_MULTICAST_BYTES_RCV 0x00020209
175 #define RNDIS_OID_GEN_MULTICAST_FRAMES_RCV 0x0002020A
176 #define RNDIS_OID_GEN_BROADCAST_BYTES_RCV 0x0002020B
177 #define RNDIS_OID_GEN_BROADCAST_FRAMES_RCV 0x0002020C
179 #define RNDIS_OID_GEN_RCV_CRC_ERROR 0x0002020D
180 #define RNDIS_OID_GEN_TRANSMIT_QUEUE_LENGTH 0x0002020E
182 #define RNDIS_OID_GEN_GET_TIME_CAPS 0x0002020F
183 #define RNDIS_OID_GEN_GET_NETCARD_TIME 0x00020210
185 /* These are connection-oriented general OIDs. */
186 /* These replace the above OIDs for connection-oriented media. */
187 #define RNDIS_OID_GEN_CO_SUPPORTED_LIST 0x00010101
188 #define RNDIS_OID_GEN_CO_HARDWARE_STATUS 0x00010102
189 #define RNDIS_OID_GEN_CO_MEDIA_SUPPORTED 0x00010103
190 #define RNDIS_OID_GEN_CO_MEDIA_IN_USE 0x00010104
191 #define RNDIS_OID_GEN_CO_LINK_SPEED 0x00010105
192 #define RNDIS_OID_GEN_CO_VENDOR_ID 0x00010106
193 #define RNDIS_OID_GEN_CO_VENDOR_DESCRIPTION 0x00010107
194 #define RNDIS_OID_GEN_CO_DRIVER_VERSION 0x00010108
195 #define RNDIS_OID_GEN_CO_PROTOCOL_OPTIONS 0x00010109
196 #define RNDIS_OID_GEN_CO_MAC_OPTIONS 0x0001010A
197 #define RNDIS_OID_GEN_CO_MEDIA_CONNECT_STATUS 0x0001010B
198 #define RNDIS_OID_GEN_CO_VENDOR_DRIVER_VERSION 0x0001010C
199 #define RNDIS_OID_GEN_CO_MINIMUM_LINK_SPEED 0x0001010D
201 #define RNDIS_OID_GEN_CO_GET_TIME_CAPS 0x00010201
202 #define RNDIS_OID_GEN_CO_GET_NETCARD_TIME 0x00010202
204 /* These are connection-oriented statistics OIDs. */
205 #define RNDIS_OID_GEN_CO_XMIT_PDUS_OK 0x00020101
206 #define RNDIS_OID_GEN_CO_RCV_PDUS_OK 0x00020102
207 #define RNDIS_OID_GEN_CO_XMIT_PDUS_ERROR 0x00020103
208 #define RNDIS_OID_GEN_CO_RCV_PDUS_ERROR 0x00020104
209 #define RNDIS_OID_GEN_CO_RCV_PDUS_NO_BUFFER 0x00020105
212 #define RNDIS_OID_GEN_CO_RCV_CRC_ERROR 0x00020201
213 #define RNDIS_OID_GEN_CO_TRANSMIT_QUEUE_LENGTH 0x00020202
214 #define RNDIS_OID_GEN_CO_BYTES_XMIT 0x00020203
215 #define RNDIS_OID_GEN_CO_BYTES_RCV 0x00020204
216 #define RNDIS_OID_GEN_CO_BYTES_XMIT_OUTSTANDING 0x00020205
217 #define RNDIS_OID_GEN_CO_NETCARD_LOAD 0x00020206
219 /* These are objects for Connection-oriented media call-managers. */
220 #define RNDIS_OID_CO_ADD_PVC 0xFF000001
221 #define RNDIS_OID_CO_DELETE_PVC 0xFF000002
222 #define RNDIS_OID_CO_GET_CALL_INFORMATION 0xFF000003
223 #define RNDIS_OID_CO_ADD_ADDRESS 0xFF000004
224 #define RNDIS_OID_CO_DELETE_ADDRESS 0xFF000005
225 #define RNDIS_OID_CO_GET_ADDRESSES 0xFF000006
226 #define RNDIS_OID_CO_ADDRESS_CHANGE 0xFF000007
227 #define RNDIS_OID_CO_SIGNALING_ENABLED 0xFF000008
228 #define RNDIS_OID_CO_SIGNALING_DISABLED 0xFF000009
230 /* 802.3 Objects (Ethernet) */
231 #define RNDIS_OID_802_3_PERMANENT_ADDRESS 0x01010101
232 #define RNDIS_OID_802_3_CURRENT_ADDRESS 0x01010102
233 #define RNDIS_OID_802_3_MULTICAST_LIST 0x01010103
234 #define RNDIS_OID_802_3_MAXIMUM_LIST_SIZE 0x01010104
235 #define RNDIS_OID_802_3_MAC_OPTIONS 0x01010105
237 #define NDIS_802_3_MAC_OPTION_PRIORITY 0x00000001
239 #define RNDIS_OID_802_3_RCV_ERROR_ALIGNMENT 0x01020101
240 #define RNDIS_OID_802_3_XMIT_ONE_COLLISION 0x01020102
241 #define RNDIS_OID_802_3_XMIT_MORE_COLLISIONS 0x01020103
243 #define RNDIS_OID_802_3_XMIT_DEFERRED 0x01020201
244 #define RNDIS_OID_802_3_XMIT_MAX_COLLISIONS 0x01020202
245 #define RNDIS_OID_802_3_RCV_OVERRUN 0x01020203
246 #define RNDIS_OID_802_3_XMIT_UNDERRUN 0x01020204
247 #define RNDIS_OID_802_3_XMIT_HEARTBEAT_FAILURE 0x01020205
248 #define RNDIS_OID_802_3_XMIT_TIMES_CRS_LOST 0x01020206
249 #define RNDIS_OID_802_3_XMIT_LATE_COLLISIONS 0x01020207
251 /* Remote NDIS message types */
252 #define REMOTE_NDIS_PACKET_MSG 0x00000001
253 #define REMOTE_NDIS_INITIALIZE_MSG 0x00000002
254 #define REMOTE_NDIS_HALT_MSG 0x00000003
255 #define REMOTE_NDIS_QUERY_MSG 0x00000004
256 #define REMOTE_NDIS_SET_MSG 0x00000005
257 #define REMOTE_NDIS_RESET_MSG 0x00000006
258 #define REMOTE_NDIS_INDICATE_STATUS_MSG 0x00000007
259 #define REMOTE_NDIS_KEEPALIVE_MSG 0x00000008
261 #define REMOTE_CONDIS_MP_CREATE_VC_MSG 0x00008001
262 #define REMOTE_CONDIS_MP_DELETE_VC_MSG 0x00008002
263 #define REMOTE_CONDIS_MP_ACTIVATE_VC_MSG 0x00008005
264 #define REMOTE_CONDIS_MP_DEACTIVATE_VC_MSG 0x00008006
265 #define REMOTE_CONDIS_INDICATE_STATUS_MSG 0x00008007
267 /* Remote NDIS message completion types */
268 #define REMOTE_NDIS_INITIALIZE_CMPLT 0x80000002
269 #define REMOTE_NDIS_QUERY_CMPLT 0x80000004
270 #define REMOTE_NDIS_SET_CMPLT 0x80000005
271 #define REMOTE_NDIS_RESET_CMPLT 0x80000006
272 #define REMOTE_NDIS_KEEPALIVE_CMPLT 0x80000008
274 #define REMOTE_CONDIS_MP_CREATE_VC_CMPLT 0x80008001
275 #define REMOTE_CONDIS_MP_DELETE_VC_CMPLT 0x80008002
276 #define REMOTE_CONDIS_MP_ACTIVATE_VC_CMPLT 0x80008005
277 #define REMOTE_CONDIS_MP_DEACTIVATE_VC_CMPLT 0x80008006
280 * Reserved message type for private communication between lower-layer host
281 * driver and remote device, if necessary.
283 #define REMOTE_NDIS_BUS_MSG 0xff000001
285 /* Defines for DeviceFlags in struct rndis_initialize_complete */
286 #define RNDIS_DF_CONNECTIONLESS 0x00000001
287 #define RNDIS_DF_CONNECTION_ORIENTED 0x00000002
288 #define RNDIS_DF_RAW_DATA 0x00000004
290 /* Remote NDIS medium types. */
291 #define RNdisMedium802_3 0x00000000
292 #define RNdisMedium802_5 0x00000001
293 #define RNdisMediumFddi 0x00000002
294 #define RNdisMediumWan 0x00000003
295 #define RNdisMediumLocalTalk 0x00000004
296 #define RNdisMediumArcnetRaw 0x00000006
297 #define RNdisMediumArcnet878_2 0x00000007
298 #define RNdisMediumAtm 0x00000008
299 #define RNdisMediumWirelessWan 0x00000009
300 #define RNdisMediumIrda 0x0000000a
301 #define RNdisMediumCoWan 0x0000000b
302 /* Not a real medium, defined as an upper-bound */
303 #define RNdisMediumMax 0x0000000d
306 /* Remote NDIS medium connection states. */
307 #define RNdisMediaStateConnected 0x00000000
308 #define RNdisMediaStateDisconnected 0x00000001
310 /* Remote NDIS version numbers */
311 #define RNDIS_MAJOR_VERSION 0x00000001
312 #define RNDIS_MINOR_VERSION 0x00000000
315 /* NdisInitialize message */
316 struct rndis_initialize_request
{
323 /* Response to NdisInitialize */
324 struct rndis_initialize_complete
{
331 u32 MaxPacketsPerMessage
;
333 u32 PacketAlignmentFactor
;
338 /* Call manager devices only: Information about an address family */
339 /* supported by the device is appended to the response to NdisInitialize. */
340 struct rndis_co_address_family
{
346 /* NdisHalt message */
347 struct rndis_halt_request
{
351 /* NdisQueryRequest message */
352 struct rndis_query_request
{
355 u32 InformationBufferLength
;
356 u32 InformationBufferOffset
;
360 /* Response to NdisQueryRequest */
361 struct rndis_query_complete
{
364 u32 InformationBufferLength
;
365 u32 InformationBufferOffset
;
368 /* NdisSetRequest message */
369 struct rndis_set_request
{
372 u32 InformationBufferLength
;
373 u32 InformationBufferOffset
;
377 /* Response to NdisSetRequest */
378 struct rndis_set_complete
{
383 /* NdisReset message */
384 struct rndis_reset_request
{
388 /* Response to NdisReset */
389 struct rndis_reset_complete
{
394 /* NdisMIndicateStatus message */
395 struct rndis_indicate_status
{
397 u32 StatusBufferLength
;
398 u32 StatusBufferOffset
;
401 /* Diagnostic information passed as the status buffer in */
402 /* struct rndis_indicate_status messages signifying error conditions. */
403 struct rndis_diagnostic_info
{
408 /* NdisKeepAlive message */
409 struct rndis_keepalive_request
{
413 /* Response to NdisKeepAlive */
414 struct rndis_keepalive_complete
{
420 * Data message. All Offset fields contain byte offsets from the beginning of
421 * struct rndis_packet. All Length fields are in bytes. VcHandle is set
422 * to 0 for connectionless data, otherwise it contains the VC handle.
424 struct rndis_packet
{
429 u32 NumOOBDataElements
;
430 u32 PerPacketInfoOffset
;
431 u32 PerPacketInfoLength
;
436 /* Optional Out of Band data associated with a Data message. */
440 u32 ClassInformationOffset
;
443 /* Packet extension field contents associated with a Data message. */
444 struct rndis_per_packet_info
{
447 u32 PerPacketInformationOffset
;
450 /* Format of Information buffer passed in a SetRequest for the OID */
451 /* OID_GEN_RNDIS_CONFIG_PARAMETER. */
452 struct rndis_config_parameter_info
{
453 u32 ParameterNameOffset
;
454 u32 ParameterNameLength
;
456 u32 ParameterValueOffset
;
457 u32 ParameterValueLength
;
460 /* Values for ParameterType in struct rndis_config_parameter_info */
461 #define RNDIS_CONFIG_PARAM_TYPE_INTEGER 0
462 #define RNDIS_CONFIG_PARAM_TYPE_STRING 2
464 /* CONDIS Miniport messages for connection oriented devices */
465 /* that do not implement a call manager. */
467 /* CoNdisMiniportCreateVc message */
468 struct rcondis_mp_create_vc
{
473 /* Response to CoNdisMiniportCreateVc */
474 struct rcondis_mp_create_vc_complete
{
480 /* CoNdisMiniportDeleteVc message */
481 struct rcondis_mp_delete_vc
{
486 /* Response to CoNdisMiniportDeleteVc */
487 struct rcondis_mp_delete_vc_complete
{
492 /* CoNdisMiniportQueryRequest message */
493 struct rcondis_mp_query_request
{
498 u32 InformationBufferLength
;
499 u32 InformationBufferOffset
;
502 /* CoNdisMiniportSetRequest message */
503 struct rcondis_mp_set_request
{
508 u32 InformationBufferLength
;
509 u32 InformationBufferOffset
;
512 /* CoNdisIndicateStatus message */
513 struct rcondis_indicate_status
{
516 u32 StatusBufferLength
;
517 u32 StatusBufferOffset
;
520 /* CONDIS Call/VC parameters */
521 struct rcondis_specific_parameters
{
527 struct rcondis_media_parameters
{
531 struct rcondis_specific_parameters MediaSpecific
;
534 struct rndis_flowspec
{
542 u32 MinimumPolicedSize
;
545 struct rcondis_call_manager_parameters
{
546 struct rndis_flowspec Transmit
;
547 struct rndis_flowspec Receive
;
548 struct rcondis_specific_parameters CallMgrSpecific
;
551 /* CoNdisMiniportActivateVc message */
552 struct rcondis_mp_activate_vc_request
{
556 u32 MediaParamsOffset
;
557 u32 MediaParamsLength
;
558 u32 CallMgrParamsOffset
;
559 u32 CallMgrParamsLength
;
562 /* Response to CoNdisMiniportActivateVc */
563 struct rcondis_mp_activate_vc_complete
{
568 /* CoNdisMiniportDeactivateVc message */
569 struct rcondis_mp_deactivate_vc_request
{
575 /* Response to CoNdisMiniportDeactivateVc */
576 struct rcondis_mp_deactivate_vc_complete
{
582 /* union with all of the RNDIS messages */
583 union rndis_message_container
{
584 struct rndis_packet Packet
;
585 struct rndis_initialize_request InitializeRequest
;
586 struct rndis_halt_request HaltRequest
;
587 struct rndis_query_request QueryRequest
;
588 struct rndis_set_request SetRequest
;
589 struct rndis_reset_request ResetRequest
;
590 struct rndis_keepalive_request KeepaliveRequest
;
591 struct rndis_indicate_status IndicateStatus
;
592 struct rndis_initialize_complete InitializeComplete
;
593 struct rndis_query_complete QueryComplete
;
594 struct rndis_set_complete SetComplete
;
595 struct rndis_reset_complete ResetComplete
;
596 struct rndis_keepalive_complete KeepaliveComplete
;
597 struct rcondis_mp_create_vc CoMiniportCreateVc
;
598 struct rcondis_mp_delete_vc CoMiniportDeleteVc
;
599 struct rcondis_indicate_status CoIndicateStatus
;
600 struct rcondis_mp_activate_vc_request CoMiniportActivateVc
;
601 struct rcondis_mp_deactivate_vc_request CoMiniportDeactivateVc
;
602 struct rcondis_mp_create_vc_complete CoMiniportCreateVcComplete
;
603 struct rcondis_mp_delete_vc_complete CoMiniportDeleteVcComplete
;
604 struct rcondis_mp_activate_vc_complete CoMiniportActivateVcComplete
;
605 struct rcondis_mp_deactivate_vc_complete CoMiniportDeactivateVcComplete
;
608 /* Remote NDIS message format */
609 struct rndis_message
{
612 /* Total length of this message, from the beginning */
613 /* of the sruct rndis_message, in bytes. */
617 union rndis_message_container Message
;
622 /* get the size of an RNDIS message. Pass in the message type, */
623 /* struct rndis_set_request, struct rndis_packet for example */
624 #define RNDIS_MESSAGE_SIZE(Message) \
625 (sizeof(Message) + (sizeof(struct rndis_message) - \
626 sizeof(union rndis_message_container)))
628 /* get pointer to info buffer with message pointer */
629 #define MESSAGE_TO_INFO_BUFFER(Message) \
630 (((unsigned char *)(Message)) + Message->InformationBufferOffset)
632 /* get pointer to status buffer with message pointer */
633 #define MESSAGE_TO_STATUS_BUFFER(Message) \
634 (((unsigned char *)(Message)) + Message->StatusBufferOffset)
636 /* get pointer to OOBD buffer with message pointer */
637 #define MESSAGE_TO_OOBD_BUFFER(Message) \
638 (((unsigned char *)(Message)) + Message->OOBDataOffset)
640 /* get pointer to data buffer with message pointer */
641 #define MESSAGE_TO_DATA_BUFFER(Message) \
642 (((unsigned char *)(Message)) + Message->PerPacketInfoOffset)
644 /* get pointer to contained message from NDIS_MESSAGE pointer */
645 #define RNDIS_MESSAGE_PTR_TO_MESSAGE_PTR(RndisMessage) \
646 ((void *) &RndisMessage->Message)
648 /* get pointer to contained message from NDIS_MESSAGE pointer */
649 #define RNDIS_MESSAGE_RAW_PTR_TO_MESSAGE_PTR(RndisMessage) \
650 ((void *) RndisMessage)
652 #endif /* _RNDIS_H_ */