- Properly implement NdisGetSystemUpTime, based on http://www.tech-archive.net/Archiv...
[reactos.git] / reactos / drivers / network / ndis / ndis / stubs.c
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS NDIS library
4 * FILE: ndis/stubs.c
5 * PURPOSE: Stubs
6 * PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net)
7 * REVISIONS:
8 * CSH 01/08-2000 Created
9 */
10
11 #include "ndissys.h"
12
13 /*
14 * @unimplemented
15 */
16 VOID
17 EXPORT
18 NdisCompleteQueryStatistics(
19 IN NDIS_HANDLE NdisAdapterHandle,
20 IN PNDIS_REQUEST NdisRequest,
21 IN NDIS_STATUS Status)
22 {
23 UNIMPLEMENTED
24 }
25
26
27 /*
28 * @unimplemented
29 */
30 VOID
31 EXPORT
32 NdisCompleteUnbindAdapter(
33 IN NDIS_HANDLE UnbindAdapterContext,
34 IN NDIS_STATUS Status)
35 {
36 UNIMPLEMENTED
37 }
38
39
40 /*
41 * @implemented
42 */
43 #undef NdisInterlockedAddUlong
44 VOID
45 EXPORT
46 NdisInterlockedAddUlong (
47 IN PULONG Addend,
48 IN ULONG Increment,
49 IN PNDIS_SPIN_LOCK SpinLock)
50 {
51 ExInterlockedAddUlong ( Addend, Increment, (PKSPIN_LOCK)SpinLock );
52 }
53
54
55 /*
56 * @implemented
57 */
58 #undef NdisInterlockedInsertHeadList
59 PLIST_ENTRY
60 EXPORT
61 NdisInterlockedInsertHeadList(
62 IN PLIST_ENTRY ListHead,
63 IN PLIST_ENTRY ListEntry,
64 IN PNDIS_SPIN_LOCK SpinLock)
65 {
66 return ExInterlockedInsertHeadList ( ListHead, ListEntry, (PKSPIN_LOCK)SpinLock );
67 }
68
69
70 /*
71 * @implemented
72 */
73 #undef NdisInterlockedInsertTailList
74 PLIST_ENTRY
75 EXPORT
76 NdisInterlockedInsertTailList(
77 IN PLIST_ENTRY ListHead,
78 IN PLIST_ENTRY ListEntry,
79 IN PNDIS_SPIN_LOCK SpinLock)
80 {
81 return ExInterlockedInsertTailList ( ListHead, ListEntry, (PKSPIN_LOCK)SpinLock );
82 }
83
84
85 /*
86 * @implemented
87 */
88 #undef NdisInterlockedRemoveHeadList
89 PLIST_ENTRY
90 EXPORT
91 NdisInterlockedRemoveHeadList(
92 IN PLIST_ENTRY ListHead,
93 IN PNDIS_SPIN_LOCK SpinLock)
94 {
95 return ExInterlockedRemoveHeadList ( ListHead, (PKSPIN_LOCK)SpinLock );
96 }
97
98 \f
99 /*
100 * @unimplemented
101 */
102 VOID
103 EXPORT
104 NdisMapFile(
105 OUT PNDIS_STATUS Status,
106 OUT PVOID * MappedBuffer,
107 IN NDIS_HANDLE FileHandle)
108 {
109 UNIMPLEMENTED
110 }
111
112 typedef struct _NDIS_HANDLE_OBJECT
113 {
114 HANDLE FileHandle;
115 BOOLEAN Mapped;
116 ULONG FileLength;
117 PVOID MapBuffer;
118 } NDIS_HANDLE_OBJECT, *PNDIS_HANDLE_OBJECT;
119
120 __inline
121 PNDIS_HANDLE_OBJECT
122 NDIS_HANDLE_TO_POBJECT ( NDIS_HANDLE handle )
123 {
124 return (PNDIS_HANDLE_OBJECT)handle;
125 }
126
127 __inline
128 NDIS_HANDLE
129 NDIS_POBJECT_TO_HANDLE ( PNDIS_HANDLE_OBJECT obj )
130 {
131 return (NDIS_HANDLE)obj;
132 }
133
134 const WCHAR* NDIS_FILE_FOLDER = L"\\SystemRoot\\System32\\Drivers\\";
135
136 /*
137 * @implemented
138 */
139 VOID
140 EXPORT
141 NdisCloseFile(
142 IN NDIS_HANDLE FileHandle)
143 {
144 PNDIS_HANDLE_OBJECT FileHandleObject;
145
146 ASSERT_IRQL(PASSIVE_LEVEL);
147
148 ASSERT ( FileHandle );
149
150 FileHandleObject = NDIS_HANDLE_TO_POBJECT(FileHandle);
151
152 ASSERT ( FileHandleObject->FileHandle );
153
154 /*
155 if ( FileHandleObject->Mapped )
156 NdisUnmapFile ( FileHandle );
157 */
158
159 ZwClose ( FileHandleObject->FileHandle );
160
161 memset ( FileHandleObject, 0, sizeof(NDIS_HANDLE_OBJECT) );
162
163 ExFreePool ( FileHandleObject );
164 }
165
166
167 /*
168 * @unimplemented
169 */
170 NDIS_STATUS
171 EXPORT
172 NdisIMDeInitializeDeviceInstance(
173 IN NDIS_HANDLE NdisMiniportHandle)
174 {
175 UNIMPLEMENTED
176
177 return NDIS_STATUS_FAILURE;
178 }
179
180
181 /*
182 * @unimplemented
183 */
184 #undef NdisIMInitializeDeviceInstance
185 NDIS_STATUS
186 EXPORT
187 NdisIMInitializeDeviceInstance(
188 IN NDIS_HANDLE DriverHandle,
189 IN PNDIS_STRING DeviceInstance)
190 {
191 UNIMPLEMENTED
192
193 return NDIS_STATUS_FAILURE;
194 }
195
196
197 /*
198 * @unimplemented
199 */
200 NDIS_STATUS
201 EXPORT
202 NdisIMRegisterLayeredMiniport(
203 IN NDIS_HANDLE NdisWrapperHandle,
204 IN PNDIS_MINIPORT_CHARACTERISTICS MiniportCharacteristics,
205 IN UINT CharacteristicsLength,
206 OUT PNDIS_HANDLE DriverHandle)
207 {
208 UNIMPLEMENTED
209
210 return NDIS_STATUS_FAILURE;
211 }
212
213
214 /*
215 * @unimplemented
216 */
217 #undef NdisMWanIndicateReceive
218 VOID
219 EXPORT
220 NdisMWanIndicateReceive(
221 OUT PNDIS_STATUS Status,
222 IN NDIS_HANDLE MiniportAdapterHandle,
223 IN NDIS_HANDLE NdisLinkContext,
224 IN PUCHAR PacketBuffer,
225 IN UINT PacketSize)
226 {
227 UNIMPLEMENTED
228 }
229
230
231 /*
232 * @unimplemented
233 */
234 #undef NdisMWanIndicateReceiveComplete
235 VOID
236 EXPORT
237 NdisMWanIndicateReceiveComplete(
238 IN NDIS_HANDLE MiniportAdapterHandle)
239 {
240 UNIMPLEMENTED
241 }
242
243
244 /*
245 * @unimplemented
246 */
247 #undef NdisMWanSendComplete
248 VOID
249 EXPORT
250 NdisMWanSendComplete(
251 IN NDIS_HANDLE MiniportAdapterHandle,
252 IN PNDIS_WAN_PACKET Packet,
253 IN NDIS_STATUS Status)
254 {
255 UNIMPLEMENTED
256 }
257
258
259 /*
260 * @unimplemented
261 */
262 VOID
263 EXPORT
264 NdisOpenFile(
265 OUT PNDIS_STATUS Status,
266 OUT PNDIS_HANDLE FileHandle,
267 OUT PUINT FileLength,
268 IN PNDIS_STRING FileName,
269 IN NDIS_PHYSICAL_ADDRESS HighestAcceptableAddress)
270 {
271 NDIS_STRING FullFileName;
272 OBJECT_ATTRIBUTES ObjectAttributes;
273 PNDIS_HANDLE_OBJECT FileHandleObject = NULL;
274 IO_STATUS_BLOCK IoStatusBlock;
275
276 ASSERT_IRQL(PASSIVE_LEVEL);
277
278 *Status = NDIS_STATUS_SUCCESS;
279 FullFileName.Buffer = NULL;
280
281 ASSERT ( Status && FileName );
282
283 FullFileName.Length = sizeof(NDIS_FILE_FOLDER);
284 FullFileName.MaximumLength = FileName->MaximumLength + sizeof(NDIS_FILE_FOLDER);
285 FullFileName.Buffer = ExAllocatePool ( NonPagedPool, FullFileName.MaximumLength );
286
287 if ( !FullFileName.Buffer )
288 {
289 *Status = NDIS_STATUS_RESOURCES;
290 goto cleanup;
291 }
292
293 FileHandleObject = ExAllocatePool ( NonPagedPool, sizeof(NDIS_HANDLE_OBJECT) );
294 if ( !FileHandleObject )
295 {
296 *Status = NDIS_STATUS_RESOURCES;
297 goto cleanup;
298 }
299 memset ( FileHandleObject, 0, sizeof(NDIS_HANDLE_OBJECT) );
300
301 memmove ( FullFileName.Buffer, NDIS_FILE_FOLDER, FullFileName.Length );
302 *Status = RtlAppendUnicodeStringToString ( &FullFileName, FileName );
303 if ( !NT_SUCCESS(*Status) )
304 {
305 *Status = NDIS_STATUS_FAILURE;
306 goto cleanup;
307 }
308
309 InitializeObjectAttributes ( &ObjectAttributes,
310 &FullFileName,
311 OBJ_CASE_INSENSITIVE,
312 NULL,
313 NULL );
314
315 *Status = ZwCreateFile (
316 &FileHandleObject->FileHandle,
317 FILE_READ_DATA|SYNCHRONIZE,
318 &ObjectAttributes,
319 &IoStatusBlock,
320 NULL, // PLARGE_INTEGER AllocationSize
321 0, // ULONG FileAttributes
322 FILE_SHARE_READ, // ULONG ShareAccess
323 FILE_CREATE, // ULONG CreateDisposition
324 FILE_SYNCHRONOUS_IO_NONALERT, // ULONG CreateOptions
325 0, // PVOID EaBuffer
326 0 ); // ULONG EaLength
327
328 if ( !NT_SUCCESS(*Status) )
329 {
330 *Status = NDIS_STATUS_FAILURE;
331 }
332
333 cleanup:
334 if ( FullFileName.Buffer != NULL )
335 {
336 ExFreePool ( FullFileName.Buffer );
337 FullFileName.Buffer = NULL;
338 }
339 if ( !NT_SUCCESS(*Status) )
340 {
341 if( FileHandleObject ) {
342 ExFreePool ( FileHandleObject );
343 FileHandleObject = NULL;
344 }
345 *FileHandle = NULL;
346 }
347 else
348 *FileHandle = NDIS_POBJECT_TO_HANDLE(FileHandleObject);
349
350 return;
351 }
352
353
354 /*
355 NdisOpenGlobalConfiguration
356 */
357
358 #if 0
359 VOID
360 EXPORT
361 NdisRegisterTdiCallBack(
362 IN TDI_REGISTER_CALLBACK RegsterCallback)
363 {
364 UNIMPLEMENTED
365 }
366 #endif
367
368
369 /*
370 NdisScheduleWorkItem
371 */
372
373
374 #if 0
375 VOID
376 EXPORT
377 NdisSetProtocolFilter(
378 OUT PNDIS_STATUS Status,
379 IN NDIS_HANDLE NdisBindingHandle,
380 IN RECEIVE_HANDLER ReceiveHandler,
381 IN RECEIVE_PACKET_HANDLER ReceivePacketHandler,
382 IN NDIS_MEDIUM Medium,
383 IN UINT Offset,
384 IN UINT Size,
385 IN PUCHAR Pattern)
386 {
387 UNIMPLEMENTED
388 }
389 #endif
390
391
392 /*
393 * @implemented
394 */
395 CCHAR
396 EXPORT
397 NdisSystemProcessorCount(
398 VOID)
399 {
400 return (CCHAR)KeNumberProcessors;
401 }
402
403
404 /*
405 * @unimplemented
406 */
407 VOID
408 EXPORT
409 NdisUnmapFile(
410 IN NDIS_HANDLE FileHandle)
411 {
412 UNIMPLEMENTED
413 }
414
415
416 /*
417 NdisUpcaseUnicodeString
418 NdisUpdateSharedMemory@4
419 */
420
421
422 /*
423 NdisWriteEventLogEntry
424 */
425
426
427
428 /* NDIS 5.0 extensions */
429
430 /*
431 * @unimplemented
432 */
433 VOID
434 EXPORT
435 NdisCompletePnPEvent(
436 IN NDIS_STATUS Status,
437 IN NDIS_HANDLE NdisBindingHandle,
438 IN PNET_PNP_EVENT NetPnPEvent)
439 /*
440 * FUNCTION:
441 * ARGUMENTS:
442 * NOTES:
443 * NDIS 5.0
444 */
445 {
446 UNIMPLEMENTED
447 }
448
449
450 /*
451 * @unimplemented
452 */
453 VOID
454 EXPORT
455 NdisConvertStringToAtmAddress(
456 OUT PNDIS_STATUS Status,
457 IN PNDIS_STRING String,
458 OUT PATM_ADDRESS AtmAddress)
459 /*
460 * FUNCTION:
461 * ARGUMENTS:
462 * NOTES:
463 * NDIS 5.0
464 */
465 {
466 UNIMPLEMENTED
467 }
468
469
470 /*
471 * @implemented
472 */
473 VOID
474 EXPORT
475 NdisGetCurrentProcessorCounts(
476 OUT PULONG pIdleCount,
477 OUT PULONG pKernelAndUser,
478 OUT PULONG pIndex)
479 /*
480 * FUNCTION:
481 * ARGUMENTS:
482 * NOTES:
483 * NDIS 5.0
484 */
485 {
486 ExGetCurrentProcessorCounts( (PULONG) pIdleCount, (PULONG) pKernelAndUser, (PULONG) pIndex);
487 }
488
489
490 /*
491 * @unimplemented
492 */
493 VOID
494 EXPORT
495 NdisGetDriverHandle(
496 IN PNDIS_HANDLE NdisBindingHandle,
497 OUT PNDIS_HANDLE NdisDriverHandle)
498 /*
499 * FUNCTION:
500 * ARGUMENTS:
501 * NOTES:
502 * NDIS 5.0
503 */
504 {
505 UNIMPLEMENTED
506 }
507
508
509 /*
510 * @unimplemented
511 */
512 PNDIS_PACKET
513 EXPORT
514 NdisGetReceivedPacket(
515 IN PNDIS_HANDLE NdisBindingHandle,
516 IN PNDIS_HANDLE MacContext)
517 /*
518 * FUNCTION:
519 * ARGUMENTS:
520 * NOTES:
521 * NDIS 5.0
522 */
523 {
524 UNIMPLEMENTED
525
526 return NULL;
527 }
528
529
530 /*
531 * @implemented
532 */
533 VOID
534 EXPORT
535 NdisGetSystemUpTime(OUT PULONG pSystemUpTime)
536 {
537 ULONG Increment;
538 LARGE_INTEGER TickCount;
539
540 /* Get the increment and current tick count */
541 Increment = KeQueryTimeIncrement();
542 KeQueryTickCount(&TickCount);
543
544 /* Convert to milliseconds and return */
545 TickCount.QuadPart *= Increment;
546 TickCount.QuadPart /= (10 * 1000);
547 *pSystemUpTime = TickCount.LowPart;
548 }
549
550
551 /*
552 * @implemented
553 */
554 #undef NdisInterlockedDecrement
555 LONG
556 EXPORT
557 NdisInterlockedDecrement(
558 IN PLONG Addend)
559 /*
560 * FUNCTION:
561 * ARGUMENTS:
562 * NOTES:
563 * NDIS 5.0
564 */
565 {
566 return InterlockedDecrement ( Addend );
567 }
568
569
570 /*
571 * @implemented
572 */
573 #undef NdisInterlockedIncrement
574 LONG
575 EXPORT
576 NdisInterlockedIncrement(
577 IN PLONG Addend)
578 /*
579 * FUNCTION:
580 * ARGUMENTS:
581 * NOTES:
582 * NDIS 5.0
583 */
584 {
585 return InterlockedIncrement ( Addend );
586 }
587
588
589 /*
590 * @implemented
591 */
592 #undef NdisInterlockedPopEntrySList
593 PSINGLE_LIST_ENTRY
594 EXPORT
595 NdisInterlockedPopEntrySList(
596 IN PSLIST_HEADER ListHead,
597 IN PKSPIN_LOCK Lock)
598 /*
599 * FUNCTION:
600 * ARGUMENTS:
601 * NOTES:
602 * NDIS 5.0
603 */
604 {
605 return ExInterlockedPopEntrySList ( ListHead, Lock );
606 }
607
608
609 /*
610 * @implemented
611 */
612 #undef NdisInterlockedPushEntrySList
613 PSINGLE_LIST_ENTRY
614 EXPORT
615 NdisInterlockedPushEntrySList(
616 IN PSLIST_HEADER ListHead,
617 IN PSINGLE_LIST_ENTRY ListEntry,
618 IN PKSPIN_LOCK Lock)
619 /*
620 * FUNCTION:
621 * ARGUMENTS:
622 * NOTES:
623 * NDIS 5.0
624 */
625 {
626 return ExInterlockedPushEntrySList ( ListHead, ListEntry, Lock );
627 }
628
629
630 /*
631 * @unimplemented
632 */
633 NDIS_STATUS
634 EXPORT
635 NdisMDeregisterDevice(
636 IN NDIS_HANDLE NdisDeviceHandle)
637 /*
638 * FUNCTION:
639 * ARGUMENTS:
640 * NOTES:
641 * NDIS 5.0
642 */
643 {
644 UNIMPLEMENTED
645
646 return NDIS_STATUS_FAILURE;
647 }
648
649
650 /*
651 * @unimplemented
652 */
653 VOID
654 EXPORT
655 NdisMGetDeviceProperty(
656 IN NDIS_HANDLE MiniportAdapterHandle,
657 IN OUT PDEVICE_OBJECT *PhysicalDeviceObject OPTIONAL,
658 IN OUT PDEVICE_OBJECT *FunctionalDeviceObject OPTIONAL,
659 IN OUT PDEVICE_OBJECT *NextDeviceObject OPTIONAL,
660 IN OUT PCM_RESOURCE_LIST *AllocatedResources OPTIONAL,
661 IN OUT PCM_RESOURCE_LIST *AllocatedResourcesTranslated OPTIONAL)
662 /*
663 * FUNCTION:
664 * ARGUMENTS:
665 * NOTES:
666 * NDIS 5.0
667 */
668 {
669 UNIMPLEMENTED
670 }
671
672
673 /*
674 * @unimplemented
675 */
676 NDIS_STATUS
677 EXPORT
678 NdisMInitializeScatterGatherDma(
679 IN NDIS_HANDLE MiniportAdapterHandle,
680 IN BOOLEAN Dma64BitAddresses,
681 IN ULONG MaximumPhysicalMapping)
682 /*
683 * FUNCTION:
684 * ARGUMENTS:
685 * NOTES:
686 * NDIS 5.0
687 */
688 {
689 UNIMPLEMENTED
690
691 return NDIS_STATUS_FAILURE;
692 }
693
694
695 /*
696 * @unimplemented
697 */
698 NDIS_STATUS
699 EXPORT
700 NdisMPromoteMiniport(
701 IN NDIS_HANDLE MiniportAdapterHandle)
702 /*
703 * FUNCTION:
704 * ARGUMENTS:
705 * NOTES:
706 * NDIS 5.0
707 */
708 {
709 UNIMPLEMENTED
710
711 return NDIS_STATUS_FAILURE;
712 }
713
714
715 /*
716 * @unimplemented
717 */
718 NDIS_STATUS
719 EXPORT
720 NdisMQueryAdapterInstanceName(
721 OUT PNDIS_STRING AdapterInstanceName,
722 IN NDIS_HANDLE MiniportAdapterHandle)
723 /*
724 * FUNCTION:
725 * ARGUMENTS:
726 * NOTES:
727 * NDIS 5.0
728 */
729 {
730 UNIMPLEMENTED
731
732 return NDIS_STATUS_FAILURE;
733 }
734
735
736 /*
737 * @unimplemented
738 */
739 NDIS_STATUS
740 EXPORT
741 NdisMRegisterDevice(
742 IN NDIS_HANDLE NdisWrapperHandle,
743 IN PNDIS_STRING DeviceName,
744 IN PNDIS_STRING SymbolicName,
745 IN PDRIVER_DISPATCH MajorFunctions[],
746 OUT PDEVICE_OBJECT *pDeviceObject,
747 OUT NDIS_HANDLE *NdisDeviceHandle)
748 /*
749 * FUNCTION:
750 * ARGUMENTS:
751 * NOTES:
752 * NDIS 5.0
753 */
754 {
755 UNIMPLEMENTED
756
757 return NDIS_STATUS_FAILURE;
758 }
759
760
761 /*
762 * @unimplemented
763 */
764 VOID
765 EXPORT
766 NdisMRegisterUnloadHandler(
767 IN NDIS_HANDLE NdisWrapperHandle,
768 IN PDRIVER_UNLOAD UnloadHandler)
769 /*
770 * FUNCTION:
771 * ARGUMENTS:
772 * NOTES:
773 * NDIS 5.0
774 */
775 {
776 UNIMPLEMENTED
777 }
778
779
780 /*
781 * @unimplemented
782 */
783 NDIS_STATUS
784 EXPORT
785 NdisMRemoveMiniport(
786 IN NDIS_HANDLE MiniportAdapterHandle)
787 /*
788 * FUNCTION:
789 * ARGUMENTS:
790 * NOTES:
791 * NDIS 5.0
792 */
793 {
794 UNIMPLEMENTED
795
796 return NDIS_STATUS_FAILURE;
797 }
798
799
800 /*
801 * @unimplemented
802 */
803 NDIS_STATUS
804 EXPORT
805 NdisMSetMiniportSecondary(
806 IN NDIS_HANDLE MiniportAdapterHandle,
807 IN NDIS_HANDLE PrimaryMiniportAdapterHandle)
808 /*
809 * FUNCTION:
810 * ARGUMENTS:
811 * NOTES:
812 * NDIS 5.0
813 */
814 {
815 UNIMPLEMENTED
816
817 return NDIS_STATUS_FAILURE;
818 }
819
820
821
822 /*
823 * @unimplemented
824 */
825 NDIS_STATUS
826 EXPORT
827 NdisQueryAdapterInstanceName(
828 OUT PNDIS_STRING AdapterInstanceName,
829 IN NDIS_HANDLE NdisBindingHandle)
830 /*
831 * FUNCTION:
832 * ARGUMENTS:
833 * NOTES:
834 * NDIS 5.0
835 */
836 {
837 UNIMPLEMENTED
838
839 return NDIS_STATUS_FAILURE;
840 }
841
842
843 /*
844 * @unimplemented
845 */
846 ULONG
847 EXPORT
848 NdisReadPcmciaAttributeMemory(
849 IN NDIS_HANDLE NdisAdapterHandle,
850 IN ULONG Offset,
851 IN PVOID Buffer,
852 IN ULONG Length)
853 /*
854 * FUNCTION:
855 * ARGUMENTS:
856 * NOTES:
857 * NDIS 5.0
858 */
859 {
860 UNIMPLEMENTED
861
862 return 0;
863 }
864
865
866 /*
867 * @unimplemented
868 */
869 ULONG
870 EXPORT
871 NdisWritePcmciaAttributeMemory(
872 IN NDIS_HANDLE NdisAdapterHandle,
873 IN ULONG Offset,
874 IN PVOID Buffer,
875 IN ULONG Length)
876 /*
877 * FUNCTION:
878 * ARGUMENTS:
879 * NOTES:
880 * NDIS 5.0
881 */
882 {
883 UNIMPLEMENTED
884
885 return 0;
886 }
887
888
889 /* NDIS 5.0 extensions for intermediate drivers */
890
891 /*
892 * @unimplemented
893 */
894 VOID
895 EXPORT
896 NdisIMAssociateMiniport(
897 IN NDIS_HANDLE DriverHandle,
898 IN NDIS_HANDLE ProtocolHandle)
899 /*
900 * FUNCTION:
901 * ARGUMENTS:
902 * NOTES:
903 * NDIS 5.0
904 */
905 {
906 UNIMPLEMENTED
907 }
908
909
910 /*
911 * @unimplemented
912 */
913 NDIS_STATUS
914 EXPORT
915 NdisIMCancelInitializeDeviceInstance(
916 IN NDIS_HANDLE DriverHandle,
917 IN PNDIS_STRING DeviceInstance)
918 /*
919 * FUNCTION:
920 * ARGUMENTS:
921 * NOTES:
922 * NDIS 5.0
923 */
924 {
925 UNIMPLEMENTED
926
927 return NDIS_STATUS_FAILURE;
928 }
929
930
931 /*
932 * @unimplemented
933 */
934 VOID
935 EXPORT
936 NdisIMCopySendCompletePerPacketInfo(
937 IN PNDIS_PACKET DstPacket,
938 IN PNDIS_PACKET SrcPacket)
939 /*
940 * FUNCTION:
941 * ARGUMENTS:
942 * NOTES:
943 * NDIS 5.0
944 */
945 {
946 UNIMPLEMENTED
947 }
948
949
950 /*
951 * @unimplemented
952 */
953 VOID
954 EXPORT
955 NdisIMCopySendPerPacketInfo(
956 IN PNDIS_PACKET DstPacket,
957 IN PNDIS_PACKET SrcPacket)
958 /*
959 * FUNCTION:
960 * ARGUMENTS:
961 * NOTES:
962 * NDIS 5.0
963 */
964 {
965 UNIMPLEMENTED
966 }
967
968
969 /*
970 * @unimplemented
971 */
972 VOID
973 EXPORT
974 NdisIMDeregisterLayeredMiniport(
975 IN NDIS_HANDLE DriverHandle)
976 /*
977 * FUNCTION:
978 * ARGUMENTS:
979 * NOTES:
980 * NDIS 5.0
981 */
982 {
983 UNIMPLEMENTED
984 }
985
986
987 /*
988 * @unimplemented
989 */
990 NDIS_HANDLE
991 EXPORT
992 NdisIMGetBindingContext(
993 IN NDIS_HANDLE NdisBindingHandle)
994 /*
995 * FUNCTION:
996 * ARGUMENTS:
997 * NOTES:
998 * NDIS 5.0
999 */
1000 {
1001 UNIMPLEMENTED
1002
1003 return (NDIS_HANDLE)NULL;
1004 }
1005
1006
1007 /*
1008 * @unimplemented
1009 */
1010 NDIS_HANDLE
1011 EXPORT
1012 NdisIMGetDeviceContext(
1013 IN NDIS_HANDLE MiniportAdapterHandle)
1014 /*
1015 * FUNCTION:
1016 * ARGUMENTS:
1017 * NOTES:
1018 * NDIS 5.0
1019 */
1020 {
1021 UNIMPLEMENTED
1022
1023 return (NDIS_HANDLE)NULL;
1024 }
1025
1026
1027 /*
1028 * @unimplemented
1029 */
1030 NDIS_STATUS
1031 EXPORT
1032 NdisIMInitializeDeviceInstanceEx(
1033 IN NDIS_HANDLE DriverHandle,
1034 IN PNDIS_STRING DriverInstance,
1035 IN NDIS_HANDLE DeviceContext OPTIONAL)
1036 /*
1037 * FUNCTION:
1038 * ARGUMENTS:
1039 * NOTES:
1040 * NDIS 5.0
1041 */
1042 {
1043 UNIMPLEMENTED
1044
1045 return NDIS_STATUS_FAILURE;
1046 }
1047
1048
1049
1050 VOID
1051 NTAPI
1052 ndisProcWorkItemHandler(PVOID pContext)
1053 {
1054 PNDIS_WORK_ITEM pNdisItem = (PNDIS_WORK_ITEM)pContext;
1055 pNdisItem->Routine(pNdisItem, pNdisItem->Context);
1056 }
1057
1058 EXPORT
1059 NDIS_STATUS
1060 NdisScheduleWorkItem(
1061 IN PNDIS_WORK_ITEM pWorkItem)
1062 {
1063 PWORK_QUEUE_ITEM pntWorkItem = (PWORK_QUEUE_ITEM)pWorkItem->WrapperReserved;
1064 ExInitializeWorkItem(pntWorkItem, ndisProcWorkItemHandler, pWorkItem);
1065 ExQueueWorkItem(pntWorkItem, CriticalWorkQueue);
1066 return NDIS_STATUS_SUCCESS;
1067 }