]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - sys/dev/hyperv/netvsc/hv_rndis.h
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / sys / dev / hyperv / netvsc / hv_rndis.h
1 /*-
2  * Copyright (c) 2009-2012 Microsoft Corp.
3  * Copyright (c) 2010-2012 Citrix Inc.
4  * Copyright (c) 2012 NetApp Inc.
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  * 1. Redistributions of source code must retain the above copyright
11  *    notice unmodified, this list of conditions, and the following
12  *    disclaimer.
13  * 2. Redistributions in binary form must reproduce the above copyright
14  *    notice, this list of conditions and the following disclaimer in the
15  *    documentation and/or other materials provided with the distribution.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  *
28  * $FreeBSD$
29  */
30
31 #ifndef __HV_RNDIS_H__
32 #define __HV_RNDIS_H__
33
34
35 /*
36  * NDIS protocol version numbers
37  */
38 #define NDIS_VERSION_5_0                        0x00050000
39 #define NDIS_VERSION_5_1                        0x00050001
40 #define NDIS_VERSION_6_0                        0x00060000
41 #define NDIS_VERSION_6_1                        0x00060001
42 #define NDIS_VERSION_6_30                       0x0006001e
43
44 #define NDIS_VERSION                            (NDIS_VERSION_5_1)
45
46 /*
47  * Status codes
48  */
49
50 #define STATUS_SUCCESS                          (0x00000000L)
51 #define STATUS_UNSUCCESSFUL                     (0xC0000001L)
52 #define STATUS_PENDING                          (0x00000103L)
53 #define STATUS_INSUFFICIENT_RESOURCES           (0xC000009AL)
54 #define STATUS_BUFFER_OVERFLOW                  (0x80000005L)
55 #define STATUS_NOT_SUPPORTED                    (0xC00000BBL)
56
57 #define RNDIS_STATUS_SUCCESS                    (STATUS_SUCCESS)
58 #define RNDIS_STATUS_PENDING                    (STATUS_PENDING)
59 #define RNDIS_STATUS_NOT_RECOGNIZED             (0x00010001L)
60 #define RNDIS_STATUS_NOT_COPIED                 (0x00010002L)
61 #define RNDIS_STATUS_NOT_ACCEPTED               (0x00010003L)
62 #define RNDIS_STATUS_CALL_ACTIVE                (0x00010007L)
63
64 #define RNDIS_STATUS_ONLINE                     (0x40010003L)
65 #define RNDIS_STATUS_RESET_START                (0x40010004L)
66 #define RNDIS_STATUS_RESET_END                  (0x40010005L)
67 #define RNDIS_STATUS_RING_STATUS                (0x40010006L)
68 #define RNDIS_STATUS_CLOSED                     (0x40010007L)
69 #define RNDIS_STATUS_WAN_LINE_UP                (0x40010008L)
70 #define RNDIS_STATUS_WAN_LINE_DOWN              (0x40010009L)
71 #define RNDIS_STATUS_WAN_FRAGMENT               (0x4001000AL)
72 #define RNDIS_STATUS_MEDIA_CONNECT              (0x4001000BL)
73 #define RNDIS_STATUS_MEDIA_DISCONNECT           (0x4001000CL)
74 #define RNDIS_STATUS_HARDWARE_LINE_UP           (0x4001000DL)
75 #define RNDIS_STATUS_HARDWARE_LINE_DOWN         (0x4001000EL)
76 #define RNDIS_STATUS_INTERFACE_UP               (0x4001000FL)
77 #define RNDIS_STATUS_INTERFACE_DOWN             (0x40010010L)
78 #define RNDIS_STATUS_MEDIA_BUSY                 (0x40010011L)
79 #define RNDIS_STATUS_MEDIA_SPECIFIC_INDICATION  (0x40010012L)
80 #define RNDIS_STATUS_WW_INDICATION        RNDIS_STATUS_MEDIA_SPECIFIC_INDICATION
81 #define RNDIS_STATUS_LINK_SPEED_CHANGE          (0x40010013L)
82
83 #define RNDIS_STATUS_NOT_RESETTABLE             (0x80010001L)
84 #define RNDIS_STATUS_SOFT_ERRORS                (0x80010003L)
85 #define RNDIS_STATUS_HARD_ERRORS                (0x80010004L)
86 #define RNDIS_STATUS_BUFFER_OVERFLOW            (STATUS_BUFFER_OVERFLOW)
87
88 #define RNDIS_STATUS_FAILURE                    (STATUS_UNSUCCESSFUL)
89 #define RNDIS_STATUS_RESOURCES                  (STATUS_INSUFFICIENT_RESOURCES)
90 #define RNDIS_STATUS_CLOSING                    (0xC0010002L)
91 #define RNDIS_STATUS_BAD_VERSION                (0xC0010004L)
92 #define RNDIS_STATUS_BAD_CHARACTERISTICS        (0xC0010005L)
93 #define RNDIS_STATUS_ADAPTER_NOT_FOUND          (0xC0010006L)
94 #define RNDIS_STATUS_OPEN_FAILED                (0xC0010007L)
95 #define RNDIS_STATUS_DEVICE_FAILED              (0xC0010008L)
96 #define RNDIS_STATUS_MULTICAST_FULL             (0xC0010009L)
97 #define RNDIS_STATUS_MULTICAST_EXISTS           (0xC001000AL)
98 #define RNDIS_STATUS_MULTICAST_NOT_FOUND        (0xC001000BL)
99 #define RNDIS_STATUS_REQUEST_ABORTED            (0xC001000CL)
100 #define RNDIS_STATUS_RESET_IN_PROGRESS          (0xC001000DL)
101 #define RNDIS_STATUS_CLOSING_INDICATING         (0xC001000EL)
102 #define RNDIS_STATUS_NOT_SUPPORTED              (STATUS_NOT_SUPPORTED)
103 #define RNDIS_STATUS_INVALID_PACKET             (0xC001000FL)
104 #define RNDIS_STATUS_OPEN_LIST_FULL             (0xC0010010L)
105 #define RNDIS_STATUS_ADAPTER_NOT_READY          (0xC0010011L)
106 #define RNDIS_STATUS_ADAPTER_NOT_OPEN           (0xC0010012L)
107 #define RNDIS_STATUS_NOT_INDICATING             (0xC0010013L)
108 #define RNDIS_STATUS_INVALID_LENGTH             (0xC0010014L)
109 #define RNDIS_STATUS_INVALID_DATA               (0xC0010015L)
110 #define RNDIS_STATUS_BUFFER_TOO_SHORT           (0xC0010016L)
111 #define RNDIS_STATUS_INVALID_OID                (0xC0010017L)
112 #define RNDIS_STATUS_ADAPTER_REMOVED            (0xC0010018L)
113 #define RNDIS_STATUS_UNSUPPORTED_MEDIA          (0xC0010019L)
114 #define RNDIS_STATUS_GROUP_ADDRESS_IN_USE       (0xC001001AL)
115 #define RNDIS_STATUS_FILE_NOT_FOUND             (0xC001001BL)
116 #define RNDIS_STATUS_ERROR_READING_FILE         (0xC001001CL)
117 #define RNDIS_STATUS_ALREADY_MAPPED             (0xC001001DL)
118 #define RNDIS_STATUS_RESOURCE_CONFLICT          (0xC001001EL)
119 #define RNDIS_STATUS_NO_CABLE                   (0xC001001FL)
120
121 #define RNDIS_STATUS_INVALID_SAP                (0xC0010020L)
122 #define RNDIS_STATUS_SAP_IN_USE                 (0xC0010021L)
123 #define RNDIS_STATUS_INVALID_ADDRESS            (0xC0010022L)
124 #define RNDIS_STATUS_VC_NOT_ACTIVATED           (0xC0010023L)
125 #define RNDIS_STATUS_DEST_OUT_OF_ORDER          (0xC0010024L)
126 #define RNDIS_STATUS_VC_NOT_AVAILABLE           (0xC0010025L)
127 #define RNDIS_STATUS_CELLRATE_NOT_AVAILABLE     (0xC0010026L)
128 #define RNDIS_STATUS_INCOMPATABLE_QOS           (0xC0010027L)
129 #define RNDIS_STATUS_AAL_PARAMS_UNSUPPORTED     (0xC0010028L)
130 #define RNDIS_STATUS_NO_ROUTE_TO_DESTINATION    (0xC0010029L)
131
132 #define RNDIS_STATUS_TOKEN_RING_OPEN_ERROR      (0xC0011000L)
133
134
135 /*
136  * Object Identifiers used by NdisRequest Query/Set Information
137  */
138
139 /*
140  * General Objects
141  */
142
143 #define RNDIS_OID_GEN_SUPPORTED_LIST                    0x00010101
144 #define RNDIS_OID_GEN_HARDWARE_STATUS                   0x00010102
145 #define RNDIS_OID_GEN_MEDIA_SUPPORTED                   0x00010103
146 #define RNDIS_OID_GEN_MEDIA_IN_USE                      0x00010104
147 #define RNDIS_OID_GEN_MAXIMUM_LOOKAHEAD                 0x00010105
148 #define RNDIS_OID_GEN_MAXIMUM_FRAME_SIZE                0x00010106
149 #define RNDIS_OID_GEN_LINK_SPEED                        0x00010107
150 #define RNDIS_OID_GEN_TRANSMIT_BUFFER_SPACE             0x00010108
151 #define RNDIS_OID_GEN_RECEIVE_BUFFER_SPACE              0x00010109
152 #define RNDIS_OID_GEN_TRANSMIT_BLOCK_SIZE               0x0001010A
153 #define RNDIS_OID_GEN_RECEIVE_BLOCK_SIZE                0x0001010B
154 #define RNDIS_OID_GEN_VENDOR_ID                         0x0001010C
155 #define RNDIS_OID_GEN_VENDOR_DESCRIPTION                0x0001010D
156 #define RNDIS_OID_GEN_CURRENT_PACKET_FILTER             0x0001010E
157 #define RNDIS_OID_GEN_CURRENT_LOOKAHEAD                 0x0001010F
158 #define RNDIS_OID_GEN_DRIVER_VERSION                    0x00010110
159 #define RNDIS_OID_GEN_MAXIMUM_TOTAL_SIZE                0x00010111
160 #define RNDIS_OID_GEN_PROTOCOL_OPTIONS                  0x00010112
161 #define RNDIS_OID_GEN_MAC_OPTIONS                       0x00010113
162 #define RNDIS_OID_GEN_MEDIA_CONNECT_STATUS              0x00010114
163 #define RNDIS_OID_GEN_MAXIMUM_SEND_PACKETS              0x00010115
164 #define RNDIS_OID_GEN_VENDOR_DRIVER_VERSION             0x00010116
165 #define RNDIS_OID_GEN_NETWORK_LAYER_ADDRESSES           0x00010118
166 #define RNDIS_OID_GEN_TRANSPORT_HEADER_OFFSET           0x00010119
167 #define RNDIS_OID_GEN_MACHINE_NAME                      0x0001021A
168 #define RNDIS_OID_GEN_RNDIS_CONFIG_PARAMETER            0x0001021B
169
170 #define RNDIS_OID_GEN_XMIT_OK                           0x00020101
171 #define RNDIS_OID_GEN_RCV_OK                            0x00020102
172 #define RNDIS_OID_GEN_XMIT_ERROR                        0x00020103
173 #define RNDIS_OID_GEN_RCV_ERROR                         0x00020104
174 #define RNDIS_OID_GEN_RCV_NO_BUFFER                     0x00020105
175
176 #define RNDIS_OID_GEN_DIRECTED_BYTES_XMIT               0x00020201
177 #define RNDIS_OID_GEN_DIRECTED_FRAMES_XMIT              0x00020202
178 #define RNDIS_OID_GEN_MULTICAST_BYTES_XMIT              0x00020203
179 #define RNDIS_OID_GEN_MULTICAST_FRAMES_XMIT             0x00020204
180 #define RNDIS_OID_GEN_BROADCAST_BYTES_XMIT              0x00020205
181 #define RNDIS_OID_GEN_BROADCAST_FRAMES_XMIT             0x00020206
182 #define RNDIS_OID_GEN_DIRECTED_BYTES_RCV                0x00020207
183 #define RNDIS_OID_GEN_DIRECTED_FRAMES_RCV               0x00020208
184 #define RNDIS_OID_GEN_MULTICAST_BYTES_RCV               0x00020209
185 #define RNDIS_OID_GEN_MULTICAST_FRAMES_RCV              0x0002020A
186 #define RNDIS_OID_GEN_BROADCAST_BYTES_RCV               0x0002020B
187 #define RNDIS_OID_GEN_BROADCAST_FRAMES_RCV              0x0002020C
188
189 #define RNDIS_OID_GEN_RCV_CRC_ERROR                     0x0002020D
190 #define RNDIS_OID_GEN_TRANSMIT_QUEUE_LENGTH             0x0002020E
191
192 #define RNDIS_OID_GEN_GET_TIME_CAPS                     0x0002020F
193 #define RNDIS_OID_GEN_GET_NETCARD_TIME                  0x00020210
194
195 /*
196  * These are connection-oriented general OIDs.
197  * These replace the above OIDs for connection-oriented media.
198  */
199 #define RNDIS_OID_GEN_CO_SUPPORTED_LIST                 0x00010101
200 #define RNDIS_OID_GEN_CO_HARDWARE_STATUS                0x00010102
201 #define RNDIS_OID_GEN_CO_MEDIA_SUPPORTED                0x00010103
202 #define RNDIS_OID_GEN_CO_MEDIA_IN_USE                   0x00010104
203 #define RNDIS_OID_GEN_CO_LINK_SPEED                     0x00010105
204 #define RNDIS_OID_GEN_CO_VENDOR_ID                      0x00010106
205 #define RNDIS_OID_GEN_CO_VENDOR_DESCRIPTION             0x00010107
206 #define RNDIS_OID_GEN_CO_DRIVER_VERSION                 0x00010108
207 #define RNDIS_OID_GEN_CO_PROTOCOL_OPTIONS               0x00010109
208 #define RNDIS_OID_GEN_CO_MAC_OPTIONS                    0x0001010A
209 #define RNDIS_OID_GEN_CO_MEDIA_CONNECT_STATUS           0x0001010B
210 #define RNDIS_OID_GEN_CO_VENDOR_DRIVER_VERSION          0x0001010C
211 #define RNDIS_OID_GEN_CO_MINIMUM_LINK_SPEED             0x0001010D
212
213 #define RNDIS_OID_GEN_CO_GET_TIME_CAPS                  0x00010201
214 #define RNDIS_OID_GEN_CO_GET_NETCARD_TIME               0x00010202
215
216 /*
217  * These are connection-oriented statistics OIDs.
218  */
219 #define RNDIS_OID_GEN_CO_XMIT_PDUS_OK                   0x00020101
220 #define RNDIS_OID_GEN_CO_RCV_PDUS_OK                    0x00020102
221 #define RNDIS_OID_GEN_CO_XMIT_PDUS_ERROR                0x00020103
222 #define RNDIS_OID_GEN_CO_RCV_PDUS_ERROR                 0x00020104
223 #define RNDIS_OID_GEN_CO_RCV_PDUS_NO_BUFFER             0x00020105
224
225
226 #define RNDIS_OID_GEN_CO_RCV_CRC_ERROR                  0x00020201
227 #define RNDIS_OID_GEN_CO_TRANSMIT_QUEUE_LENGTH          0x00020202
228 #define RNDIS_OID_GEN_CO_BYTES_XMIT                     0x00020203
229 #define RNDIS_OID_GEN_CO_BYTES_RCV                      0x00020204
230 #define RNDIS_OID_GEN_CO_BYTES_XMIT_OUTSTANDING         0x00020205
231 #define RNDIS_OID_GEN_CO_NETCARD_LOAD                   0x00020206
232
233 /*
234  * These are objects for Connection-oriented media call-managers.
235  */
236 #define RNDIS_OID_CO_ADD_PVC                            0xFF000001
237 #define RNDIS_OID_CO_DELETE_PVC                         0xFF000002
238 #define RNDIS_OID_CO_GET_CALL_INFORMATION               0xFF000003
239 #define RNDIS_OID_CO_ADD_ADDRESS                        0xFF000004
240 #define RNDIS_OID_CO_DELETE_ADDRESS                     0xFF000005
241 #define RNDIS_OID_CO_GET_ADDRESSES                      0xFF000006
242 #define RNDIS_OID_CO_ADDRESS_CHANGE                     0xFF000007
243 #define RNDIS_OID_CO_SIGNALING_ENABLED                  0xFF000008
244 #define RNDIS_OID_CO_SIGNALING_DISABLED                 0xFF000009
245
246
247 /*
248  * 802.3 Objects (Ethernet)
249  */
250
251 #define RNDIS_OID_802_3_PERMANENT_ADDRESS               0x01010101
252 #define RNDIS_OID_802_3_CURRENT_ADDRESS                 0x01010102
253 #define RNDIS_OID_802_3_MULTICAST_LIST                  0x01010103
254 #define RNDIS_OID_802_3_MAXIMUM_LIST_SIZE               0x01010104
255 #define RNDIS_OID_802_3_MAC_OPTIONS                     0x01010105
256
257 /*
258  *
259  */
260 #define NDIS_802_3_MAC_OPTION_PRIORITY                  0x00000001
261
262 #define RNDIS_OID_802_3_RCV_ERROR_ALIGNMENT             0x01020101
263 #define RNDIS_OID_802_3_XMIT_ONE_COLLISION              0x01020102
264 #define RNDIS_OID_802_3_XMIT_MORE_COLLISIONS            0x01020103
265
266 #define RNDIS_OID_802_3_XMIT_DEFERRED                   0x01020201
267 #define RNDIS_OID_802_3_XMIT_MAX_COLLISIONS             0x01020202
268 #define RNDIS_OID_802_3_RCV_OVERRUN                     0x01020203
269 #define RNDIS_OID_802_3_XMIT_UNDERRUN                   0x01020204
270 #define RNDIS_OID_802_3_XMIT_HEARTBEAT_FAILURE          0x01020205
271 #define RNDIS_OID_802_3_XMIT_TIMES_CRS_LOST             0x01020206
272 #define RNDIS_OID_802_3_XMIT_LATE_COLLISIONS            0x01020207
273
274
275 /*
276  * RNDIS MP custom OID for test
277  */
278 #define OID_RNDISMP_GET_RECEIVE_BUFFERS                 0xFFA0C90D // Query only
279
280
281 /*
282  * Remote NDIS message types
283  */
284 #define REMOTE_NDIS_PACKET_MSG                          0x00000001
285 #define REMOTE_NDIS_INITIALIZE_MSG                      0x00000002
286 #define REMOTE_NDIS_HALT_MSG                            0x00000003
287 #define REMOTE_NDIS_QUERY_MSG                           0x00000004
288 #define REMOTE_NDIS_SET_MSG                             0x00000005
289 #define REMOTE_NDIS_RESET_MSG                           0x00000006
290 #define REMOTE_NDIS_INDICATE_STATUS_MSG                 0x00000007
291 #define REMOTE_NDIS_KEEPALIVE_MSG                       0x00000008
292
293 #define REMOTE_CONDIS_MP_CREATE_VC_MSG                  0x00008001
294 #define REMOTE_CONDIS_MP_DELETE_VC_MSG                  0x00008002
295 #define REMOTE_CONDIS_MP_ACTIVATE_VC_MSG                0x00008005
296 #define REMOTE_CONDIS_MP_DEACTIVATE_VC_MSG              0x00008006
297 #define REMOTE_CONDIS_INDICATE_STATUS_MSG               0x00008007
298
299 /*
300  * Remote NDIS message completion types
301  */
302 #define REMOTE_NDIS_INITIALIZE_CMPLT                    0x80000002
303 #define REMOTE_NDIS_QUERY_CMPLT                         0x80000004
304 #define REMOTE_NDIS_SET_CMPLT                           0x80000005
305 #define REMOTE_NDIS_RESET_CMPLT                         0x80000006
306 #define REMOTE_NDIS_KEEPALIVE_CMPLT                     0x80000008
307
308 #define REMOTE_CONDIS_MP_CREATE_VC_CMPLT                0x80008001
309 #define REMOTE_CONDIS_MP_DELETE_VC_CMPLT                0x80008002
310 #define REMOTE_CONDIS_MP_ACTIVATE_VC_CMPLT              0x80008005
311 #define REMOTE_CONDIS_MP_DEACTIVATE_VC_CMPLT            0x80008006
312
313 /*
314  * Reserved message type for private communication between lower-layer
315  * host driver and remote device, if necessary.
316  */
317 #define REMOTE_NDIS_BUS_MSG                             0xff000001
318
319 /*
320  * Defines for DeviceFlags in rndis_initialize_complete
321  */
322 #define RNDIS_DF_CONNECTIONLESS                         0x00000001
323 #define RNDIS_DF_CONNECTION_ORIENTED                    0x00000002
324 #define RNDIS_DF_RAW_DATA                               0x00000004
325
326 /*
327  * Remote NDIS medium types.
328  */
329 #define RNDIS_MEDIUM_802_3                              0x00000000
330 #define RNDIS_MEDIUM_802_5                              0x00000001
331 #define RNDIS_MEDIUM_FDDI                               0x00000002
332 #define RNDIS_MEDIUM_WAN                                0x00000003
333 #define RNDIS_MEDIUM_LOCAL_TALK                         0x00000004
334 #define RNDIS_MEDIUM_ARCNET_RAW                         0x00000006
335 #define RNDIS_MEDIUM_ARCNET_878_2                       0x00000007
336 #define RNDIS_MEDIUM_ATM                                0x00000008
337 #define RNDIS_MEDIUM_WIRELESS_WAN                       0x00000009
338 #define RNDIS_MEDIUM_IRDA                               0x0000000a
339 #define RNDIS_MEDIUM_CO_WAN                             0x0000000b
340 /* Not a real medium, defined as an upper bound */
341 #define RNDIS_MEDIUM_MAX                                0x0000000d
342
343 /*
344  * Remote NDIS medium connection states.
345  */
346 #define RNDIS_MEDIA_STATE_CONNECTED                     0x00000000
347 #define RNDIS_MEDIA_STATE_DISCONNECTED                  0x00000001
348
349 /*
350  * Remote NDIS version numbers
351  */
352 #define RNDIS_MAJOR_VERSION                             0x00000001
353 #define RNDIS_MINOR_VERSION                             0x00000000
354
355
356 /*
357  * Remote NDIS offload parameters
358  */
359 #define RNDIS_OBJECT_TYPE_DEFAULT                       0x80
360  
361 #define RNDIS_OFFLOAD_PARAMETERS_REVISION_3             3
362 #define RNDIS_OFFLOAD_PARAMETERS_NO_CHANGE              0
363 #define RNDIS_OFFLOAD_PARAMETERS_LSOV2_DISABLED         1
364 #define RNDIS_OFFLOAD_PARAMETERS_LSOV2_ENABLED          2
365 #define RNDIS_OFFLOAD_PARAMETERS_LSOV1_ENABLED          2
366 #define RNDIS_OFFLOAD_PARAMETERS_RSC_DISABLED           1
367 #define RNDIS_OFFLOAD_PARAMETERS_RSC_ENABLED            2
368 #define RNDIS_OFFLOAD_PARAMETERS_TX_RX_DISABLED         1
369 #define RNDIS_OFFLOAD_PARAMETERS_TX_ENABLED_RX_DISABLED 2
370 #define RNDIS_OFFLOAD_PARAMETERS_RX_ENABLED_TX_DISABLED 3
371 #define RNDIS_OFFLOAD_PARAMETERS_TX_RX_ENABLED          4
372
373 #define RNDIS_TCP_LARGE_SEND_OFFLOAD_V2_TYPE            1
374 #define RNDIS_TCP_LARGE_SEND_OFFLOAD_IPV4               0
375 #define RNDIS_TCP_LARGE_SEND_OFFLOAD_IPV6               1
376
377
378 #define RNDIS_OID_TCP_OFFLOAD_CURRENT_CONFIG            0xFC01020B /* query only */
379 #define RNDIS_OID_TCP_OFFLOAD_PARAMETERS                0xFC01020C /* set only */
380 #define RNDIS_OID_TCP_OFFLOAD_HARDWARE_CAPABILITIES     0xFC01020D/* query only */
381 #define RNDIS_OID_TCP_CONNECTION_OFFLOAD_CURRENT_CONFIG 0xFC01020E /* query only */
382 #define RNDIS_OID_TCP_CONNECTION_OFFLOAD_HARDWARE_CAPABILITIES  0xFC01020F /* query */
383 #define RNDIS_OID_OFFLOAD_ENCAPSULATION                 0x0101010A /* set/query */
384
385 /*
386  * NdisInitialize message
387  */
388 typedef struct rndis_initialize_request_ {
389     /* RNDIS request ID */
390     uint32_t                                request_id;
391     uint32_t                                major_version;
392     uint32_t                                minor_version;
393     uint32_t                                max_xfer_size;
394 } rndis_initialize_request;
395
396 /*
397  * Response to NdisInitialize
398  */
399 typedef struct rndis_initialize_complete_ {
400     /* RNDIS request ID */
401     uint32_t                                request_id;
402     /* RNDIS status */
403     uint32_t                                status;
404     uint32_t                                major_version;
405     uint32_t                                minor_version;
406     uint32_t                                device_flags;
407     /* RNDIS medium */
408     uint32_t                                medium;
409     uint32_t                                max_pkts_per_msg;
410     uint32_t                                max_xfer_size;
411     uint32_t                                pkt_align_factor;
412     uint32_t                                af_list_offset;
413     uint32_t                                af_list_size;
414 } rndis_initialize_complete;
415
416 /*
417  * Call manager devices only: Information about an address family
418  * supported by the device is appended to the response to NdisInitialize.
419  */
420 typedef struct rndis_co_address_family_ {
421     /* RNDIS AF */
422     uint32_t                                address_family;
423     uint32_t                                major_version;
424     uint32_t                                minor_version;
425 } rndis_co_address_family;
426
427 /*
428  * NdisHalt message
429  */
430 typedef struct rndis_halt_request_ {
431     /* RNDIS request ID */
432     uint32_t                                request_id;
433 } rndis_halt_request;
434
435 /*
436  * NdisQueryRequest message
437  */
438 typedef struct rndis_query_request_ {
439     /* RNDIS request ID */
440     uint32_t                                request_id;
441     /* RNDIS OID */
442     uint32_t                                oid;
443     uint32_t                                info_buffer_length;
444     uint32_t                                info_buffer_offset;
445     /* RNDIS handle */
446     uint32_t                                device_vc_handle;
447 } rndis_query_request;
448
449 /*
450  * Response to NdisQueryRequest
451  */
452 typedef struct rndis_query_complete_ {
453     /* RNDIS request ID */
454     uint32_t                                request_id;
455     /* RNDIS status */
456     uint32_t                                status;
457     uint32_t                                info_buffer_length;
458     uint32_t                                info_buffer_offset;
459 } rndis_query_complete;
460
461 /*
462  * NdisSetRequest message
463  */
464 typedef struct rndis_set_request_ {
465     /* RNDIS request ID */
466     uint32_t                                request_id;
467     /* RNDIS OID */
468     uint32_t                                oid;
469     uint32_t                                info_buffer_length;
470     uint32_t                                info_buffer_offset;
471     /* RNDIS handle */
472     uint32_t                                device_vc_handle;
473 } rndis_set_request;
474
475 /*
476  * Response to NdisSetRequest
477  */
478 typedef struct rndis_set_complete_ {
479     /* RNDIS request ID */
480     uint32_t                                request_id;
481     /* RNDIS status */
482     uint32_t                                status;
483 } rndis_set_complete;
484
485 /*
486  * NdisReset message
487  */
488 typedef struct rndis_reset_request_ {
489     uint32_t                                reserved;
490 } rndis_reset_request;
491
492 /*
493  * Response to NdisReset
494  */
495 typedef struct rndis_reset_complete_ {
496     /* RNDIS status */
497     uint32_t                                status;
498     uint32_t                                addressing_reset;
499 } rndis_reset_complete;
500
501 /*
502  * NdisMIndicateStatus message
503  */
504 typedef struct rndis_indicate_status_ {
505     /* RNDIS status */
506     uint32_t                                status;
507     uint32_t                                status_buf_length;
508     uint32_t                                status_buf_offset;
509 } rndis_indicate_status;
510
511 /*
512  * Diagnostic information passed as the status buffer in
513  * rndis_indicate_status messages signifying error conditions.
514  */
515 typedef struct rndis_diagnostic_info_ {
516     /* RNDIS status */
517     uint32_t                                diag_status;
518     uint32_t                                error_offset;
519 } rndis_diagnostic_info;
520
521 /*
522  * NdisKeepAlive message
523  */
524 typedef struct rndis_keepalive_request_ {
525     /* RNDIS request ID */
526     uint32_t                                request_id;
527 } rndis_keepalive_request;
528
529 /*
530  * Response to NdisKeepAlive
531  */  
532 typedef struct rndis_keepalive_complete_ {
533     /* RNDIS request ID */
534     uint32_t                                request_id;
535     /* RNDIS status */
536     uint32_t                                status;
537 } rndis_keepalive_complete;
538
539 /*
540  * Data message. All offset fields contain byte offsets from the beginning
541  * of the rndis_packet structure. All length fields are in bytes.
542  * VcHandle is set to 0 for connectionless data, otherwise it
543  * contains the VC handle.
544  */
545 typedef struct rndis_packet_ {
546     uint32_t                                data_offset;
547     uint32_t                                data_length;
548     uint32_t                                oob_data_offset;
549     uint32_t                                oob_data_length;
550     uint32_t                                num_oob_data_elements;
551     uint32_t                                per_pkt_info_offset;
552     uint32_t                                per_pkt_info_length;
553     /* RNDIS handle */
554     uint32_t                                vc_handle;
555     uint32_t                                reserved;
556 } rndis_packet;
557
558 typedef struct rndis_packet_ex_ {
559     uint32_t                                data_offset;
560     uint32_t                                data_length;
561     uint32_t                                oob_data_offset;
562     uint32_t                                oob_data_length;
563     uint32_t                                num_oob_data_elements;
564     uint32_t                                per_pkt_info_offset;
565     uint32_t                                per_pkt_info_length;
566     /* RNDIS handle */
567     uint32_t                                vc_handle;
568     uint32_t                                reserved;
569     uint64_t                                data_buf_id;
570     uint32_t                                data_buf_offset;
571     uint64_t                                next_header_buf_id;
572     uint32_t                                next_header_byte_offset;
573     uint32_t                                next_header_byte_count;
574 } rndis_packet_ex;
575
576 /*
577  * Optional Out of Band data associated with a Data message.
578  */
579 typedef struct rndis_oobd_ {
580     uint32_t                                size;
581     /* RNDIS class ID */
582     uint32_t                                type;
583     uint32_t                                class_info_offset;
584 } rndis_oobd;
585
586 /*
587  * Packet extension field contents associated with a Data message.
588  */
589 typedef struct rndis_per_packet_info_ {
590     uint32_t                                size;
591     uint32_t                                type;
592     uint32_t                                per_packet_info_offset;
593 } rndis_per_packet_info;
594
595 typedef enum ndis_per_pkt_infotype_ {
596         tcpip_chksum_info,
597         ipsec_info,
598         tcp_large_send_info,
599         classification_handle_info,
600         ndis_reserved,
601         sgl_info,
602         ieee_8021q_info,
603         original_pkt_info,
604         pkt_cancel_id,
605         original_netbuf_list,
606         cached_netbuf_list,
607         short_pkt_padding_info,
608         max_perpkt_info
609 } ndis_per_pkt_infotype;
610
611 typedef struct ndis_8021q_info_ {
612         union {
613                 struct {
614                         uint32_t   user_pri : 3;  /* User Priority */
615                         uint32_t   cfi      : 1;  /* Canonical Format ID */
616                         uint32_t   vlan_id  : 12;
617                         uint32_t   reserved : 16;
618                 } s1;
619                 uint32_t    value;
620         } u1;
621 } ndis_8021q_info;
622
623 struct rndis_object_header {
624         uint8_t type;
625         uint8_t revision;
626         uint16_t size;
627 };
628
629 typedef struct rndis_offload_params_ {
630         struct rndis_object_header header;
631         uint8_t ipv4_csum;
632         uint8_t tcp_ipv4_csum;
633         uint8_t udp_ipv4_csum;
634         uint8_t tcp_ipv6_csum;
635         uint8_t udp_ipv6_csum;
636         uint8_t lso_v1;
637         uint8_t ip_sec_v1;
638         uint8_t lso_v2_ipv4;
639         uint8_t lso_v2_ipv6;
640         uint8_t tcp_connection_ipv4;
641         uint8_t tcp_connection_ipv6;
642         uint32_t flags;
643         uint8_t ip_sec_v2;
644         uint8_t ip_sec_v2_ipv4;
645         struct {
646                 uint8_t rsc_ipv4;
647                 uint8_t rsc_ipv6;
648         };
649         struct {
650                 uint8_t encapsulated_packet_task_offload;
651                 uint8_t encapsulation_types;
652         };
653
654 } rndis_offload_params;
655
656
657 typedef struct rndis_tcp_ip_csum_info_ {
658         union {
659                 struct {
660                         uint32_t is_ipv4:1;
661                         uint32_t is_ipv6:1;
662                         uint32_t tcp_csum:1;
663                         uint32_t udp_csum:1;
664                         uint32_t ip_header_csum:1;
665                         uint32_t reserved:11;
666                         uint32_t tcp_header_offset:10;
667                 } xmit;
668                 struct {
669                         uint32_t tcp_csum_failed:1;
670                         uint32_t udp_csum_failed:1;
671                         uint32_t ip_csum_failed:1;
672                         uint32_t tcp_csum_succeeded:1;
673                         uint32_t udp_csum_succeeded:1;
674                         uint32_t ip_csum_succeeded:1;
675                         uint32_t loopback:1;
676                         uint32_t tcp_csum_value_invalid:1;
677                         uint32_t ip_csum_value_invalid:1;
678                 } receive;
679                 uint32_t  value;
680         };
681 } rndis_tcp_ip_csum_info;
682
683 typedef struct rndis_tcp_tso_info_ {
684         union {
685                 struct {
686                         uint32_t unused:30;
687                         uint32_t type:1;
688                         uint32_t reserved2:1;
689                 } xmit;
690                 struct {
691                         uint32_t mss:20;
692                         uint32_t tcp_header_offset:10;
693                         uint32_t type:1;
694                         uint32_t reserved2:1;
695                 } lso_v1_xmit;
696                 struct {
697                         uint32_t tcp_payload:30;
698                         uint32_t type:1;
699                         uint32_t reserved2:1;
700                 } lso_v1_xmit_complete;
701                 struct {
702                         uint32_t mss:20;
703                         uint32_t tcp_header_offset:10;
704                         uint32_t type:1;
705                         uint32_t ip_version:1;
706                 } lso_v2_xmit;
707                 struct {
708                         uint32_t reserved:30;
709                         uint32_t type:1;
710                         uint32_t reserved2:1;
711                 } lso_v2_xmit_complete;
712                 uint32_t  value;
713         };
714 } rndis_tcp_tso_info;
715
716 #define RNDIS_VLAN_PPI_SIZE     (sizeof(rndis_per_packet_info) + \
717                                 sizeof(ndis_8021q_info))
718
719 #define RNDIS_CSUM_PPI_SIZE     (sizeof(rndis_per_packet_info) + \
720                                 sizeof(rndis_tcp_ip_csum_info))
721
722 #define RNDIS_TSO_PPI_SIZE      (sizeof(rndis_per_packet_info) + \
723                                 sizeof(rndis_tcp_tso_info))
724
725 /*
726  * Format of Information buffer passed in a SetRequest for the OID
727  * OID_GEN_RNDIS_CONFIG_PARAMETER.
728  */
729 typedef struct rndis_config_parameter_info_ {
730     uint32_t                                parameter_name_offset;
731     uint32_t                                parameter_name_length;
732     uint32_t                                parameter_type;
733     uint32_t                                parameter_value_offset;
734     uint32_t                                parameter_value_length;
735 } rndis_config_parameter_info;
736
737 /*
738  * Values for ParameterType in rndis_config_parameter_info
739  */
740 #define RNDIS_CONFIG_PARAM_TYPE_INTEGER     0
741 #define RNDIS_CONFIG_PARAM_TYPE_STRING      2
742
743
744 /*
745  * CONDIS Miniport messages for connection oriented devices
746  * that do not implement a call manager.
747  */
748
749 /*
750  * CoNdisMiniportCreateVc message
751  */
752 typedef struct rcondis_mp_create_vc_ {
753     /* RNDIS request ID */
754     uint32_t                                request_id;
755     /* RNDIS handle */
756     uint32_t                                ndis_vc_handle;
757 } rcondis_mp_create_vc;
758
759 /*
760  * Response to CoNdisMiniportCreateVc
761  */
762 typedef struct rcondis_mp_create_vc_complete_ {
763     /* RNDIS request ID */
764     uint32_t                                request_id;
765     /* RNDIS handle */
766     uint32_t                                device_vc_handle;
767     /* RNDIS status */
768     uint32_t                                status;
769 } rcondis_mp_create_vc_complete;
770
771 /*
772  * CoNdisMiniportDeleteVc message
773  */
774 typedef struct rcondis_mp_delete_vc_ {
775     /* RNDIS request ID */
776     uint32_t                                request_id;
777     /* RNDIS handle */
778     uint32_t                                device_vc_handle;
779 } rcondis_mp_delete_vc;
780
781 /*
782  * Response to CoNdisMiniportDeleteVc
783  */
784 typedef struct rcondis_mp_delete_vc_complete_ {
785     /* RNDIS request ID */
786     uint32_t                                request_id;
787     /* RNDIS status */
788     uint32_t                                status;
789 } rcondis_mp_delete_vc_complete;
790
791 /*
792  * CoNdisMiniportQueryRequest message
793  */
794 typedef struct rcondis_mp_query_request_ {
795     /* RNDIS request ID */
796     uint32_t                                request_id;
797     /* RNDIS request type */
798     uint32_t                                request_type;
799     /* RNDIS OID */
800     uint32_t                                oid;
801     /* RNDIS handle */
802     uint32_t                                device_vc_handle;
803     uint32_t                                info_buf_length;
804     uint32_t                                info_buf_offset;
805 } rcondis_mp_query_request;
806
807 /*
808  * CoNdisMiniportSetRequest message
809  */
810 typedef struct rcondis_mp_set_request_ {
811     /* RNDIS request ID */
812     uint32_t                                request_id;
813     /* RNDIS request type */
814     uint32_t                                request_type;
815     /* RNDIS OID */
816     uint32_t                                oid;
817     /* RNDIS handle */
818     uint32_t                                device_vc_handle;
819     uint32_t                                info_buf_length;
820     uint32_t                                info_buf_offset;
821 } rcondis_mp_set_request;
822
823 /*
824  * CoNdisIndicateStatus message
825  */
826 typedef struct rcondis_indicate_status_ {
827     /* RNDIS handle */
828     uint32_t                                ndis_vc_handle;
829     /* RNDIS status */
830     uint32_t                                status;
831     uint32_t                                status_buf_length;
832     uint32_t                                status_buf_offset;
833 } rcondis_indicate_status;
834
835 /*
836  * CONDIS Call/VC parameters
837  */
838
839 typedef struct rcondis_specific_parameters_ {
840     uint32_t                                parameter_type;
841     uint32_t                                parameter_length;
842     uint32_t                                parameter_offset;
843 } rcondis_specific_parameters;
844
845 typedef struct rcondis_media_parameters_ {
846     uint32_t                                flags;
847     uint32_t                                reserved1;
848     uint32_t                                reserved2;
849     rcondis_specific_parameters             media_specific;
850 } rcondis_media_parameters;
851
852 typedef struct rndis_flowspec_ {
853     uint32_t                                token_rate;
854     uint32_t                                token_bucket_size;
855     uint32_t                                peak_bandwidth;
856     uint32_t                                latency;
857     uint32_t                                delay_variation;
858     uint32_t                                service_type;
859     uint32_t                                max_sdu_size;
860     uint32_t                                minimum_policed_size;
861 } rndis_flowspec;
862
863 typedef struct rcondis_call_manager_parameters_ {
864     rndis_flowspec                          transmit;
865     rndis_flowspec                          receive;
866     rcondis_specific_parameters             call_mgr_specific;
867 } rcondis_call_manager_parameters;
868
869 /*
870  * CoNdisMiniportActivateVc message
871  */
872 typedef struct rcondis_mp_activate_vc_request_ {
873     /* RNDIS request ID */
874     uint32_t                                request_id;
875     uint32_t                                flags;
876     /* RNDIS handle */
877     uint32_t                                device_vc_handle;
878     uint32_t                                media_params_offset;
879     uint32_t                                media_params_length;
880     uint32_t                                call_mgr_params_offset;
881     uint32_t                                call_mgr_params_length;
882 } rcondis_mp_activate_vc_request;
883
884 /*
885  * Response to CoNdisMiniportActivateVc
886  */
887 typedef struct rcondis_mp_activate_vc_complete_ {
888     /* RNDIS request ID */
889     uint32_t                                request_id;
890     /* RNDIS status */
891     uint32_t                                status;
892 } rcondis_mp_activate_vc_complete;
893
894 /*
895  * CoNdisMiniportDeactivateVc message
896  */
897 typedef struct rcondis_mp_deactivate_vc_request_ {
898     /* RNDIS request ID */
899     uint32_t                                request_id;
900     uint32_t                                flags;
901     /* RNDIS handle */
902     uint32_t                                device_vc_handle;
903 } rcondis_mp_deactivate_vc_request;
904
905 /*
906  * Response to CoNdisMiniportDeactivateVc
907  */
908 typedef struct rcondis_mp_deactivate_vc_complete_ {
909     /* RNDIS request ID */
910     uint32_t                                request_id;
911     /* RNDIS status */
912     uint32_t                                status;
913 } rcondis_mp_deactivate_vc_complete;
914
915 /*
916  * union with all of the RNDIS messages
917  */
918 typedef union rndis_msg_container_ {
919     rndis_packet                            packet;
920     rndis_initialize_request                init_request;
921     rndis_halt_request                      halt_request;
922     rndis_query_request                     query_request;
923     rndis_set_request                       set_request;
924     rndis_reset_request                     reset_request;
925     rndis_keepalive_request                 keepalive_request;
926     rndis_indicate_status                   indicate_status;
927     rndis_initialize_complete               init_complete;
928     rndis_query_complete                    query_complete;
929     rndis_set_complete                      set_complete;
930     rndis_reset_complete                    reset_complete;
931     rndis_keepalive_complete                keepalive_complete;
932     rcondis_mp_create_vc                    co_miniport_create_vc;
933     rcondis_mp_delete_vc                    co_miniport_delete_vc;
934     rcondis_indicate_status                 co_miniport_status;
935     rcondis_mp_activate_vc_request          co_miniport_activate_vc;
936     rcondis_mp_deactivate_vc_request        co_miniport_deactivate_vc;
937     rcondis_mp_create_vc_complete           co_miniport_create_vc_complete;
938     rcondis_mp_delete_vc_complete           co_miniport_delete_vc_complete;
939     rcondis_mp_activate_vc_complete         co_miniport_activate_vc_complete;
940     rcondis_mp_deactivate_vc_complete       co_miniport_deactivate_vc_complete;
941     rndis_packet_ex                         packet_ex;
942 } rndis_msg_container;
943
944 /*
945  * Remote NDIS message format
946  */
947 typedef struct rndis_msg_ {
948     uint32_t                                ndis_msg_type;
949
950     /*
951      * Total length of this message, from the beginning
952      * of the rndis_msg struct, in bytes.
953      */
954     uint32_t                                msg_len;
955
956     /* Actual message */
957     rndis_msg_container                     msg;
958 } rndis_msg;
959
960
961 /*
962  * Handy macros
963  */
964
965 /*
966  * get the size of an RNDIS message. Pass in the message type, 
967  * rndis_set_request, rndis_packet for example
968  */
969 #define RNDIS_MESSAGE_SIZE(message)                             \
970     (sizeof(message) + (sizeof(rndis_msg) - sizeof(rndis_msg_container)))
971
972 /*
973  * get pointer to info buffer with message pointer
974  */
975 #define MESSAGE_TO_INFO_BUFFER(message)                         \
976     (((PUCHAR)(message)) + message->InformationBufferOffset)
977
978 /*
979  * get pointer to status buffer with message pointer
980  */
981 #define MESSAGE_TO_STATUS_BUFFER(message)                       \
982     (((PUCHAR)(message)) + message->StatusBufferOffset)
983
984 /*
985  * get pointer to OOBD buffer with message pointer
986  */
987 #define MESSAGE_TO_OOBD_BUFFER(message)                         \
988     (((PUCHAR)(message)) + message->OOBDataOffset)
989
990 /*
991  * get pointer to data buffer with message pointer
992  */
993 #define MESSAGE_TO_DATA_BUFFER(message)                         \
994     (((PUCHAR)(message)) + message->PerPacketInfoOffset)
995
996 /*
997  * get pointer to contained message from NDIS_MESSAGE pointer
998  */
999 #define RNDIS_MESSAGE_PTR_TO_MESSAGE_PTR(rndis_message)         \
1000     ((void *) &rndis_message->Message)
1001
1002 /*
1003  * get pointer to contained message from NDIS_MESSAGE pointer
1004  */
1005 #define RNDIS_MESSAGE_RAW_PTR_TO_MESSAGE_PTR(rndis_message)     \
1006     ((void *) rndis_message)
1007
1008
1009
1010 /*
1011  * Structures used in OID_RNDISMP_GET_RECEIVE_BUFFERS
1012  */
1013
1014 #define RNDISMP_RECEIVE_BUFFER_ELEM_FLAG_VMQ_RECEIVE_BUFFER 0x00000001
1015
1016 typedef struct rndismp_rx_buf_elem_ {
1017     uint32_t                            flags;
1018     uint32_t                            length;
1019     uint64_t                            rx_buf_id;
1020     uint32_t                            gpadl_handle;
1021     void                                *rx_buf;
1022 } rndismp_rx_buf_elem;
1023
1024 typedef struct rndismp_rx_bufs_info_ {
1025     uint32_t                            num_rx_bufs;
1026     rndismp_rx_buf_elem                 rx_buf_elems[1];
1027 } rndismp_rx_bufs_info;
1028
1029
1030
1031 #define RNDIS_HEADER_SIZE (sizeof(rndis_msg) - sizeof(rndis_msg_container))
1032
1033 #define NDIS_PACKET_TYPE_DIRECTED       0x00000001
1034 #define NDIS_PACKET_TYPE_MULTICAST      0x00000002
1035 #define NDIS_PACKET_TYPE_ALL_MULTICAST  0x00000004
1036 #define NDIS_PACKET_TYPE_BROADCAST      0x00000008
1037 #define NDIS_PACKET_TYPE_SOURCE_ROUTING 0x00000010
1038 #define NDIS_PACKET_TYPE_PROMISCUOUS    0x00000020
1039 #define NDIS_PACKET_TYPE_SMT            0x00000040
1040 #define NDIS_PACKET_TYPE_ALL_LOCAL      0x00000080
1041 #define NDIS_PACKET_TYPE_GROUP          0x00000100
1042 #define NDIS_PACKET_TYPE_ALL_FUNCTIONAL 0x00000200
1043 #define NDIS_PACKET_TYPE_FUNCTIONAL     0x00000400
1044 #define NDIS_PACKET_TYPE_MAC_FRAME      0x00000800
1045
1046 /*
1047  * Externs
1048  */
1049 int netvsc_recv(struct hv_device *device_ctx, 
1050     netvsc_packet *packet, 
1051     rndis_tcp_ip_csum_info *csum_info);
1052
1053 void* hv_set_rppi_data(rndis_msg *rndis_mesg,
1054     uint32_t rppi_size,
1055     int pkt_type);
1056
1057 void* hv_get_ppi_data(rndis_packet *rpkt, uint32_t type);
1058
1059 #endif  /* __HV_RNDIS_H__ */
1060