49#if !defined(_WINDEF_H)
100#if !defined(NDIS_WRAPPER)
102#if (defined(NDIS_MINIPORT_MAJOR_VERSION) || \
103 (defined(NDIS_MINIPORT_MINOR_VERSION)) || \
104 (defined(NDIS_PROTOCOL_MAJOR_VERSION)) || \
105 (defined(NDIS_PROTOCOL_MINOR_VERSION)) || \
106 (defined(NDIS_FILTER_MAJOR_VERSION)) || \
107 (defined(NDIS_FILTER_MINOR_VERSION)))
108#error "Driver should not redefine NDIS reserved macros"
111#if defined(NDIS_MINIPORT_DRIVER)
113#if defined(NDIS620_MINIPORT)
114#define NDIS_MINIPORT_MAJOR_VERSION 6
115#define NDIS_MINIPORT_MINOR_VERSION 20
116#elif defined(NDIS61_MINIPORT)
117#define NDIS_MINIPORT_MAJOR_VERSION 6
118#define NDIS_MINIPORT_MINOR_VERSION 1
119#elif defined(NDIS60_MINIPORT)
120#define NDIS_MINIPORT_MAJOR_VERSION 6
121#define NDIS_MINIPORT_MINOR_VERSION 0
122#elif defined(NDIS51_MINIPORT)
123#define NDIS_MINIPORT_MAJOR_VERSION 5
124#define NDIS_MINIPORT_MINOR_VERSION 1
125#elif defined(NDIS50_MINIPORT)
126#define NDIS_MINIPORT_MAJOR_VERSION 5
127#define NDIS_MINIPORT_MINOR_VERSION 0
129#error "Only NDIS miniport drivers with version >= 5 are supported"
132#if ((NDIS_MINIPORT_MAJOR_VERSION == 6) && \
133 (NDIS_MINIPORT_MINOR_VERSION != 20) && \
134 (NDIS_MINIPORT_MINOR_VERSION != 1) && \
135 (NDIS_MINIPORT_MINOR_VERSION != 0))
136#error "Invalid miniport major/minor version combination"
137#elif ((NDIS_MINIPORT_MAJOR_VERSION == 5) && \
138 (NDIS_MINIPORT_MINOR_VERSION != 1) && \
139 (NDIS_MINIPORT_MINOR_VERSION != 0))
140#error "Invalid miniport major/minor version combination"
143#if (NDIS_MINIPORT_MAJOR_VERSION == 6) && \
144 ((NDIS_MINIPORT_MINOR_VERSION == 20 && NTDDI_VERSION < NTDDI_WIN7) || \
145 (NDIS_MINIPORT_MINOR_VERSION == 1 && NTDDI_VERSION < NTDDI_VISTA) || \
146 (NDIS_MINIPORT_MINOR_VERSION == 0 && NTDDI_VERSION < NTDDI_VISTA))
147#error "Wrong NDIS/DDI version"
148#elif ((NDIS_MINIPORT_MAJOR_VERSION == 5) && \
149 (((NDIS_MINIPORT_MINOR_VERSION == 1) && (NTDDI_VERSION < NTDDI_WINXP)) || \
150 ((NDIS_MINIPORT_MINOR_VERSION == 0) && (NTDDI_VERSION < NTDDI_WIN2K))))
151#error "Wrong NDIS/DDI version"
158#error "Only NDIS Protocol drivers version 4 or later are supported"
162#define NDIS_PROTOCOL_MAJOR_VERSION 6
163#define NDIS_PROTOCOL_MINOR_VERSION 20
164#define NDIS_FILTER_MAJOR_VERSION 6
165#define NDIS_FILTER_MINOR_VERSION 20
167#define NDIS_PROTOCOL_MAJOR_VERSION 6
168#define NDIS_PROTOCOL_MINOR_VERSION 1
169#define NDIS_FILTER_MAJOR_VERSION 6
170#define NDIS_FILTER_MINOR_VERSION 1
172#define NDIS_PROTOCOL_MAJOR_VERSION 6
173#define NDIS_PROTOCOL_MINOR_VERSION 0
174#define NDIS_FILTER_MAJOR_VERSION 6
175#define NDIS_FILTER_MINOR_VERSION 0
177#define NDIS_PROTOCOL_MAJOR_VERSION 5
178#define NDIS_PROTOCOL_MINOR_VERSION 1
180#define NDIS_PROTOCOL_MAJOR_VERSION 5
181#define NDIS_PROTOCOL_MINOR_VERSION 0
183#define NDIS_PROTOCOL_MAJOR_VERSION 4
184#define NDIS_PROTOCOL_MINOR_VERSION 0
187#if !defined(NDIS_MINIPORT_DRIVER) && !defined(NDIS_PROTOCOL_MAJOR_VERSION)
189#define NDIS_PROTOCOL_MAJOR_VERSION 4
190#define NDIS_PROTOCOL_MINOR_VERSION 0
193#if defined(NDIS_FILTER_MAJOR_VERSION)
195#if ((NDIS_FILTER_MAJOR_VERSION == 6) && \
196 (NDIS_FILTER_MINOR_VERSION != 20) && \
197 (NDIS_FILTER_MINOR_VERSION != 1) && \
198 (NDIS_FILTER_MINOR_VERSION != 0))
199#error "Invalid Filter version"
205#if defined(NDIS_PROTOCOL_MAJOR_VERSION)
207#if ((NDIS_PROTOCOL_MAJOR_VERSION == 6) && \
208 (NDIS_PROTOCOL_MINOR_VERSION != 20) && \
209 (NDIS_PROTOCOL_MINOR_VERSION != 1) && \
210 (NDIS_PROTOCOL_MINOR_VERSION != 0))
211#error "Invalid Protocol version"
212#elif ((NDIS_PROTOCOL_MAJOR_VERSION == 5) && \
213 (NDIS_PROTOCOL_MINOR_VERSION != 1) && (NDIS_PROTOCOL_MINOR_VERSION != 0))
214#error "Invalid Protocol version"
215#elif ((NDIS_PROTOCOL_MAJOR_VERSION == 4) && (NDIS_PROTOCOL_MINOR_VERSION != 0))
216#error "Invalid Protocol major/minor version"
219#if ((NDIS_PROTOCOL_MAJOR_VERSION == 6) && (NTDDI_VERSION < NTDDI_VISTA))
220#error "Wrong NDIS/DDI version"
227#if !defined(NDIS_LEGACY_MINIPORT)
229#if ((defined(NDIS_MINIPORT_DRIVER) && (NDIS_MINIPORT_MAJOR_VERSION < 6)) || NDIS_WRAPPER)
230#define NDIS_LEGACY_MINIPORT 1
232#define NDIS_LEGACY_MINIPORT 0
237#if !defined(NDIS_LEGACY_PROTOCOL)
239#if ((defined(NDIS_PROTOCOL_MAJOR_VERSION) && (NDIS_PROTOCOL_MAJOR_VERSION < 6)) || NDIS_WRAPPER)
240#define NDIS_LEGACY_PROTOCOL 1
242#define NDIS_LEGACY_PROTOCOL 0
247#if !defined(NDIS_LEGACY_DRIVER)
249#if (NDIS_LEGACY_MINIPORT || NDIS_LEGACY_PROTOCOL || NDIS_WRAPPER)
250#define NDIS_LEGACY_DRIVER 1
252#define NDIS_LEGACY_DRIVER 0
257#if !defined(NDIS_SUPPORT_NDIS6)
259#if ((defined (NDIS_MINIPORT_MAJOR_VERSION) && (NDIS_MINIPORT_MAJOR_VERSION >= 6)) || \
260 (defined (NDIS60)) || NDIS_WRAPPER)
261#define NDIS_SUPPORT_NDIS6 1
263#define NDIS_SUPPORT_NDIS6 0
268#if !defined(NDIS_SUPPORT_NDIS61)
269#if (((defined (NDIS_MINIPORT_MAJOR_VERSION) && (NDIS_MINIPORT_MAJOR_VERSION >= 6)) && \
270 (defined (NDIS_MINIPORT_MINOR_VERSION) && (NDIS_MINIPORT_MINOR_VERSION >= 1))) || \
271 (defined (NDIS61)) || NDIS_WRAPPER)
272#define NDIS_SUPPORT_NDIS61 1
274#define NDIS_SUPPORT_NDIS61 0
278#if !defined(NDIS_SUPPORT_NDIS620)
280#if (((defined (NDIS_MINIPORT_MAJOR_VERSION) && (NDIS_MINIPORT_MAJOR_VERSION >= 6)) && \
281 (defined (NDIS_MINIPORT_MINOR_VERSION) && (NDIS_MINIPORT_MINOR_VERSION >= 20))) || \
282 (defined (NDIS620)) || NDIS_WRAPPER)
283#define NDIS_SUPPORT_NDIS620 1
285#define NDIS_SUPPORT_NDIS620 0
290#if (NDIS_SUPPORT_NDIS620)
291#undef NDIS_SUPPORT_NDIS61
292#define NDIS_SUPPORT_NDIS61 1
295#if (NDIS_SUPPORT_NDIS61)
296#undef NDIS_SUPPORT_NDIS6
297#define NDIS_SUPPORT_NDIS6 1
300#if defined(NDIS61_MINIPORT) || defined(NDIS60_MINIPORT) || defined(NDIS61) || \
301 defined(NDIS60) || defined(NDIS_WRAPPER) || defined(NDIS_LEGACY_DRIVER)
302#define NDIS_SUPPORT_60_COMPATIBLE_API 1
304#define NDIS_SUPPORT_60_COMPATIBLE_API 0
307#if defined(NDIS_WRAPPER)
310#define NDISAPI DECLSPEC_IMPORT
313typedef PVOID QUEUED_CLOSE;
346#define NDIS_STATUS_SUCCESS ((NDIS_STATUS)STATUS_SUCCESS)
347#define NDIS_STATUS_PENDING ((NDIS_STATUS)STATUS_PENDING)
348#define NDIS_STATUS_NOT_RECOGNIZED ((NDIS_STATUS)0x00010001L)
349#define NDIS_STATUS_NOT_COPIED ((NDIS_STATUS)0x00010002L)
350#define NDIS_STATUS_NOT_ACCEPTED ((NDIS_STATUS)0x00010003L)
351#define NDIS_STATUS_CALL_ACTIVE ((NDIS_STATUS)0x00010007L)
352#define NDIS_STATUS_INDICATION_REQUIRED ((NDIS_STATUS)STATUS_NDIS_INDICATION_REQUIRED)
353#define NDIS_STATUS_ONLINE ((NDIS_STATUS)0x40010003L)
354#define NDIS_STATUS_RESET_START ((NDIS_STATUS)0x40010004L)
355#define NDIS_STATUS_RESET_END ((NDIS_STATUS)0x40010005L)
356#define NDIS_STATUS_RING_STATUS ((NDIS_STATUS)0x40010006L)
357#define NDIS_STATUS_CLOSED ((NDIS_STATUS)0x40010007L)
358#define NDIS_STATUS_WAN_LINE_UP ((NDIS_STATUS)0x40010008L)
359#define NDIS_STATUS_WAN_LINE_DOWN ((NDIS_STATUS)0x40010009L)
360#define NDIS_STATUS_WAN_FRAGMENT ((NDIS_STATUS)0x4001000AL)
361#define NDIS_STATUS_MEDIA_CONNECT ((NDIS_STATUS)0x4001000BL)
362#define NDIS_STATUS_MEDIA_DISCONNECT ((NDIS_STATUS)0x4001000CL)
363#define NDIS_STATUS_HARDWARE_LINE_UP ((NDIS_STATUS)0x4001000DL)
364#define NDIS_STATUS_HARDWARE_LINE_DOWN ((NDIS_STATUS)0x4001000EL)
365#define NDIS_STATUS_INTERFACE_UP ((NDIS_STATUS)0x4001000FL)
366#define NDIS_STATUS_INTERFACE_DOWN ((NDIS_STATUS)0x40010010L)
367#define NDIS_STATUS_MEDIA_BUSY ((NDIS_STATUS)0x40010011L)
368#define NDIS_STATUS_MEDIA_SPECIFIC_INDICATION ((NDIS_STATUS)0x40010012L)
369#define NDIS_STATUS_WW_INDICATION NDIS_STATUS_MEDIA_SPECIFIC_INDICATION
370#define NDIS_STATUS_LINK_SPEED_CHANGE ((NDIS_STATUS)0x40010013L)
371#define NDIS_STATUS_WAN_GET_STATS ((NDIS_STATUS)0x40010014L)
372#define NDIS_STATUS_WAN_CO_FRAGMENT ((NDIS_STATUS)0x40010015L)
373#define NDIS_STATUS_WAN_CO_LINKPARAMS ((NDIS_STATUS)0x40010016L)
374#if NDIS_SUPPORT_NDIS6
375#define NDIS_STATUS_LINK_STATE ((NDIS_STATUS)0x40010017L)
376#define NDIS_STATUS_NETWORK_CHANGE ((NDIS_STATUS)0x40010018L)
377#define NDIS_STATUS_MEDIA_SPECIFIC_INDICATION_EX ((NDIS_STATUS)0x40010019L)
378#define NDIS_STATUS_PORT_STATE ((NDIS_STATUS)0x40010022L)
379#define NDIS_STATUS_OPER_STATUS ((NDIS_STATUS)0x40010023L)
380#define NDIS_STATUS_PACKET_FILTER ((NDIS_STATUS)0x40010024L)
382#define NDIS_STATUS_WAN_CO_MTULINKPARAMS ((NDIS_STATUS)0x40010025L)
384#if NDIS_SUPPORT_NDIS6
386#define NDIS_STATUS_IP_OPER_STATUS ((NDIS_STATUS)0x40010026L)
388#define NDIS_STATUS_OFFLOAD_PAUSE ((NDIS_STATUS)0x40020001L)
389#define NDIS_STATUS_UPLOAD_ALL ((NDIS_STATUS)0x40020002L)
390#define NDIS_STATUS_OFFLOAD_RESUME ((NDIS_STATUS)0x40020003L)
391#define NDIS_STATUS_OFFLOAD_PARTIAL_SUCCESS ((NDIS_STATUS)0x40020004L)
392#define NDIS_STATUS_OFFLOAD_STATE_INVALID ((NDIS_STATUS)0x40020005L)
393#define NDIS_STATUS_TASK_OFFLOAD_CURRENT_CONFIG ((NDIS_STATUS)0x40020006L)
394#define NDIS_STATUS_TASK_OFFLOAD_HARDWARE_CAPABILITIES ((NDIS_STATUS)0x40020007L)
395#define NDIS_STATUS_OFFLOAD_ENCASPULATION_CHANGE ((NDIS_STATUS)0x40020008L)
396#define NDIS_STATUS_TCP_CONNECTION_OFFLOAD_HARDWARE_CAPABILITIES ((NDIS_STATUS)0x4002000BL)
398#if (NDIS_SUPPORT_NDIS61)
399#define NDIS_STATUS_HD_SPLIT_CURRENT_CONFIG ((NDIS_STATUS)0x4002000CL)
402#if (NDIS_SUPPORT_NDIS620)
403#define NDIS_STATUS_RECEIVE_QUEUE_STATE ((NDIS_STATUS)0x4002000DL)
406#define NDIS_STATUS_OFFLOAD_IM_RESERVED1 ((NDIS_STATUS)0x40020100L)
407#define NDIS_STATUS_OFFLOAD_IM_RESERVED2 ((NDIS_STATUS)0x40020101L)
408#define NDIS_STATUS_OFFLOAD_IM_RESERVED3 ((NDIS_STATUS)0x40020102L)
410#define NDIS_STATUS_DOT11_SCAN_CONFIRM ((NDIS_STATUS)0x40030000L)
411#define NDIS_STATUS_DOT11_MPDU_MAX_LENGTH_CHANGED ((NDIS_STATUS)0x40030001L)
412#define NDIS_STATUS_DOT11_ASSOCIATION_START ((NDIS_STATUS)0x40030002L)
413#define NDIS_STATUS_DOT11_ASSOCIATION_COMPLETION ((NDIS_STATUS)0x40030003L)
414#define NDIS_STATUS_DOT11_CONNECTION_START ((NDIS_STATUS)0x40030004L)
415#define NDIS_STATUS_DOT11_CONNECTION_COMPLETION ((NDIS_STATUS)0x40030005L)
416#define NDIS_STATUS_DOT11_ROAMING_START ((NDIS_STATUS)0x40030006L)
417#define NDIS_STATUS_DOT11_ROAMING_COMPLETION ((NDIS_STATUS)0x40030007L)
418#define NDIS_STATUS_DOT11_DISASSOCIATION ((NDIS_STATUS)0x40030008L)
419#define NDIS_STATUS_DOT11_TKIPMIC_FAILURE ((NDIS_STATUS)0x40030009L)
420#define NDIS_STATUS_DOT11_PMKID_CANDIDATE_LIST ((NDIS_STATUS)0x4003000AL)
421#define NDIS_STATUS_DOT11_PHY_STATE_CHANGED ((NDIS_STATUS)0x4003000BL)
422#define NDIS_STATUS_DOT11_LINK_QUALITY ((NDIS_STATUS)0x4003000CL)
423#define NDIS_STATUS_DOT11_INCOMING_ASSOC_STARTED ((NDIS_STATUS)0x4003000DL)
424#define NDIS_STATUS_DOT11_INCOMING_ASSOC_REQUEST_RECEIVED ((NDIS_STATUS)0x4003000EL)
425#define NDIS_STATUS_DOT11_INCOMING_ASSOC_COMPLETION ((NDIS_STATUS)0x4003000FL)
426#define NDIS_STATUS_DOT11_STOP_AP ((NDIS_STATUS)0x40030010L)
427#define NDIS_STATUS_DOT11_PHY_FREQUENCY_ADOPTED ((NDIS_STATUS)0x40030011L)
428#define NDIS_STATUS_DOT11_CAN_SUSTAIN_AP ((NDIS_STATUS)0x40030012L)
430#define NDIS_STATUS_WWAN_DEVICE_CAPS ((NDIS_STATUS)0x40041000)
431#define NDIS_STATUS_WWAN_READY_INFO ((NDIS_STATUS)0x40041001)
432#define NDIS_STATUS_WWAN_RADIO_STATE ((NDIS_STATUS)0x40041002)
433#define NDIS_STATUS_WWAN_PIN_INFO ((NDIS_STATUS)0x40041003)
434#define NDIS_STATUS_WWAN_PIN_LIST ((NDIS_STATUS)0x40041004)
435#define NDIS_STATUS_WWAN_HOME_PROVIDER ((NDIS_STATUS)0x40041005)
436#define NDIS_STATUS_WWAN_PREFERRED_PROVIDERS ((NDIS_STATUS)0x40041006)
437#define NDIS_STATUS_WWAN_VISIBLE_PROVIDERS ((NDIS_STATUS)0x40041007)
438#define NDIS_STATUS_WWAN_REGISTER_STATE ((NDIS_STATUS)0x40041008)
439#define NDIS_STATUS_WWAN_PACKET_SERVICE ((NDIS_STATUS)0x40041009)
440#define NDIS_STATUS_WWAN_SIGNAL_STATE ((NDIS_STATUS)0x4004100a)
441#define NDIS_STATUS_WWAN_CONTEXT_STATE ((NDIS_STATUS)0x4004100b)
442#define NDIS_STATUS_WWAN_PROVISIONED_CONTEXTS ((NDIS_STATUS)0x4004100c)
443#define NDIS_STATUS_WWAN_SERVICE_ACTIVATION ((NDIS_STATUS)0x4004100d)
444#define NDIS_STATUS_WWAN_SMS_CONFIGURATION ((NDIS_STATUS)0x4004100e)
445#define NDIS_STATUS_WWAN_SMS_RECEIVE ((NDIS_STATUS)0x4004100f)
446#define NDIS_STATUS_WWAN_SMS_SEND ((NDIS_STATUS)0x40041010)
447#define NDIS_STATUS_WWAN_SMS_DELETE ((NDIS_STATUS)0x40041011)
448#define NDIS_STATUS_WWAN_SMS_STATUS ((NDIS_STATUS)0x40041012)
449#define NDIS_STATUS_WWAN_DNS_ADDRESS ((NDIS_STATUS)0x40041013)
451#define NDIS_STATUS_WWAN_VENDOR_SPECIFIC ((NDIS_STATUS)0x40043000)
455#if (NDIS_SUPPORT_NDIS620)
456#define NDIS_STATUS_PM_WOL_PATTERN_REJECTED ((NDIS_STATUS)0x40030051L)
457#define NDIS_STATUS_PM_OFFLOAD_REJECTED ((NDIS_STATUS)0x40030052L)
458#define NDIS_STATUS_PM_CAPABILITIES_CHANGE ((NDIS_STATUS)0x40030053L)
461#define NDIS_STATUS_NOT_RESETTABLE ((NDIS_STATUS)0x80010001L)
462#define NDIS_STATUS_SOFT_ERRORS ((NDIS_STATUS)0x80010003L)
463#define NDIS_STATUS_HARD_ERRORS ((NDIS_STATUS)0x80010004L)
464#define NDIS_STATUS_BUFFER_OVERFLOW ((NDIS_STATUS)STATUS_BUFFER_OVERFLOW)
465#define NDIS_STATUS_FAILURE ((NDIS_STATUS)STATUS_UNSUCCESSFUL)
466#define NDIS_STATUS_RESOURCES ((NDIS_STATUS)STATUS_INSUFFICIENT_RESOURCES)
467#define NDIS_STATUS_CLOSING ((NDIS_STATUS)0xC0010002L)
468#define NDIS_STATUS_BAD_VERSION ((NDIS_STATUS)0xC0010004L)
469#define NDIS_STATUS_BAD_CHARACTERISTICS ((NDIS_STATUS)0xC0010005L)
470#define NDIS_STATUS_ADAPTER_NOT_FOUND ((NDIS_STATUS)0xC0010006L)
471#define NDIS_STATUS_OPEN_FAILED ((NDIS_STATUS)0xC0010007L)
472#define NDIS_STATUS_DEVICE_FAILED ((NDIS_STATUS)0xC0010008L)
473#define NDIS_STATUS_MULTICAST_FULL ((NDIS_STATUS)0xC0010009L)
474#define NDIS_STATUS_MULTICAST_EXISTS ((NDIS_STATUS)0xC001000AL)
475#define NDIS_STATUS_MULTICAST_NOT_FOUND ((NDIS_STATUS)0xC001000BL)
476#define NDIS_STATUS_REQUEST_ABORTED ((NDIS_STATUS)0xC001000CL)
477#define NDIS_STATUS_RESET_IN_PROGRESS ((NDIS_STATUS)0xC001000DL)
478#define NDIS_STATUS_CLOSING_INDICATING ((NDIS_STATUS)0xC001000EL)
479#define NDIS_STATUS_NOT_SUPPORTED ((NDIS_STATUS)STATUS_NOT_SUPPORTED)
480#define NDIS_STATUS_INVALID_PACKET ((NDIS_STATUS)0xC001000FL)
481#define NDIS_STATUS_OPEN_LIST_FULL ((NDIS_STATUS)0xC0010010L)
482#define NDIS_STATUS_ADAPTER_NOT_READY ((NDIS_STATUS)0xC0010011L)
483#define NDIS_STATUS_ADAPTER_NOT_OPEN ((NDIS_STATUS)0xC0010012L)
484#define NDIS_STATUS_NOT_INDICATING ((NDIS_STATUS)0xC0010013L)
485#define NDIS_STATUS_INVALID_LENGTH ((NDIS_STATUS)0xC0010014L)
486#define NDIS_STATUS_INVALID_DATA ((NDIS_STATUS)0xC0010015L)
487#define NDIS_STATUS_BUFFER_TOO_SHORT ((NDIS_STATUS)0xC0010016L)
488#define NDIS_STATUS_INVALID_OID ((NDIS_STATUS)0xC0010017L)
489#define NDIS_STATUS_ADAPTER_REMOVED ((NDIS_STATUS)0xC0010018L)
490#define NDIS_STATUS_UNSUPPORTED_MEDIA ((NDIS_STATUS)0xC0010019L)
491#define NDIS_STATUS_GROUP_ADDRESS_IN_USE ((NDIS_STATUS)0xC001001AL)
492#define NDIS_STATUS_FILE_NOT_FOUND ((NDIS_STATUS)0xC001001BL)
493#define NDIS_STATUS_ERROR_READING_FILE ((NDIS_STATUS)0xC001001CL)
494#define NDIS_STATUS_ALREADY_MAPPED ((NDIS_STATUS)0xC001001DL)
495#define NDIS_STATUS_RESOURCE_CONFLICT ((NDIS_STATUS)0xC001001EL)
496#define NDIS_STATUS_NO_CABLE ((NDIS_STATUS)0xC001001FL)
498#define NDIS_STATUS_INVALID_SAP ((NDIS_STATUS)0xC0010020L)
499#define NDIS_STATUS_SAP_IN_USE ((NDIS_STATUS)0xC0010021L)
500#define NDIS_STATUS_INVALID_ADDRESS ((NDIS_STATUS)0xC0010022L)
501#define NDIS_STATUS_VC_NOT_ACTIVATED ((NDIS_STATUS)0xC0010023L)
502#define NDIS_STATUS_DEST_OUT_OF_ORDER ((NDIS_STATUS)0xC0010024L)
503#define NDIS_STATUS_VC_NOT_AVAILABLE ((NDIS_STATUS)0xC0010025L)
504#define NDIS_STATUS_CELLRATE_NOT_AVAILABLE ((NDIS_STATUS)0xC0010026L)
505#define NDIS_STATUS_INCOMPATABLE_QOS ((NDIS_STATUS)0xC0010027L)
506#define NDIS_STATUS_AAL_PARAMS_UNSUPPORTED ((NDIS_STATUS)0xC0010028L)
507#define NDIS_STATUS_NO_ROUTE_TO_DESTINATION ((NDIS_STATUS)0xC0010029L)
509#define NDIS_STATUS_TOKEN_RING_OPEN_ERROR ((NDIS_STATUS)0xC0011000L)
510#define NDIS_STATUS_INVALID_DEVICE_REQUEST ((NDIS_STATUS)STATUS_INVALID_DEVICE_REQUEST)
511#define NDIS_STATUS_NETWORK_UNREACHABLE ((NDIS_STATUS)STATUS_NETWORK_UNREACHABLE)
512#define NDIS_STATUS_HOST_UNREACHABLE ((NDIS_STATUS)STATUS_HOST_UNREACHABLE)
514#if NDIS_SUPPORT_NDIS6
516#define NDIS_STATUS_SEND_ABORTED ((NDIS_STATUS)STATUS_NDIS_REQUEST_ABORTED)
517#define NDIS_STATUS_PAUSED ((NDIS_STATUS)STATUS_NDIS_PAUSED)
518#define NDIS_STATUS_INTERFACE_NOT_FOUND ((NDIS_STATUS)STATUS_NDIS_INTERFACE_NOT_FOUND)
519#define NDIS_STATUS_INVALID_PARAMETER ((NDIS_STATUS)STATUS_INVALID_PARAMETER)
520#define NDIS_STATUS_UNSUPPORTED_REVISION ((NDIS_STATUS)STATUS_NDIS_UNSUPPORTED_REVISION)
521#define NDIS_STATUS_INVALID_PORT ((NDIS_STATUS)STATUS_NDIS_INVALID_PORT)
522#define NDIS_STATUS_INVALID_PORT_STATE ((NDIS_STATUS)STATUS_NDIS_INVALID_PORT_STATE)
523#define NDIS_STATUS_INVALID_STATE ((NDIS_STATUS)STATUS_INVALID_DEVICE_STATE)
524#define NDIS_STATUS_MEDIA_DISCONNECTED ((NDIS_STATUS)STATUS_NDIS_MEDIA_DISCONNECTED)
525#define NDIS_STATUS_LOW_POWER_STATE ((NDIS_STATUS)STATUS_NDIS_LOW_POWER_STATE)
526#define NDIS_STATUS_DOT11_AUTO_CONFIG_ENABLED ((NDIS_STATUS)STATUS_NDIS_DOT11_AUTO_CONFIG_ENABLED)
527#define NDIS_STATUS_DOT11_MEDIA_IN_USE ((NDIS_STATUS)STATUS_NDIS_DOT11_MEDIA_IN_USE)
528#define NDIS_STATUS_DOT11_POWER_STATE_INVALID ((NDIS_STATUS)STATUS_NDIS_DOT11_POWER_STATE_INVALID)
529#define NDIS_STATUS_UPLOAD_IN_PROGRESS ((NDIS_STATUS)0xC0231001L)
530#define NDIS_STATUS_REQUEST_UPLOAD ((NDIS_STATUS)0xC0231002L)
531#define NDIS_STATUS_UPLOAD_REQUESTED ((NDIS_STATUS)0xC0231003L)
532#define NDIS_STATUS_OFFLOAD_TCP_ENTRIES ((NDIS_STATUS)0xC0231004L)
533#define NDIS_STATUS_OFFLOAD_PATH_ENTRIES ((NDIS_STATUS)0xC0231005L)
534#define NDIS_STATUS_OFFLOAD_NEIGHBOR_ENTRIES ((NDIS_STATUS)0xC0231006L)
535#define NDIS_STATUS_OFFLOAD_IP_ADDRESS_ENTRIES ((NDIS_STATUS)0xC0231007L)
536#define NDIS_STATUS_OFFLOAD_HW_ADDRESS_ENTRIES ((NDIS_STATUS)0xC0231008L)
537#define NDIS_STATUS_OFFLOAD_VLAN_ENTRIES ((NDIS_STATUS)0xC0231009L)
538#define NDIS_STATUS_OFFLOAD_TCP_XMIT_BUFFER ((NDIS_STATUS)0xC023100AL)
539#define NDIS_STATUS_OFFLOAD_TCP_RCV_BUFFER ((NDIS_STATUS)0xC023100BL)
540#define NDIS_STATUS_OFFLOAD_TCP_RCV_WINDOW ((NDIS_STATUS)0xC023100CL)
541#define NDIS_STATUS_OFFLOAD_VLAN_MISMATCH ((NDIS_STATUS)0xC023100DL)
542#define NDIS_STATUS_OFFLOAD_DATA_NOT_ACCEPTED ((NDIS_STATUS)0xC023100EL)
543#define NDIS_STATUS_OFFLOAD_POLICY ((NDIS_STATUS)0xC023100FL)
544#define NDIS_STATUS_OFFLOAD_DATA_PARTIALLY_ACCEPTED ((NDIS_STATUS)0xC0231010L)
545#define NDIS_STATUS_OFFLOAD_REQUEST_RESET ((NDIS_STATUS)0xC0231011L)
547#if NDIS_SUPPORT_NDIS620
548#define NDIS_STATUS_PM_WOL_PATTERN_LIST_FULL ((NDIS_STATUS)STATUS_NDIS_PM_WOL_PATTERN_LIST_FULL)
549#define NDIS_STATUS_PM_PROTOCOL_OFFLOAD_LIST_FULL ((NDIS_STATUS)STATUS_NDIS_PM_PROTOCOL_OFFLOAD_LIST_FULL)
554#if (NDIS_SUPPORT_NDIS620)
555#define NDIS_STATUS_OFFLOAD_CONNECTION_REJECTED ((NDIS_STATUS)STATUS_NDIS_OFFLOAD_CONNECTION_REJECTED)
560#define NDIS_ERROR_CODE ULONG
562#define NDIS_ERROR_CODE_RESOURCE_CONFLICT EVENT_NDIS_RESOURCE_CONFLICT
563#define NDIS_ERROR_CODE_OUT_OF_RESOURCES EVENT_NDIS_OUT_OF_RESOURCE
564#define NDIS_ERROR_CODE_HARDWARE_FAILURE EVENT_NDIS_HARDWARE_FAILURE
565#define NDIS_ERROR_CODE_ADAPTER_NOT_FOUND EVENT_NDIS_ADAPTER_NOT_FOUND
566#define NDIS_ERROR_CODE_INTERRUPT_CONNECT EVENT_NDIS_INTERRUPT_CONNECT
567#define NDIS_ERROR_CODE_DRIVER_FAILURE EVENT_NDIS_DRIVER_FAILURE
568#define NDIS_ERROR_CODE_BAD_VERSION EVENT_NDIS_BAD_VERSION
569#define NDIS_ERROR_CODE_TIMEOUT EVENT_NDIS_TIMEOUT
570#define NDIS_ERROR_CODE_NETWORK_ADDRESS EVENT_NDIS_NETWORK_ADDRESS
571#define NDIS_ERROR_CODE_UNSUPPORTED_CONFIGURATION EVENT_NDIS_UNSUPPORTED_CONFIGURATION
572#define NDIS_ERROR_CODE_INVALID_VALUE_FROM_ADAPTER EVENT_NDIS_INVALID_VALUE_FROM_ADAPTER
573#define NDIS_ERROR_CODE_MISSING_CONFIGURATION_PARAMETER EVENT_NDIS_MISSING_CONFIGURATION_PARAMETER
574#define NDIS_ERROR_CODE_BAD_IO_BASE_ADDRESS EVENT_NDIS_BAD_IO_BASE_ADDRESS
575#define NDIS_ERROR_CODE_RECEIVE_SPACE_SMALL EVENT_NDIS_RECEIVE_SPACE_SMALL
576#define NDIS_ERROR_CODE_ADAPTER_DISABLED EVENT_NDIS_ADAPTER_DISABLED
579#define NDIS_MEMORY_CONTIGUOUS 0x00000001
580#define NDIS_MEMORY_NONCACHED 0x00000002
583#define NDIS_ATTRIBUTE_IGNORE_PACKET_TIMEOUT 0x00000001
584#define NDIS_ATTRIBUTE_IGNORE_REQUEST_TIMEOUT 0x00000002
585#define NDIS_ATTRIBUTE_IGNORE_TOKEN_RING_ERRORS 0x00000004
586#define NDIS_ATTRIBUTE_BUS_MASTER 0x00000008
587#define NDIS_ATTRIBUTE_INTERMEDIATE_DRIVER 0x00000010
588#define NDIS_ATTRIBUTE_DESERIALIZE 0x00000020
589#define NDIS_ATTRIBUTE_NO_HALT_ON_SUSPEND 0x00000040
590#define NDIS_ATTRIBUTE_SURPRISE_REMOVE_OK 0x00000080
591#define NDIS_ATTRIBUTE_NOT_CO_NDIS 0x00000100
592#define NDIS_ATTRIBUTE_USES_SAFE_BUFFER_APIS 0x00000200
596#if NDIS_SUPPORT_60_COMPATIBLE_API
635(
NTAPI NDIS_TIMER_FUNCTION)(
655#define READABLE_LOCAL_CLOCK 0x00000001
656#define CLOCK_NETWORK_DERIVED 0x00000002
657#define CLOCK_PRECISION 0x00000004
658#define RECEIVE_TIME_INDICATION_CAPABLE 0x00000008
659#define TIMED_SEND_CAPABLE 0x00000010
660#define TIME_STAMP_CAPABLE 0x00000020
663#define NDIS_PACKET_TYPE_DIRECTED 0x00000001
664#define NDIS_PACKET_TYPE_MULTICAST 0x00000002
665#define NDIS_PACKET_TYPE_ALL_MULTICAST 0x00000004
666#define NDIS_PACKET_TYPE_BROADCAST 0x00000008
667#define NDIS_PACKET_TYPE_SOURCE_ROUTING 0x00000010
668#define NDIS_PACKET_TYPE_PROMISCUOUS 0x00000020
669#define NDIS_PACKET_TYPE_SMT 0x00000040
670#define NDIS_PACKET_TYPE_ALL_LOCAL 0x00000080
671#define NDIS_PACKET_TYPE_GROUP 0x00001000
672#define NDIS_PACKET_TYPE_ALL_FUNCTIONAL 0x00002000
673#define NDIS_PACKET_TYPE_FUNCTIONAL 0x00004000
674#define NDIS_PACKET_TYPE_MAC_FRAME 0x00008000
677#define NDIS_PROT_OPTION_ESTIMATED_LENGTH 0x00000001
678#define NDIS_PROT_OPTION_NO_LOOPBACK 0x00000002
679#define NDIS_PROT_OPTION_NO_RSVD_ON_RCVPKT 0x00000004
682#define NDIS_MAC_OPTION_COPY_LOOKAHEAD_DATA 0x00000001
683#define NDIS_MAC_OPTION_RECEIVE_SERIALIZED 0x00000002
684#define NDIS_MAC_OPTION_TRANSFERS_NOT_PEND 0x00000004
685#define NDIS_MAC_OPTION_NO_LOOPBACK 0x00000008
686#define NDIS_MAC_OPTION_FULL_DUPLEX 0x00000010
687#define NDIS_MAC_OPTION_EOTX_INDICATION 0x00000020
688#define NDIS_MAC_OPTION_8021P_PRIORITY 0x00000040
689#define NDIS_MAC_OPTION_RESERVED 0x80000000
691#define NDIS_GUID_TO_OID 0x00000001
692#define NDIS_GUID_TO_STATUS 0x00000002
693#define NDIS_GUID_ANSI_STRING 0x00000004
694#define NDIS_GUID_UNICODE_STRING 0x00000008
695#define NDIS_GUID_ARRAY 0x00000010
697#if NDIS_LEGACY_DRIVER
700#define fPACKET_WRAPPER_RESERVED 0x3f
701#define fPACKET_CONTAINS_MEDIA_SPECIFIC_INFO 0x40
702#define fPACKET_ALLOCATED_BY_NDIS 0x80
704#define NDIS_FLAGS_PROTOCOL_ID_MASK 0x0000000f
705#define NDIS_FLAGS_MULTICAST_PACKET 0x00000010
706#define NDIS_FLAGS_RESERVED2 0x00000020
707#define NDIS_FLAGS_RESERVED3 0x00000040
708#define NDIS_FLAGS_DONT_LOOPBACK 0x00000080
709#define NDIS_FLAGS_IS_LOOPBACK_PACKET 0x00000100
710#define NDIS_FLAGS_LOOPBACK_ONLY 0x00000200
711#define NDIS_FLAGS_RESERVED4 0x00000400
712#define NDIS_FLAGS_DOUBLE_BUFFERED 0x00000800
713#define NDIS_FLAGS_SENT_AT_DPC 0x00001000
714#define NDIS_FLAGS_USES_SG_BUFFER_LIST 0x00002000
715#define NDIS_FLAGS_USES_ORIGINAL_PACKET 0x00004000
716#define NDIS_FLAGS_PADDED 0x00010000
717#define NDIS_FLAGS_XLATE_AT_TOP 0x00020000
774#if NDIS_LEGACY_DRIVER
802#if NDIS_SUPPORT_NDIS6
807#if NDIS_LEGACY_DRIVER
827#if (defined(NDIS50) || defined(NDIS51) || defined(NDIS50_MINIPORT) || defined(NDIS51_MINIPORT))
840#if NDIS_LEGACY_DRIVER
880#define NDIS_DMA_24BITS ((NDIS_DMA_SIZE)0)
881#define NDIS_DMA_32BITS ((NDIS_DMA_SIZE)1)
882#define NDIS_DMA_64BITS ((NDIS_DMA_SIZE)2)
920#define NdisInterruptLevelSensitive LevelSensitive
921#define NdisInterruptLatched Latched
1006#if NDIS_SUPPORT_NDIS6
1007 NdisDevicePnPEventFilterListChanged,
1018#define NDIS_DEVICE_NOT_STOPPABLE 0x00000001
1019#define NDIS_DEVICE_NOT_REMOVEABLE 0x00000002
1020#define NDIS_DEVICE_NOT_SUSPENDABLE 0x00000004
1021#define NDIS_DEVICE_DISABLE_PM 0x00000008
1022#define NDIS_DEVICE_DISABLE_WAKE_UP 0x00000010
1023#define NDIS_DEVICE_DISABLE_WAKE_ON_RECONNECT 0x00000020
1024#define NDIS_DEVICE_RESERVED 0x00000040
1025#define NDIS_DEVICE_DISABLE_WAKE_ON_MAGIC_PACKET 0x00000080
1026#define NDIS_DEVICE_DISABLE_WAKE_ON_PATTERN_MATCH 0x00000100
1029#define NDIS_PROTOCOL_ID_DEFAULT 0x00
1030#define NDIS_PROTOCOL_ID_TCP_IP 0x02
1031#define NDIS_PROTOCOL_ID_IPX 0x06
1032#define NDIS_PROTOCOL_ID_NBF 0x07
1033#define NDIS_PROTOCOL_ID_MAX 0x0F
1034#define NDIS_PROTOCOL_ID_MASK 0x0F
1038#define CO_ADDRESS_FAMILY_Q2931 ((NDIS_AF)0x1)
1039#define CO_ADDRESS_FAMILY_PSCHED ((NDIS_AF)0x2)
1040#define CO_ADDRESS_FAMILY_L2TP ((NDIS_AF)0x3)
1041#define CO_ADDRESS_FAMILY_IRDA ((NDIS_AF)0x4)
1042#define CO_ADDRESS_FAMILY_1394 ((NDIS_AF)0x5)
1043#define CO_ADDRESS_FAMILY_PPP ((NDIS_AF)0x6)
1044#define CO_ADDRESS_FAMILY_INFINIBAND ((NDIS_AF)0x7)
1045#define CO_ADDRESS_FAMILY_TAPI ((NDIS_AF)0x800)
1046#define CO_ADDRESS_FAMILY_TAPI_PROXY ((NDIS_AF)0x801)
1048#define CO_ADDRESS_FAMILY_PROXY 0x80000000
1069#define RECEIVE_TIME_INDICATION 0x00000001
1070#define USE_TIME_STAMPS 0x00000002
1071#define TRANSMIT_VC 0x00000004
1072#define RECEIVE_VC 0x00000008
1073#define INDICATE_ERRED_PACKETS 0x00000010
1074#define INDICATE_END_OF_TX 0x00000020
1075#define RESERVE_RESOURCES_VC 0x00000040
1076#define ROUND_DOWN_FLOW 0x00000080
1077#define ROUND_UP_FLOW 0x00000100
1087#define PERMANENT_VC 0x00000001
1088#define CALL_PARAMETERS_CHANGED 0x00000002
1089#define QUERY_CALL_PARAMETERS 0x00000004
1090#define BROADCAST_VC 0x00000008
1091#define MULTIPOINT_VC 0x00000010
1105#if NDIS_LEGACY_DRIVER
1122#if (NDIS_SUPPORT_NDIS6 || NDIS60)
1123typedef struct _NDIS_IPSEC_OFFLOAD_V1_NET_BUFFER_LIST_INFO {
1136} NDIS_IPSEC_OFFLOAD_V1_NET_BUFFER_LIST_INFO, *PNDIS_IPSEC_OFFLOAD_V1_NET_BUFFER_LIST_INFO;
1140#define WAN_ERROR_CRC 0x00000001
1141#define WAN_ERROR_FRAMING 0x00000002
1142#define WAN_ERROR_HARDWAREOVERRUN 0x00000004
1143#define WAN_ERROR_BUFFEROVERRUN 0x00000008
1144#define WAN_ERROR_TIMEOUT 0x00000010
1145#define WAN_ERROR_ALIGNMENT 0x00000020
1193#if NDIS_LEGACY_DRIVER
1270#define NDIS_TASK_TCP_LARGE_SEND_V0 0
1309#define IPSEC_TPT_UDPESP_ENCAPTYPE_IKE 0x00000001
1310#define IPSEC_TUN_UDPESP_ENCAPTYPE_IKE 0x00000002
1311#define IPSEC_TPTOVERTUN_UDPESP_ENCAPTYPE_IKE 0x00000004
1312#define IPSEC_TPT_UDPESP_OVER_PURE_TUN_ENCAPTYPE_IKE 0x00000008
1313#define IPSEC_TPT_UDPESP_ENCAPTYPE_OTHER 0x00000010
1314#define IPSEC_TUN_UDPESP_ENCAPTYPE_OTHER 0x00000020
1315#define IPSEC_TPTOVERTUN_UDPESP_ENCAPTYPE_OTHER 0x00000040
1316#define IPSEC_TPT_UDPESP_OVER_PURE_TUN_ENCAPTYPE_OTHER 0x00000080
1318#if NDIS_LEGACY_DRIVER
1325#define NDIS_GET_ORIGINAL_PACKET(Packet) \
1326 NDIS_PER_PACKET_INFO_FROM_PACKET(Packet, OriginalPacketInfo)
1333#define NDIS_GET_PACKET_CANCEL_ID(Packet) \
1334 NDIS_PER_PACKET_INFO_FROM_PACKET(Packet, PacketCancelId)
1341#define NDIS_PACKET_EXTENSION_FROM_PACKET(Packet) \
1342 ((PNDIS_PACKET_EXTENSION)((PUCHAR)(Packet) \
1343 + (Packet)->Private.NdisPacketOobOffset + sizeof(NDIS_PACKET_OOB_DATA)))
1351#define NDIS_PER_PACKET_INFO_FROM_PACKET(Packet, InfoType) \
1352 ((PNDIS_PACKET_EXTENSION)((PUCHAR)(Packet) + (Packet)->Private.NdisPacketOobOffset \
1353 + sizeof(NDIS_PACKET_OOB_DATA)))->NdisPacketInfo[(InfoType)]
1361#define NDIS_SET_ORIGINAL_PACKET(Packet, OriginalPacket) \
1362 NDIS_PER_PACKET_INFO_FROM_PACKET(Packet, OriginalPacketInfo) = (OriginalPacket)
1370#define NDIS_SET_PACKET_CANCEL_ID(Packet, CancelId) \
1371 NDIS_PER_PACKET_INFO_FROM_PACKET(Packet, PacketCancelId) = (CancelId)
1373#define NdisSetPacketCancelId(_Packet, _CancelId) NDIS_SET_PACKET_CANCEL_ID(_Packet, _CancelId)
1374#define NdisGetPacketCancelId(_Packet) NDIS_GET_PACKET_CANCEL_ID(_Packet)
1378#if NDIS_SUPPORT_NDIS6
1379typedef struct _NDIS_GENERIC_OBJECT {
1382 PVOID CallersCaller;
1384} NDIS_GENERIC_OBJECT, *PNDIS_GENERIC_OBJECT;
1388#define NDIS_TASK_OFFLOAD_VERSION 1
1391#define TRUNCATED_HASH_LEN 12
1393#define CRYPTO_SUCCESS 0
1394#define CRYPTO_GENERIC_ERROR 1
1395#define CRYPTO_TRANSPORT_AH_AUTH_FAILED 2
1396#define CRYPTO_TRANSPORT_ESP_AUTH_FAILED 3
1397#define CRYPTO_TUNNEL_AH_AUTH_FAILED 4
1398#define CRYPTO_TUNNEL_ESP_AUTH_FAILED 5
1399#define CRYPTO_INVALID_PACKET_SYNTAX 6
1400#define CRYPTO_INVALID_PROTOCOL 7
1540#define PROTOCOL_RESERVED_SIZE_IN_PACKET (4 * sizeof(PVOID))
1546(
NTAPI *CO_SEND_COMPLETE_HANDLER)(
1553(
NTAPI *CO_STATUS_HANDLER)(
1562(
NTAPI *CO_RECEIVE_PACKET_HANDLER)(
1569(
NTAPI *CO_REQUEST_HANDLER)(
1577(
NTAPI *CO_REQUEST_COMPLETE_HANDLER)(
1802#define NDIS30_PROTOCOL_CHARACTERISTICS_S \
1803 UCHAR MajorNdisVersion; \
1804 UCHAR MinorNdisVersion; \
1806 _ANONYMOUS_UNION union { \
1810 OPEN_ADAPTER_COMPLETE_HANDLER OpenAdapterCompleteHandler; \
1811 CLOSE_ADAPTER_COMPLETE_HANDLER CloseAdapterCompleteHandler; \
1812 _ANONYMOUS_UNION union { \
1813 SEND_COMPLETE_HANDLER SendCompleteHandler; \
1814 WAN_SEND_COMPLETE_HANDLER WanSendCompleteHandler; \
1815 } DUMMYUNIONNAME2; \
1816 _ANONYMOUS_UNION union { \
1817 TRANSFER_DATA_COMPLETE_HANDLER TransferDataCompleteHandler; \
1818 WAN_TRANSFER_DATA_COMPLETE_HANDLER WanTransferDataCompleteHandler; \
1819 } DUMMYUNIONNAME3; \
1820 RESET_COMPLETE_HANDLER ResetCompleteHandler; \
1821 REQUEST_COMPLETE_HANDLER RequestCompleteHandler; \
1822 _ANONYMOUS_UNION union { \
1823 RECEIVE_HANDLER ReceiveHandler; \
1824 WAN_RECEIVE_HANDLER WanReceiveHandler; \
1825 } DUMMYUNIONNAME4; \
1826 RECEIVE_COMPLETE_HANDLER ReceiveCompleteHandler; \
1827 STATUS_HANDLER StatusHandler; \
1828 STATUS_COMPLETE_HANDLER StatusCompleteHandler; \
1904(
NTAPI PROTCOL_CO_AF_REGISTER_NOTIFY)(
1909#if NDIS_LEGACY_PROTOCOL
1924#if (defined(NDIS50) || defined(NDIS51))
2049#define NDIS30_MINIPORT_CHARACTERISTICS_S \
2050 UCHAR MajorNdisVersion; \
2051 UCHAR MinorNdisVersion; \
2053 W_CHECK_FOR_HANG_HANDLER CheckForHangHandler; \
2054 W_DISABLE_INTERRUPT_HANDLER DisableInterruptHandler; \
2055 W_ENABLE_INTERRUPT_HANDLER EnableInterruptHandler; \
2056 W_HALT_HANDLER HaltHandler; \
2057 W_HANDLE_INTERRUPT_HANDLER HandleInterruptHandler; \
2058 W_INITIALIZE_HANDLER InitializeHandler; \
2059 W_ISR_HANDLER ISRHandler; \
2060 W_QUERY_INFORMATION_HANDLER QueryInformationHandler; \
2061 W_RECONFIGURE_HANDLER ReconfigureHandler; \
2062 W_RESET_HANDLER ResetHandler; \
2063 W_SEND_HANDLER SendHandler; \
2064 W_SET_INFORMATION_HANDLER SetInformationHandler; \
2065 W_TRANSFER_DATA_HANDLER TransferDataHandler;
2073#define NDIS40_MINIPORT_CHARACTERISTICS_S \
2074 NDIS30_MINIPORT_CHARACTERISTICS Ndis30Chars; \
2075 W_RETURN_PACKET_HANDLER ReturnPacketHandler; \
2076 W_SEND_PACKETS_HANDLER SendPacketsHandler; \
2077 W_ALLOCATE_COMPLETE_HANDLER AllocateCompleteHandler;
2081#define NDIS40_MINIPORT_CHARACTERISTICS_S \
2082 NDIS30_MINIPORT_CHARACTERISTICS_S \
2083 W_RETURN_PACKET_HANDLER ReturnPacketHandler; \
2084 W_SEND_PACKETS_HANDLER SendPacketsHandler; \
2085 W_ALLOCATE_COMPLETE_HANDLER AllocateCompleteHandler;
2098(
NTAPI MINIPORT_CO_CREATE_VC)(
2107(
NTAPI MINIPORT_CO_DELETE_VC)(
2114(
NTAPI MINIPORT_CO_ACTIVATE_VC)(
2122(
NTAPI MINIPORT_CO_DEACTIVATE_VC)(
2140#define NDIS50_MINIPORT_CHARACTERISTICS_S \
2141 NDIS40_MINIPORT_CHARACTERISTICS Ndis40Chars; \
2142 W_CO_CREATE_VC_HANDLER CoCreateVcHandler; \
2143 W_CO_DELETE_VC_HANDLER CoDeleteVcHandler; \
2144 W_CO_ACTIVATE_VC_HANDLER CoActivateVcHandler; \
2145 W_CO_DEACTIVATE_VC_HANDLER CoDeactivateVcHandler; \
2146 W_CO_SEND_PACKETS_HANDLER CoSendPacketsHandler; \
2147 W_CO_REQUEST_HANDLER CoRequestHandler;
2151#define NDIS50_MINIPORT_CHARACTERISTICS_S \
2152 NDIS40_MINIPORT_CHARACTERISTICS_S \
2153 W_CO_CREATE_VC_HANDLER CoCreateVcHandler; \
2154 W_CO_DELETE_VC_HANDLER CoDeleteVcHandler; \
2155 W_CO_ACTIVATE_VC_HANDLER CoActivateVcHandler; \
2156 W_CO_DEACTIVATE_VC_HANDLER CoDeactivateVcHandler; \
2157 W_CO_SEND_PACKETS_HANDLER CoSendPacketsHandler; \
2158 W_CO_REQUEST_HANDLER CoRequestHandler;
2186#define NDIS51_MINIPORT_CHARACTERISTICS_S \
2187 NDIS50_MINIPORT_CHARACTERISTICS Ndis50Chars; \
2188 W_CANCEL_SEND_PACKETS_HANDLER CancelSendPacketsHandler; \
2189 W_PNP_EVENT_NOTIFY_HANDLER PnPEventNotifyHandler; \
2190 W_MINIPORT_SHUTDOWN_HANDLER AdapterShutdownHandler; \
2198#define NDIS51_MINIPORT_CHARACTERISTICS_S \
2199 NDIS50_MINIPORT_CHARACTERISTICS_S \
2200 W_CANCEL_SEND_PACKETS_HANDLER CancelSendPacketsHandler; \
2201 W_PNP_EVENT_NOTIFY_HANDLER PnPEventNotifyHandler; \
2202 W_MINIPORT_SHUTDOWN_HANDLER AdapterShutdownHandler; \
2214#if defined(NDIS51_MINIPORT)
2218#elif defined(NDIS50_MINIPORT)
2222#elif defined(NDIS40_MINIPORT)
2267#if NDIS_SUPPORT_NDIS6
2268typedef USHORT NET_FRAME_TYPE, *PNET_FRAME_TYPE;
2305#define NUMBER_OF_WORK_ITEM_TYPES NdisMaxWorkItems
2306#define NUMBER_OF_SINGLE_WORK_ITEMS 6
2355 IN UINT HeaderBufferSize,
2357 IN UINT LookaheadBufferSize,
2462#define ARC_SEND_BUFFERS 8
2463#define ARC_HEADER_SIZE 4
2465typedef struct _NDIS_ARC_BUF {
2467 PUCHAR ArcnetLookaheadBuffer;
2470} NDIS_ARC_BUF, *PNDIS_ARC_BUF;
2486#define FILTERDBS_ARCNET_S \
2489#define FILTERDBS_ARCNET_S \
2493#define FILTERDBS_S \
2494 _ANONYMOUS_UNION union { \
2495 PETH_FILTER EthDB; \
2496 PNULL_FILTER NullDB; \
2499 PFDDI_FILTER FddiDB; \
2590#if defined(NDIS_WRAPPER)
2596 UCHAR ArcnetAddress;
2600 PNDIS_ARC_BUF ArcBuf;
2623 USHORT CurrentMapRegister;
2625 USHORT BaseMapRegistersNeeded;
2626 USHORT SGMapRegistersNeeded;
2629 USHORT MediaDisconnectTimeOut;
2639 NDIS_STATS NdisStats;
2646 PKEVENT AllRequestsCompletedEvent;
2650 ULONG DriverVerifyFlags;
2652 USHORT InternalResetCount;
2653 USHORT MiniportResetCount;
2654 USHORT MediaSenseConnectCount;
2655 USHORT MediaSenseDisconnectCount;
2657 ULONG UserModeOpenReferences;
2659 PVOID SavedSendHandler;
2660 PVOID SavedWanSendHandler;
2662 PVOID SavedSendPacketsHandler;
2663 PVOID SavedCancelSendPacketsHandler;
2665 ULONG MiniportAttributes;
2670 ULONG IndicatedPacketsCount;
2671 ULONG PhysicalMediumType;
2673 LONG DmaAdapterRefCount;
2681 PKEVENT QueuedBindingCompletedEvent;
2682 PKEVENT DmaResourcesReleasedEvent;
2684 ULONG RegisteredInterrupts;
2686 ULONG ScatterGatherListSize;
2690#if NDIS_LEGACY_DRIVER
2729#if defined(NDIS_WRAPPER)
2730#define NDIS_COMMON_OPEN_BLOCK_WRAPPER_S \
2733 KSPIN_LOCK SpinLock; \
2734 NDIS_HANDLE FilterHandle; \
2735 ULONG ProtocolOptions; \
2736 USHORT CurrentLookahead; \
2737 USHORT ConnectDampTicks; \
2738 USHORT DisconnectDampTicks; \
2739 W_SEND_HANDLER WSendHandler; \
2740 W_TRANSFER_DATA_HANDLER WTransferDataHandler; \
2741 W_SEND_PACKETS_HANDLER WSendPacketsHandler; \
2742 W_CANCEL_SEND_PACKETS_HANDLER CancelSendPacketsHandler; \
2743 ULONG WakeUpEnable; \
2744 PKEVENT CloseCompleteEvent; \
2746 ULONG AfReferences; \
2747 PNDIS_OPEN_BLOCK NextGlobalOpen;
2749#define NDIS_COMMON_OPEN_BLOCK_WRAPPER_S
2752#define NDIS_COMMON_OPEN_BLOCK_S \
2754 NDIS_HANDLE BindingHandle; \
2755 PNDIS_MINIPORT_BLOCK MiniportHandle; \
2756 PNDIS_PROTOCOL_BLOCK ProtocolHandle; \
2757 NDIS_HANDLE ProtocolBindingContext; \
2758 PNDIS_OPEN_BLOCK MiniportNextOpen; \
2759 PNDIS_OPEN_BLOCK ProtocolNextOpen; \
2760 NDIS_HANDLE MiniportAdapterContext; \
2761 BOOLEAN Reserved1; \
2762 BOOLEAN Reserved2; \
2763 BOOLEAN Reserved3; \
2764 BOOLEAN Reserved4; \
2765 PNDIS_STRING BindDeviceName; \
2766 KSPIN_LOCK Reserved5; \
2767 PNDIS_STRING RootDeviceName; \
2768 _ANONYMOUS_UNION union { \
2769 SEND_HANDLER SendHandler; \
2770 WAN_SEND_HANDLER WanSendHandler; \
2772 TRANSFER_DATA_HANDLER TransferDataHandler; \
2773 SEND_COMPLETE_HANDLER SendCompleteHandler; \
2774 TRANSFER_DATA_COMPLETE_HANDLER TransferDataCompleteHandler; \
2775 RECEIVE_HANDLER ReceiveHandler; \
2776 RECEIVE_COMPLETE_HANDLER ReceiveCompleteHandler; \
2777 WAN_RECEIVE_HANDLER WanReceiveHandler; \
2778 REQUEST_COMPLETE_HANDLER RequestCompleteHandler; \
2779 RECEIVE_PACKET_HANDLER ReceivePacketHandler; \
2780 SEND_PACKETS_HANDLER SendPacketsHandler; \
2781 RESET_HANDLER ResetHandler; \
2782 REQUEST_HANDLER RequestHandler; \
2783 RESET_COMPLETE_HANDLER ResetCompleteHandler; \
2784 STATUS_HANDLER StatusHandler; \
2785 STATUS_COMPLETE_HANDLER StatusCompleteHandler; \
2786 NDIS_COMMON_OPEN_BLOCK_WRAPPER_S
2803#define NDIS_M_MAX_LOOKAHEAD 526
2859#if NDIS_LEGACY_DRIVER
2895#define NdisFreeBuffer IoFreeMdl
3015#define NdisReinitializePacket(Packet) { \
3016 (Packet)->Private.Head = (PNDIS_BUFFER)NULL; \
3017 (Packet)->Private.ValidCounts = FALSE; \
3029#define NdisQueryBuffer(_Buffer, _VirtualAddress, _Length) { \
3030 if (ARGUMENT_PRESENT(_VirtualAddress)) { \
3031 *(PVOID *)(_VirtualAddress) = MmGetSystemAddressForMdl(_Buffer); \
3033 *(_Length) = MmGetMdlByteCount(_Buffer); \
3056#define NdisGetFirstBufferFromPacketSafe(_Packet, \
3059 _FirstBufferLength, \
3060 _TotalBufferLength, \
3063 PNDIS_BUFFER _Buffer; \
3065 _Buffer = (_Packet)->Private.Head; \
3066 *(_FirstBuffer) = _Buffer; \
3067 if (_Buffer != NULL) { \
3068 *(_FirstBufferVA) = MmGetSystemAddressForMdlSafe(_Buffer, _Priority); \
3069 *(_FirstBufferLength) = MmGetMdlByteCount(_Buffer); \
3070 _Buffer = _Buffer->Next; \
3071 *(_TotalBufferLength) = *(_FirstBufferLength); \
3072 while (_Buffer != NULL) { \
3073 *(_TotalBufferLength) += MmGetMdlByteCount(_Buffer); \
3074 _Buffer = _Buffer->Next; \
3078 *(_FirstBufferVA) = 0; \
3079 *(_FirstBufferLength) = 0; \
3080 *(_TotalBufferLength) = 0; \
3089#define NdisRecalculatePacketCounts(Packet) { \
3090 PNDIS_BUFFER _Buffer = (Packet)->Private.Head; \
3091 if (_Buffer != NULL) { \
3092 while (_Buffer->Next != NULL) { \
3093 _Buffer = _Buffer->Next; \
3095 (Packet)->Private.Tail = _Buffer; \
3097 (Packet)->Private.ValidCounts = FALSE; \
3106#define NdisChainBufferAtFront(Packet, \
3109 PNDIS_BUFFER _NdisBuffer = (Buffer); \
3111 while (_NdisBuffer->Next != NULL) \
3112 _NdisBuffer = _NdisBuffer->Next; \
3114 if ((Packet)->Private.Head == NULL) \
3115 (Packet)->Private.Tail = _NdisBuffer; \
3117 _NdisBuffer->Next = (Packet)->Private.Head; \
3118 (Packet)->Private.Head = (Buffer); \
3119 (Packet)->Private.ValidCounts = FALSE; \
3128#define NdisChainBufferAtBack(Packet, \
3131 PNDIS_BUFFER _NdisBuffer = (Buffer); \
3133 while (_NdisBuffer->Next != NULL) \
3134 _NdisBuffer = _NdisBuffer->Next; \
3136 _NdisBuffer->Next = NULL; \
3138 if ((Packet)->Private.Head != NULL) \
3139 (Packet)->Private.Tail->Next = (Buffer); \
3141 (Packet)->Private.Head = (Buffer); \
3143 (Packet)->Private.Tail = _NdisBuffer; \
3144 (Packet)->Private.ValidCounts = FALSE; \
3197#define NdisInitializeWorkItem(_WI_, _R_, _C_) { \
3198 (_WI_)->Context = _C_; \
3199 (_WI_)->Routine = _R_; \
3261#define NdisFlushBuffer(Buffer,WriteToDevice) \
3262 KeFlushIoBuffers((Buffer),!(WriteToDevice), TRUE)
3285#if defined(_M_IX86) || defined(_M_AMD64)
3286#define NdisCopyLookaheadData(Destination, Source, Length, MacOptions) \
3287 RtlCopyMemory(Destination, Source, Length)
3289#define NdisCopyLookaheadData(Destination, Source, Length, MacOptions) \
3291 if ((MacOptions) & NDIS_MAC_OPTION_COPY_LOOKAHEAD_DATA) \
3293 RtlCopyMemory(Destination, Source, Length); \
3297 PUCHAR _Src = (PUCHAR)(Source); \
3298 PUCHAR _Dest = (PUCHAR)(Destination); \
3299 PUCHAR _End = _Dest + (Length); \
3300 while (_Dest < _End) \
3301 *_Dest++ = *_Src++; \
3314#define NdisAdjustBufferLength(Buffer, Length) \
3315 (((Buffer)->ByteCount) = (Length))
3317#if NDIS_SUPPORT_NDIS6
3318#define NdisAdjustMdlLength(_Mdl, _Length) \
3319 (((_Mdl)->ByteCount) = (_Length))
3329#define NdisBufferLength MmGetMdlByteCount
3338#define NdisBufferVirtualAddress MmGetSystemAddressForMdl
3340#define NdisBufferVirtualAddressSafe MmGetSystemAddressForMdlSafe
3356#define NdisGetBufferPhysicalArraySize(Buffer, ArraySize) \
3357 (*(ArraySize) = NDIS_BUFFER_TO_SPAN_PAGES(Buffer))
3368#define NdisQueryBufferOffset(_Buffer, _Offset, _Length) { \
3369 *(_Offset) = MmGetMdlByteOffset(_Buffer); \
3370 *(_Length) = MmGetMdlByteCount(_Buffer); \
3378#define NDIS_BUFFER_LINKAGE(Buffer) (Buffer)->Next
3386#define NdisGetNextBuffer(CurrentBuffer, \
3389 *(NextBuffer) = (CurrentBuffer)->Next; \
3392#if NDIS_LEGACY_DRIVER
3394#define NDIS_PACKET_FIRST_NDIS_BUFFER(_Packet) ((_Packet)->Private.Head)
3395#define NDIS_PACKET_LAST_NDIS_BUFFER(_Packet) ((_Packet)->Private.Tail)
3396#define NDIS_PACKET_VALID_COUNTS(_Packet) ((_Packet)->Private.ValidCounts)
3403#define NdisGetPacketFlags(Packet) (Packet)->Private.Flags
3410#define NDIS_GET_PACKET_PROTOCOL_TYPE(_Packet) \
3411 ((_Packet)->Private.Flags & NDIS_PROTOCOL_ID_MASK)
3418#define NDIS_OOB_DATA_FROM_PACKET(_Packet) \
3419 (PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) + \
3420 (_Packet)->Private.NdisPacketOobOffset)
3427#define NDIS_GET_PACKET_HEADER_SIZE(_Packet) \
3428 ((PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) + \
3429 (_Packet)->Private.NdisPacketOobOffset))->HeaderSize
3436#define NDIS_GET_PACKET_STATUS(_Packet) \
3437 ((PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) + \
3438 (_Packet)->Private.NdisPacketOobOffset))->Status
3445#define NDIS_GET_PACKET_TIME_TO_SEND(_Packet) \
3446 ((PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) + \
3447 (_Packet)->Private.NdisPacketOobOffset))->TimeToSend
3454#define NDIS_GET_PACKET_TIME_SENT(_Packet) \
3455 ((PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) + \
3456 (_Packet)->Private.NdisPacketOobOffset))->TimeSent
3463#define NDIS_GET_PACKET_TIME_RECEIVED(_Packet) \
3464 ((PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) + \
3465 (_Packet)->Private.NdisPacketOobOffset))->TimeReceived
3474#define NDIS_GET_PACKET_MEDIA_SPECIFIC_INFO(_Packet, \
3475 _pMediaSpecificInfo, \
3476 _pSizeMediaSpecificInfo) \
3478 if (!((_Packet)->Private.NdisPacketFlags & fPACKET_ALLOCATED_BY_NDIS) || \
3479 !((_Packet)->Private.NdisPacketFlags & fPACKET_CONTAINS_MEDIA_SPECIFIC_INFO)) \
3481 *(_pMediaSpecificInfo) = NULL; \
3482 *(_pSizeMediaSpecificInfo) = 0; \
3486 *(_pMediaSpecificInfo) = ((PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) + \
3487 (_Packet)->Private.NdisPacketOobOffset))->MediaSpecificInformation; \
3488 *(_pSizeMediaSpecificInfo) = ((PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) + \
3489 (_Packet)->Private.NdisPacketOobOffset))->SizeMediaSpecificInfo; \
3499#define NDIS_SET_PACKET_HEADER_SIZE(_Packet, _HdrSize) \
3500 ((PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) + \
3501 (_Packet)->Private.NdisPacketOobOffset))->HeaderSize = (_HdrSize)
3509#define NDIS_SET_PACKET_STATUS(_Packet, _Status) \
3510 ((PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) + \
3511 (_Packet)->Private.NdisPacketOobOffset))->Status = (_Status)
3519#define NDIS_SET_PACKET_TIME_TO_SEND(_Packet, _TimeToSend) \
3520 ((PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) + \
3521 (_Packet)->Private.NdisPacketOobOffset))->TimeToSend = (_TimeToSend)
3529#define NDIS_SET_PACKET_TIME_SENT(_Packet, _TimeSent) \
3530 ((PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) + \
3531 (_Packet)->Private.NdisPacketOobOffset))->TimeSent = (_TimeSent)
3539#define NDIS_SET_PACKET_TIME_RECEIVED(_Packet, _TimeReceived) \
3540 ((PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) + \
3541 (_Packet)->Private.NdisPacketOobOffset))->TimeReceived = (_TimeReceived)
3550#define NDIS_SET_PACKET_MEDIA_SPECIFIC_INFO(_Packet, \
3551 _MediaSpecificInfo, \
3552 _SizeMediaSpecificInfo) \
3554 if ((_Packet)->Private.NdisPacketFlags & fPACKET_ALLOCATED_BY_NDIS) \
3556 (_Packet)->Private.NdisPacketFlags |= fPACKET_CONTAINS_MEDIA_SPECIFIC_INFO; \
3557 ((PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) + \
3558 (_Packet)->Private.NdisPacketOobOffset))->MediaSpecificInformation = \
3559 (_MediaSpecificInfo); \
3560 ((PNDIS_PACKET_OOB_DATA)((PUCHAR)(_Packet) + \
3561 (_Packet)->Private.NdisPacketOobOffset))->SizeMediaSpecificInfo = \
3562 (_SizeMediaSpecificInfo); \
3572#define NdisSetPacketFlags(Packet, Flags) (Packet)->Private.Flags |= (Flags)
3580#define NdisClearPacketFlags(Packet, Flags) (Packet)->Private.Flags &= ~(Flags)
3601 *FirstBuffer =
Packet->Private.Head;
3602 if (TotalPacketLength || BufferCount || PhysicalBufferCount) {
3603 if (!
Packet->Private.ValidCounts) {
3607 UINT _PhysicalBufferCount = 0;
3608 UINT _TotalPacketLength = 0;
3611 for (NdisBuffer =
Packet->Private.Head;
3613 NdisBuffer = NdisBuffer->Next) {
3616 _TotalPacketLength += PacketLength;
3619 Packet->Private.PhysicalCount = _PhysicalBufferCount;
3620 Packet->Private.TotalLength = _TotalPacketLength;
3625 if (PhysicalBufferCount)
3626 *PhysicalBufferCount =
Packet->Private.PhysicalCount;
3629 *BufferCount =
Packet->Private.Count;
3631 if (TotalPacketLength)
3632 *TotalPacketLength =
Packet->Private.TotalLength;
3645#define NdisQueryPacketLength(_Packet, \
3646 _TotalPacketLength) \
3648 if (!(_Packet)->Private.ValidCounts) { \
3649 NdisQueryPacket(_Packet, NULL, NULL, NULL, _TotalPacketLength); \
3651 else *(_TotalPacketLength) = (_Packet)->Private.TotalLength; \
3667#define NdisCreateLookaheadBufferFromSharedMemory(_S, _L, _B) ((*(_B)) = (_S))
3675#if defined(_M_IX86) || defined(_M_AMD64) || defined(_M_ARM) || defined(_M_PPC)
3684#define NdisMoveMappedMemory(Destination, Source, Length) \
3685 RtlCopyMemory(Destination, Source, Length)
3693#define NdisZeroMappedMemory(Destination, Length) \
3694 RtlZeroMemory(Destination, Length)
3698#define NdisMoveMappedMemory(Destination, Source, Length) \
3700 PUCHAR _Dest = Destination, _Src = Source, _End = _Dest + Length; \
3701 while (_Dest < _End) \
3702 *_Dest++ = _Src++; \
3705#define NdisZeroMappedMemory(Destination, Length) \
3707 PUCHAR _Dest = Destination, _End = _Dest + Length; \
3708 while (_Dest < _End) \
3721#define NdisMoveFromMappedMemory(Destination, Source, Length) \
3722 NdisMoveMappedMemory(Destination, Source, Length)
3731#define NdisMoveToMappedMemory(Destination, Source, Length) \
3732 NdisMoveMappedMemory(Destination, Source, Length)
3742#define NdisMUpdateSharedMemory(_H, _L, _V, _P) \
3743 NdisUpdateSharedMemory(_H, _L, _V, _P)
3807#define NdisUpdateSharedMemory(NdisAdapterHandle, \
3830#define NdisGetPhysicalAddressHigh(PhysicalAddress) \
3831 ((PhysicalAddress).HighPart)
3839#define NdisSetPhysicalAddressHigh(PhysicalAddress, Value) \
3840 ((PhysicalAddress).HighPart) = (Value)
3847#define NdisGetPhysicalAddressLow(PhysicalAddress) \
3848 ((PhysicalAddress).LowPart)
3857#define NdisSetPhysicalAddressLow(PhysicalAddress, Value) \
3858 ((PhysicalAddress).LowPart) = (Value)
3866#define NDIS_PHYSICAL_ADDRESS_CONST(Low, High) \
3867 { {(ULONG)(Low), (LONG)(High)} }
3876#define NdisEqualMemory(Source1, Source2, Length) \
3877 RtlEqualMemory(Source1, Source2, Length)
3886#define NdisFillMemory(Destination, Length, Fill) \
3887 RtlFillMemory(Destination, Length, Fill)
3896#define NdisMoveMemory(Destination, Source, Length) \
3897 RtlCopyMemory(Destination, Source, Length)
3906#define NdisRetrieveUlong(DestinationAddress, SourceAddress) \
3907 RtlRetrieveUlong(DestinationAddress, SourceAddress)
3916#define NdisStoreUlong(DestinationAddress, Value) \
3917 RtlStoreUlong(DestinationAddress, Value)
3926#define NdisZeroMemory(Destination, Length) \
3927 RtlZeroMemory(Destination, Length)
3937#if NDIS_LEGACY_DRIVER
3980#if NDIS_LEGACY_MINIPORT
4036#define NdisAnsiStringToUnicodeString(_us, _as) RtlAnsiStringToUnicodeString(_us, _as, FALSE)
4045#define NdisEqualString RtlEqualString
4047#define NdisEqualUnicodeString RtlEqualUnicodeString
4057#define NdisInitAnsiString RtlInitString
4074#define NdisUnicodeStringToAnsiString(_as, _us) RtlUnicodeStringToAnsiString(_as, _us, FALSE)
4076#define NdisFreeString(_s) NdisFreeMemory((_s).Buffer, (_s).MaximumLength, 0)
4077#define NdisPrintString(_s) DbgPrint("%ls", (_s).Buffer)
4088#define NdisAllocateSpinLock(_SpinLock) KeInitializeSpinLock(&(_SpinLock)->SpinLock)
4097#define NdisFreeSpinLock(_SpinLock)
4106#define NdisAcquireSpinLock(_SpinLock) KeAcquireSpinLock(&(_SpinLock)->SpinLock, &(_SpinLock)->OldIrql)
4115#define NdisReleaseSpinLock(_SpinLock) KeReleaseSpinLock(&(_SpinLock)->SpinLock,(_SpinLock)->OldIrql)
4124#define NdisDprAcquireSpinLock(_SpinLock) KeAcquireSpinLockAtDpcLevel(&(_SpinLock)->SpinLock)