]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/blob - sys/dev/hyperv/netvsc/hv_rndis.h
MFC 296181,296184,296187,296188,296252,296253,296289,296290
[FreeBSD/stable/10.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 #define nbl_hash_value  pkt_cancel_id
612
613 typedef struct ndis_8021q_info_ {
614         union {
615                 struct {
616                         uint32_t   user_pri : 3;  /* User Priority */
617                         uint32_t   cfi      : 1;  /* Canonical Format ID */
618                         uint32_t   vlan_id  : 12;
619                         uint32_t   reserved : 16;
620                 } s1;
621                 uint32_t    value;
622         } u1;
623 } ndis_8021q_info;
624
625 struct ndis_hash_info {
626         uint32_t        hash;
627 } __packed;
628
629 struct rndis_object_header {
630         uint8_t type;
631         uint8_t revision;
632         uint16_t size;
633 };
634
635 typedef struct rndis_offload_params_ {
636         struct rndis_object_header header;
637         uint8_t ipv4_csum;
638         uint8_t tcp_ipv4_csum;
639         uint8_t udp_ipv4_csum;
640         uint8_t tcp_ipv6_csum;
641         uint8_t udp_ipv6_csum;
642         uint8_t lso_v1;
643         uint8_t ip_sec_v1;
644         uint8_t lso_v2_ipv4;
645         uint8_t lso_v2_ipv6;
646         uint8_t tcp_connection_ipv4;
647         uint8_t tcp_connection_ipv6;
648         uint32_t flags;
649         uint8_t ip_sec_v2;
650         uint8_t ip_sec_v2_ipv4;
651         struct {
652                 uint8_t rsc_ipv4;
653                 uint8_t rsc_ipv6;
654         };
655         struct {
656                 uint8_t encapsulated_packet_task_offload;
657                 uint8_t encapsulation_types;
658         };
659
660 } rndis_offload_params;
661
662
663 typedef struct rndis_tcp_ip_csum_info_ {
664         union {
665                 struct {
666                         uint32_t is_ipv4:1;
667                         uint32_t is_ipv6:1;
668                         uint32_t tcp_csum:1;
669                         uint32_t udp_csum:1;
670                         uint32_t ip_header_csum:1;
671                         uint32_t reserved:11;
672                         uint32_t tcp_header_offset:10;
673                 } xmit;
674                 struct {
675                         uint32_t tcp_csum_failed:1;
676                         uint32_t udp_csum_failed:1;
677                         uint32_t ip_csum_failed:1;
678                         uint32_t tcp_csum_succeeded:1;
679                         uint32_t udp_csum_succeeded:1;
680                         uint32_t ip_csum_succeeded:1;
681                         uint32_t loopback:1;
682                         uint32_t tcp_csum_value_invalid:1;
683                         uint32_t ip_csum_value_invalid:1;
684                 } receive;
685                 uint32_t  value;
686         };
687 } rndis_tcp_ip_csum_info;
688
689 typedef struct rndis_tcp_tso_info_ {
690         union {
691                 struct {
692                         uint32_t unused:30;
693                         uint32_t type:1;
694                         uint32_t reserved2:1;
695                 } xmit;
696                 struct {
697                         uint32_t mss:20;
698                         uint32_t tcp_header_offset:10;
699                         uint32_t type:1;
700                         uint32_t reserved2:1;
701                 } lso_v1_xmit;
702                 struct {
703                         uint32_t tcp_payload:30;
704                         uint32_t type:1;
705                         uint32_t reserved2:1;
706                 } lso_v1_xmit_complete;
707                 struct {
708                         uint32_t mss:20;
709                         uint32_t tcp_header_offset:10;
710                         uint32_t type:1;
711                         uint32_t ip_version:1;
712                 } lso_v2_xmit;
713                 struct {
714                         uint32_t reserved:30;
715                         uint32_t type:1;
716                         uint32_t reserved2:1;
717                 } lso_v2_xmit_complete;
718                 uint32_t  value;
719         };
720 } rndis_tcp_tso_info;
721
722 #define RNDIS_HASH_PPI_SIZE     (sizeof(rndis_per_packet_info) + \
723                                 sizeof(struct ndis_hash_info))
724
725 #define RNDIS_VLAN_PPI_SIZE     (sizeof(rndis_per_packet_info) + \
726                                 sizeof(ndis_8021q_info))
727
728 #define RNDIS_CSUM_PPI_SIZE     (sizeof(rndis_per_packet_info) + \
729                                 sizeof(rndis_tcp_ip_csum_info))
730
731 #define RNDIS_TSO_PPI_SIZE      (sizeof(rndis_per_packet_info) + \
732                                 sizeof(rndis_tcp_tso_info))
733
734 /*
735  * Format of Information buffer passed in a SetRequest for the OID
736  * OID_GEN_RNDIS_CONFIG_PARAMETER.
737  */
738 typedef struct rndis_config_parameter_info_ {
739     uint32_t                                parameter_name_offset;
740     uint32_t                                parameter_name_length;
741     uint32_t                                parameter_type;
742     uint32_t                                parameter_value_offset;
743     uint32_t                                parameter_value_length;
744 } rndis_config_parameter_info;
745
746 /*
747  * Values for ParameterType in rndis_config_parameter_info
748  */
749 #define RNDIS_CONFIG_PARAM_TYPE_INTEGER     0
750 #define RNDIS_CONFIG_PARAM_TYPE_STRING      2
751
752
753 /*
754  * CONDIS Miniport messages for connection oriented devices
755  * that do not implement a call manager.
756  */
757
758 /*
759  * CoNdisMiniportCreateVc message
760  */
761 typedef struct rcondis_mp_create_vc_ {
762     /* RNDIS request ID */
763     uint32_t                                request_id;
764     /* RNDIS handle */
765     uint32_t                                ndis_vc_handle;
766 } rcondis_mp_create_vc;
767
768 /*
769  * Response to CoNdisMiniportCreateVc
770  */
771 typedef struct rcondis_mp_create_vc_complete_ {
772     /* RNDIS request ID */
773     uint32_t                                request_id;
774     /* RNDIS handle */
775     uint32_t                                device_vc_handle;
776     /* RNDIS status */
777     uint32_t                                status;
778 } rcondis_mp_create_vc_complete;
779
780 /*
781  * CoNdisMiniportDeleteVc message
782  */
783 typedef struct rcondis_mp_delete_vc_ {
784     /* RNDIS request ID */
785     uint32_t                                request_id;
786     /* RNDIS handle */
787     uint32_t                                device_vc_handle;
788 } rcondis_mp_delete_vc;
789
790 /*
791  * Response to CoNdisMiniportDeleteVc
792  */
793 typedef struct rcondis_mp_delete_vc_complete_ {
794     /* RNDIS request ID */
795     uint32_t                                request_id;
796     /* RNDIS status */
797     uint32_t                                status;
798 } rcondis_mp_delete_vc_complete;
799
800 /*
801  * CoNdisMiniportQueryRequest message
802  */
803 typedef struct rcondis_mp_query_request_ {
804     /* RNDIS request ID */
805     uint32_t                                request_id;
806     /* RNDIS request type */
807     uint32_t                                request_type;
808     /* RNDIS OID */
809     uint32_t                                oid;
810     /* RNDIS handle */
811     uint32_t                                device_vc_handle;
812     uint32_t                                info_buf_length;
813     uint32_t                                info_buf_offset;
814 } rcondis_mp_query_request;
815
816 /*
817  * CoNdisMiniportSetRequest message
818  */
819 typedef struct rcondis_mp_set_request_ {
820     /* RNDIS request ID */
821     uint32_t                                request_id;
822     /* RNDIS request type */
823     uint32_t                                request_type;
824     /* RNDIS OID */
825     uint32_t                                oid;
826     /* RNDIS handle */
827     uint32_t                                device_vc_handle;
828     uint32_t                                info_buf_length;
829     uint32_t                                info_buf_offset;
830 } rcondis_mp_set_request;
831
832 /*
833  * CoNdisIndicateStatus message
834  */
835 typedef struct rcondis_indicate_status_ {
836     /* RNDIS handle */
837     uint32_t                                ndis_vc_handle;
838     /* RNDIS status */
839     uint32_t                                status;
840     uint32_t                                status_buf_length;
841     uint32_t                                status_buf_offset;
842 } rcondis_indicate_status;
843
844 /*
845  * CONDIS Call/VC parameters
846  */
847
848 typedef struct rcondis_specific_parameters_ {
849     uint32_t                                parameter_type;
850     uint32_t                                parameter_length;
851     uint32_t                                parameter_offset;
852 } rcondis_specific_parameters;
853
854 typedef struct rcondis_media_parameters_ {
855     uint32_t                                flags;
856     uint32_t                                reserved1;
857     uint32_t                                reserved2;
858     rcondis_specific_parameters             media_specific;
859 } rcondis_media_parameters;
860
861 typedef struct rndis_flowspec_ {
862     uint32_t                                token_rate;
863     uint32_t                                token_bucket_size;
864     uint32_t                                peak_bandwidth;
865     uint32_t                                latency;
866     uint32_t                                delay_variation;
867     uint32_t                                service_type;
868     uint32_t                                max_sdu_size;
869     uint32_t                                minimum_policed_size;
870 } rndis_flowspec;
871
872 typedef struct rcondis_call_manager_parameters_ {
873     rndis_flowspec                          transmit;
874     rndis_flowspec                          receive;
875     rcondis_specific_parameters             call_mgr_specific;
876 } rcondis_call_manager_parameters;
877
878 /*
879  * CoNdisMiniportActivateVc message
880  */
881 typedef struct rcondis_mp_activate_vc_request_ {
882     /* RNDIS request ID */
883     uint32_t                                request_id;
884     uint32_t                                flags;
885     /* RNDIS handle */
886     uint32_t                                device_vc_handle;
887     uint32_t                                media_params_offset;
888     uint32_t                                media_params_length;
889     uint32_t                                call_mgr_params_offset;
890     uint32_t                                call_mgr_params_length;
891 } rcondis_mp_activate_vc_request;
892
893 /*
894  * Response to CoNdisMiniportActivateVc
895  */
896 typedef struct rcondis_mp_activate_vc_complete_ {
897     /* RNDIS request ID */
898     uint32_t                                request_id;
899     /* RNDIS status */
900     uint32_t                                status;
901 } rcondis_mp_activate_vc_complete;
902
903 /*
904  * CoNdisMiniportDeactivateVc message
905  */
906 typedef struct rcondis_mp_deactivate_vc_request_ {
907     /* RNDIS request ID */
908     uint32_t                                request_id;
909     uint32_t                                flags;
910     /* RNDIS handle */
911     uint32_t                                device_vc_handle;
912 } rcondis_mp_deactivate_vc_request;
913
914 /*
915  * Response to CoNdisMiniportDeactivateVc
916  */
917 typedef struct rcondis_mp_deactivate_vc_complete_ {
918     /* RNDIS request ID */
919     uint32_t                                request_id;
920     /* RNDIS status */
921     uint32_t                                status;
922 } rcondis_mp_deactivate_vc_complete;
923
924 /*
925  * union with all of the RNDIS messages
926  */
927 typedef union rndis_msg_container_ {
928     rndis_packet                            packet;
929     rndis_initialize_request                init_request;
930     rndis_halt_request                      halt_request;
931     rndis_query_request                     query_request;
932     rndis_set_request                       set_request;
933     rndis_reset_request                     reset_request;
934     rndis_keepalive_request                 keepalive_request;
935     rndis_indicate_status                   indicate_status;
936     rndis_initialize_complete               init_complete;
937     rndis_query_complete                    query_complete;
938     rndis_set_complete                      set_complete;
939     rndis_reset_complete                    reset_complete;
940     rndis_keepalive_complete                keepalive_complete;
941     rcondis_mp_create_vc                    co_miniport_create_vc;
942     rcondis_mp_delete_vc                    co_miniport_delete_vc;
943     rcondis_indicate_status                 co_miniport_status;
944     rcondis_mp_activate_vc_request          co_miniport_activate_vc;
945     rcondis_mp_deactivate_vc_request        co_miniport_deactivate_vc;
946     rcondis_mp_create_vc_complete           co_miniport_create_vc_complete;
947     rcondis_mp_delete_vc_complete           co_miniport_delete_vc_complete;
948     rcondis_mp_activate_vc_complete         co_miniport_activate_vc_complete;
949     rcondis_mp_deactivate_vc_complete       co_miniport_deactivate_vc_complete;
950     rndis_packet_ex                         packet_ex;
951 } rndis_msg_container;
952
953 /*
954  * Remote NDIS message format
955  */
956 typedef struct rndis_msg_ {
957     uint32_t                                ndis_msg_type;
958
959     /*
960      * Total length of this message, from the beginning
961      * of the rndis_msg struct, in bytes.
962      */
963     uint32_t                                msg_len;
964
965     /* Actual message */
966     rndis_msg_container                     msg;
967 } rndis_msg;
968
969
970 /*
971  * Handy macros
972  */
973
974 /*
975  * get the size of an RNDIS message. Pass in the message type, 
976  * rndis_set_request, rndis_packet for example
977  */
978 #define RNDIS_MESSAGE_SIZE(message)                             \
979     (sizeof(message) + (sizeof(rndis_msg) - sizeof(rndis_msg_container)))
980
981 /*
982  * get pointer to info buffer with message pointer
983  */
984 #define MESSAGE_TO_INFO_BUFFER(message)                         \
985     (((PUCHAR)(message)) + message->InformationBufferOffset)
986
987 /*
988  * get pointer to status buffer with message pointer
989  */
990 #define MESSAGE_TO_STATUS_BUFFER(message)                       \
991     (((PUCHAR)(message)) + message->StatusBufferOffset)
992
993 /*
994  * get pointer to OOBD buffer with message pointer
995  */
996 #define MESSAGE_TO_OOBD_BUFFER(message)                         \
997     (((PUCHAR)(message)) + message->OOBDataOffset)
998
999 /*
1000  * get pointer to data buffer with message pointer
1001  */
1002 #define MESSAGE_TO_DATA_BUFFER(message)                         \
1003     (((PUCHAR)(message)) + message->PerPacketInfoOffset)
1004
1005 /*
1006  * get pointer to contained message from NDIS_MESSAGE pointer
1007  */
1008 #define RNDIS_MESSAGE_PTR_TO_MESSAGE_PTR(rndis_message)         \
1009     ((void *) &rndis_message->Message)
1010
1011 /*
1012  * get pointer to contained message from NDIS_MESSAGE pointer
1013  */
1014 #define RNDIS_MESSAGE_RAW_PTR_TO_MESSAGE_PTR(rndis_message)     \
1015     ((void *) rndis_message)
1016
1017
1018
1019 /*
1020  * Structures used in OID_RNDISMP_GET_RECEIVE_BUFFERS
1021  */
1022
1023 #define RNDISMP_RECEIVE_BUFFER_ELEM_FLAG_VMQ_RECEIVE_BUFFER 0x00000001
1024
1025 typedef struct rndismp_rx_buf_elem_ {
1026     uint32_t                            flags;
1027     uint32_t                            length;
1028     uint64_t                            rx_buf_id;
1029     uint32_t                            gpadl_handle;
1030     void                                *rx_buf;
1031 } rndismp_rx_buf_elem;
1032
1033 typedef struct rndismp_rx_bufs_info_ {
1034     uint32_t                            num_rx_bufs;
1035     rndismp_rx_buf_elem                 rx_buf_elems[1];
1036 } rndismp_rx_bufs_info;
1037
1038
1039
1040 #define RNDIS_HEADER_SIZE (sizeof(rndis_msg) - sizeof(rndis_msg_container))
1041
1042 #define NDIS_PACKET_TYPE_DIRECTED       0x00000001
1043 #define NDIS_PACKET_TYPE_MULTICAST      0x00000002
1044 #define NDIS_PACKET_TYPE_ALL_MULTICAST  0x00000004
1045 #define NDIS_PACKET_TYPE_BROADCAST      0x00000008
1046 #define NDIS_PACKET_TYPE_SOURCE_ROUTING 0x00000010
1047 #define NDIS_PACKET_TYPE_PROMISCUOUS    0x00000020
1048 #define NDIS_PACKET_TYPE_SMT            0x00000040
1049 #define NDIS_PACKET_TYPE_ALL_LOCAL      0x00000080
1050 #define NDIS_PACKET_TYPE_GROUP          0x00000100
1051 #define NDIS_PACKET_TYPE_ALL_FUNCTIONAL 0x00000200
1052 #define NDIS_PACKET_TYPE_FUNCTIONAL     0x00000400
1053 #define NDIS_PACKET_TYPE_MAC_FRAME      0x00000800
1054
1055 /*
1056  * Externs
1057  */
1058 struct hv_vmbus_channel;
1059
1060 int netvsc_recv(struct hv_vmbus_channel *chan,
1061     netvsc_packet *packet, rndis_tcp_ip_csum_info *csum_info);
1062 void netvsc_channel_rollup(struct hv_vmbus_channel *chan);
1063
1064 void* hv_set_rppi_data(rndis_msg *rndis_mesg,
1065     uint32_t rppi_size,
1066     int pkt_type);
1067
1068 void* hv_get_ppi_data(rndis_packet *rpkt, uint32_t type);
1069
1070 #endif  /* __HV_RNDIS_H__ */
1071