2 ;*****************************************************************************
4 ; (C) Copyright MICROSOFT Corp, 1995
6 ; Title: LANCELNK.ASM sourced from:
7 ; Title: NDISLNK.ASM - Assembly linkage to NDIS Wrapper for MACs
10 ; Information in this document is Microsoft Confidential.
11 ; Copyright (c) 1996, Microsoft Corporation, all rights reserve
13 ; This document is provided for informational purposes only and Microsoft
14 ; Corporation makes no warranties, either expressed or implied, in this document.
15 ; Information in this document may be substantially changed without notice in
16 ; subsequent versions of windows and does not represent a commitment on the
17 ; part of Microsoft Corporation. This information is for internal use only for
18 ; development purposes.
24 ;=============================================================================
31 INCLUDE NETVXD.
INC ; Net VxD initialization oredr
33 ;INCLUDE NDIS.INC Dont have this so include the bit we need from the NDIS.H file.
35 Begin_Service_Table Ndis
37 Ndis_Service NdisGetVersion
,LOCAL
39 Ndis_Service NdisAllocateSpinLock
,LOCAL
40 Ndis_Service NdisFreeSpinLock
,LOCAL
41 Ndis_Service NdisAcquireSpinLock
,LOCAL
42 Ndis_Service NdisReleaseSpinLock
,LOCAL
44 Ndis_Service NdisOpenConfiguration
,LOCAL
45 Ndis_Service NdisReadConfiguration
,LOCAL
46 Ndis_Service NdisCloseConfiguration
,LOCAL
47 Ndis_Service NdisReadEisaSlotInformation
, LOCAL
48 Ndis_Service NdisReadMcaPosInformation
,LOCAL
50 Ndis_Service NdisAllocateMemory
,LOCAL
51 Ndis_Service NdisFreeMemory
,LOCAL
52 Ndis_Service NdisSetTimer
,LOCAL
53 Ndis_Service NdisCancelTimer
,LOCAL
54 Ndis_Service NdisStallExecution
,LOCAL
55 Ndis_Service NdisInitializeInterrupt
,LOCAL
56 Ndis_Service NdisRemoveInterrupt
,LOCAL
57 Ndis_Service NdisSynchronizeWithInterrupt
,LOCAL
58 Ndis_Service NdisOpenFile
,LOCAL
59 Ndis_Service NdisMapFile
,LOCAL
60 Ndis_Service NdisUnmapFile
,LOCAL
61 Ndis_Service NdisCloseFile
,LOCAL
63 Ndis_Service NdisAllocatePacketPool
,LOCAL
64 Ndis_Service NdisFreePacketPool
,LOCAL
65 Ndis_Service NdisAllocatePacket
,LOCAL
66 Ndis_Service NdisReinitializePacket
,LOCAL
67 Ndis_Service NdisFreePacket
,LOCAL
68 Ndis_Service NdisQueryPacket
,LOCAL
70 Ndis_Service NdisAllocateBufferPool
,LOCAL
71 Ndis_Service NdisFreeBufferPool
,LOCAL
72 Ndis_Service NdisAllocateBuffer
,LOCAL
73 Ndis_Service NdisCopyBuffer
,LOCAL
74 Ndis_Service NdisFreeBuffer
,LOCAL
75 Ndis_Service NdisQueryBuffer
,LOCAL
76 Ndis_Service NdisGetBufferPhysicalAddress
,LOCAL
77 Ndis_Service NdisChainBufferAtFront
,LOCAL
78 Ndis_Service NdisChainBufferAtBack
,LOCAL
79 Ndis_Service NdisUnchainBufferAtFront
,LOCAL
80 Ndis_Service NdisUnchainBufferAtBack
,LOCAL
81 Ndis_Service NdisGetNextBuffer
,LOCAL
82 Ndis_Service NdisCopyFromPacketToPacket
,LOCAL
84 Ndis_Service NdisRegisterProtocol
,LOCAL
85 Ndis_Service NdisDeregisterProtocol
,LOCAL
86 Ndis_Service NdisOpenAdapter
,LOCAL
87 Ndis_Service NdisCloseAdapter
,LOCAL
88 Ndis_Service NdisSend
,LOCAL
89 Ndis_Service NdisTransferData
,LOCAL
90 Ndis_Service NdisReset
,LOCAL
91 Ndis_Service NdisRequest
,LOCAL
93 Ndis_Service NdisInitializeWrapper
,LOCAL
94 Ndis_Service NdisTerminateWrapper
,LOCAL
95 Ndis_Service NdisRegisterMac
,LOCAL
96 Ndis_Service NdisDeregisterMac
,LOCAL
97 Ndis_Service NdisRegisterAdapter
,LOCAL
98 Ndis_Service NdisDeregisterAdapter
,LOCAL
99 Ndis_Service NdisCompleteOpenAdapter
,LOCAL
100 Ndis_Service NdisCompleteCloseAdapter
,LOCAL
101 Ndis_Service NdisCompleteSend
,LOCAL
102 Ndis_Service NdisCompleteTransferData
,LOCAL
103 Ndis_Service NdisCompleteReset
,LOCAL
104 Ndis_Service NdisCompleteRequest
,LOCAL
105 Ndis_Service NdisIndicateReceive
,LOCAL
106 Ndis_Service NdisIndicateReceiveComplete
,LOCAL
107 Ndis_Service NdisIndicateStatus
,LOCAL
108 Ndis_Service NdisIndicateStatusComplete
,LOCAL
109 Ndis_Service NdisCompleteQueryStatistics
,LOCAL
111 Ndis_Service NdisEqualString
,LOCAL
112 Ndis_Service NdisRegAdaptShutdown
,LOCAL
113 Ndis_Service NdisReadNetworkAddress
,LOCAL
115 Ndis_Service NdisWriteErrorLogEntry
,LOCAL
117 Ndis_Service NdisMapIoSpace
,LOCAL
118 Ndis_Service NdisDeregAdaptShutdown
,LOCAL
120 Ndis_Service NdisAllocateSharedMemory
,LOCAL
121 Ndis_Service NdisFreeSharedMemory
, LOCAL
123 Ndis_Service NdisAllocateDmaChannel
, LOCAL
124 Ndis_Service NdisSetupDmaTransfer
, LOCAL
125 Ndis_Service NdisCompleteDmaTransfer
, LOCAL
126 Ndis_Service NdisReadDmaCounter
, LOCAL
127 Ndis_Service NdisFreeDmaChannel
, LOCAL
128 Ndis_Service NdisReleaseAdapterResources
, LOCAL
129 Ndis_Service NdisQueryGlobalStatistics
, LOCAL
131 Ndis_Service NdisOpenProtocolConfiguration
, LOCAL
132 Ndis_Service NdisCompleteBindAdapter
, LOCAL
133 Ndis_Service NdisCompleteUnbindAdapter
, LOCAL
134 Ndis_Service WrapperStartNet
, LOCAL
135 Ndis_Service WrapperGetComponentList
, LOCAL
136 Ndis_Service WrapperQueryAdapterResources
, Local
137 Ndis_Service WrapperDelayBinding
, Local
138 Ndis_Service WrapperResumeBinding
, Local
139 Ndis_Service WrapperRemoveChildren
, Local
140 Ndis_Service NdisImmediateReadPciSlotInformation
, Local
141 Ndis_Service NdisImmediateWritePciSlotInformation
, Local
142 Ndis_Service NdisReadPciSlotInformation
, Local
143 Ndis_Service NdisWritePciSlotInformation
, Local
144 Ndis_Service NdisPciAssignResources
, Local
145 Ndis_Service NdisQueryBufferOffset
, Local
146 End_Service_Table Ndis
148 NDIS_STATUS_SUCCESS
EQU 0
152 ; the following equate makes the VXD dynamically loadable.
156 DECLARE_VIRTUAL_DEVICE
%DEVICE
, 3, 10, <%DEVICE
>_Control
, Undefined_Device_Id
, PROTOCOL_Init_Order
168 BeginProc C_Device_Init
172 extern
_DriverEntry@8:NEAR
174 extern
_DriverEntry:NEAR
178 cmp al, 0 ; Make sure we' haven't been called already.
179 jnz Succeed_Init_Phase
180 inc bInitAlready
; Set the "Called Already" Flag
182 ; Make sure the wrapper (Ndis.386) is loaded
183 VxDcall NdisGetVersion
196 cmp eax, NDIS_STATUS_SUCCESS
207 EndProc C_Device_Init
210 Begin_Control_Dispatch
%DEVICE
212 Control_Dispatch Sys_Dynamic_Device_Init
, C_Device_Init
213 Control_Dispatch W32_DEVICEIOCONTROL
, PacketIOControl
, sCall
, <ecx, ebx, edx, esi>
214 ; Control_Dispatch DEBUG_QUERY, PacketDebugQuery, sCall
216 End_Control_Dispatch
%DEVICE
222 ;******************************************************************************
223 ; R E A L M O D E I N I T C O D E
224 ;******************************************************************************
226 ;******************************************************************************
238 ;==============================================================================
242 BeginProc MAC_Real_Init
245 ; If another us is loaded then don't load -- Just abort our load
247 test bx, Duplicate_From_INT2F
OR Duplicate_Device_ID
248 jnz SHORT Ndis_RI_Abort_Load
252 ; No other is loaded.
256 mov ax, Device_Load_Ok
262 mov ax, Abort_Device_Load
265 EndProc MAC_Real_Init