Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1033 lines
16 KiB

  1. /*++
  2. Copyright (c) 1992-1996 Microsoft Corporation
  3. Module Name:
  4. protos.h
  5. Abstract:
  6. This file contains the function proto-types and macros.
  7. Author:
  8. Jameel Hyder (jameelh@microsoft.com) July 1996
  9. Environment:
  10. Kernel mode
  11. Revision History:
  12. --*/
  13. #ifndef _PROTOS_
  14. #define _PROTOS_
  15. #define POOL_TAG_PG 'AprA'
  16. #define POOL_TAG_VC 'VprA'
  17. #define POOL_TAG_INTF 'IprA'
  18. #define POOL_TAG_ADDR 'AprA'
  19. #define POOL_TAG_BUF 'BprA'
  20. #define POOL_TAG_REQ 'RprA'
  21. #define POOL_TAG_SAP 'SprA'
  22. #define POOL_TAG_BLK 'KprA'
  23. #define POOL_TAG_MARS 'MprA'
  24. #if DBG
  25. extern
  26. PVOID
  27. ArpSAllocMem(
  28. IN UINT Size,
  29. IN ULONG FileLine,
  30. IN ULONG Tag,
  31. IN BOOLEAN Paged
  32. );
  33. extern
  34. VOID
  35. ArpSFreeMem(
  36. IN PVOID pMem,
  37. IN ULONG FileLine
  38. );
  39. #define ALLOC_NP_MEM(_size, _tag) ArpSAllocMem(_size, __LINE__ | _FILENUM_, _tag, FALSE)
  40. #define ALLOC_PG_MEM(_size) ArpSAllocMem(_size, __LINE__ | _FILENUM_, POOL_TAG_PG, TRUE)
  41. #define FREE_MEM(_p) ArpSFreeMem(_p, __LINE__ | _FILENUM_)
  42. #else
  43. #define ALLOC_NP_MEM(_size, _tag) ExAllocatePoolWithTag(NonPagedPool, _size, _tag)
  44. #define ALLOC_PG_MEM(_size) ExAllocatePoolWithTag(PagedPool, _size, POOL_TAG_PG)
  45. #define FREE_MEM(_p) ExFreePool(_p)
  46. #endif
  47. #define ZERO_MEM(_p, _size) RtlZeroMemory(_p, _size)
  48. #define COPY_MEM(_d, _s, _size) RtlCopyMemory(_d, _s, _size)
  49. #define MOVE_MEM(_d, _s, _size) RtlMoveMemory(_d, _s, _size)
  50. #define COMP_MEM(_p1, _p2, _size_) RtlEqualMemory(_p1, _p2, _size_)
  51. #define INITIALIZE_SPIN_LOCK(_l) KeInitializeSpinLock(_l)
  52. #define ACQUIRE_SPIN_LOCK(_l, _i) KeAcquireSpinLock(_l, _i)
  53. #define ACQUIRE_SPIN_LOCK_DPC(_l) KeAcquireSpinLockAtDpcLevel(_l)
  54. #define RELEASE_SPIN_LOCK(_l, _i) KeReleaseSpinLock(_l, _i)
  55. #define RELEASE_SPIN_LOCK_DPC(_l) KeReleaseSpinLockFromDpcLevel(_l)
  56. #define INITIALIZE_MUTEX(_m_) KeInitializeMutex(_m_, 0xFFFF)
  57. #define RELEASE_MUTEX(_m_) KeReleaseMutex(_m_, FALSE);
  58. #define WAIT_FOR_OBJECT(_S_, _O_, _TO_) (_S_) = KeWaitForSingleObject(_O_, \
  59. Executive, \
  60. KernelMode, \
  61. TRUE, \
  62. _TO_) \
  63. #define INIT_EVENT(_pEv) NdisInitializeEvent(_pEv)
  64. #define SET_EVENT(_pEv) NdisSetEvent(_pEv)
  65. #define WAIT_FOR_EVENT(_pEv) NdisWaitEvent(_pEv, 0)
  66. extern
  67. NTSTATUS
  68. DriverEntry(
  69. IN PDRIVER_OBJECT DriverObject,
  70. IN PUNICODE_STRING RegistryPath
  71. );
  72. extern
  73. NTSTATUS
  74. ArpSDispatch(
  75. IN PDEVICE_OBJECT pDeviceObject,
  76. IN PIRP pIrp
  77. );
  78. extern
  79. NTSTATUS
  80. ArpSHandleIoctlRequest(
  81. IN PIRP pIrp,
  82. IN PIO_STACK_LOCATION pIrpSp
  83. );
  84. extern
  85. NTSTATUS
  86. ArpSEnumerateInterfaces(
  87. IN PUCHAR pBuffer,
  88. IN OUT PULONG_PTR pSize
  89. );
  90. extern
  91. NTSTATUS
  92. ArpSFlushArpCache(
  93. IN PINTF pIntF
  94. );
  95. extern
  96. NTSTATUS
  97. ArpSQueryOrAddArpEntry(
  98. IN PINTF pIntF,
  99. IN OUT PIOCTL_QA_ENTRY pQaBuf,
  100. IN OPERATION Operation
  101. );
  102. extern
  103. NTSTATUS
  104. ArpSQueryArpCache(
  105. IN PINTF pIntF,
  106. IN PUCHAR pBuf,
  107. IN OUT PULONG_PTR pSize
  108. );
  109. extern
  110. NTSTATUS
  111. ArpSQueryArpStats(
  112. IN PINTF pIntF,
  113. OUT PARP_SERVER_STATISTICS pArpStats
  114. );
  115. extern
  116. NTSTATUS
  117. ArpSQueryMarsCache(
  118. IN PINTF pIntF,
  119. IN PUCHAR pBuf,
  120. IN OUT PULONG_PTR pSize
  121. );
  122. extern
  123. NTSTATUS
  124. ArpSQueryMarsStats(
  125. IN PINTF pIntF,
  126. OUT PMARS_SERVER_STATISTICS pMarsStats
  127. );
  128. extern
  129. VOID
  130. ArpSResetStats(
  131. IN PINTF pIntF
  132. );
  133. extern
  134. VOID
  135. ArpSUnload(
  136. IN PDRIVER_OBJECT DriverObject
  137. );
  138. extern
  139. VOID
  140. ArpSShutDown(
  141. VOID
  142. );
  143. extern
  144. NDIS_STATUS
  145. ArpSStopInterface(
  146. IN PINTF pIntF,
  147. IN BOOLEAN bCloseAdapter
  148. );
  149. extern
  150. NDIS_STATUS
  151. ArpSPnPEventHandler(
  152. IN NDIS_HANDLE ProtocolBindingContext,
  153. IN PNET_PNP_EVENT pNetPnPEvent
  154. );
  155. extern
  156. PINTF
  157. ArpSCreateIntF(
  158. IN PNDIS_STRING DeviceName,
  159. IN PNDIS_STRING ConfigString,
  160. IN NDIS_HANDLE BindingContext
  161. );
  162. extern
  163. VOID
  164. ArpSReqThread(
  165. IN PVOID Context
  166. );
  167. extern
  168. VOID
  169. ArpSTimerThread(
  170. IN PVOID Context
  171. );
  172. extern
  173. NTSTATUS
  174. ArpSReadGlobalConfiguration(
  175. IN PUNICODE_STRING RegistryPath
  176. );
  177. extern
  178. NDIS_STATUS
  179. ArpSReadAdapterConfigFromRegistry(
  180. IN PINTF pIntF,
  181. OUT PATMARPS_CONFIG pConfig
  182. );
  183. extern
  184. NDIS_STATUS
  185. ArpSReadAdapterConfiguration(
  186. IN PINTF pIntF
  187. );
  188. extern
  189. VOID
  190. ArpSConvertStringToIpPair(
  191. OUT PNDIS_STATUS pStatus,
  192. IN PNDIS_STRING pString,
  193. IN PMCS_ENTRY pMcsEntry
  194. );
  195. extern
  196. BOOLEAN
  197. IPConvertStringToAddress(
  198. IN PWCHAR AddressString,
  199. OUT PULONG IpAddress
  200. );
  201. extern
  202. VOID
  203. ArpSReadArpCache(
  204. IN PINTF pIntF
  205. );
  206. extern
  207. BOOLEAN
  208. ArpSWriteArpCache(
  209. IN PINTF pIntF,
  210. IN PTIMER Timer,
  211. IN BOOLEAN TimerShuttingDown
  212. );
  213. extern
  214. VOID
  215. MarsReqThread(
  216. IN PVOID Context
  217. );
  218. extern
  219. VOID
  220. MarsHandleRequest(
  221. IN PINTF pIntF,
  222. IN PARP_VC Vc,
  223. IN PMARS_HEADER Header,
  224. IN PNDIS_PACKET Packet
  225. );
  226. extern
  227. VOID
  228. MarsHandleJoin(
  229. IN PINTF pIntF,
  230. IN PARP_VC Vc,
  231. IN PMARS_HEADER Header,
  232. IN PNDIS_PACKET Packet
  233. );
  234. extern
  235. VOID
  236. MarsHandleLeave(
  237. IN PINTF pIntF,
  238. IN PARP_VC Vc,
  239. IN PMARS_HEADER Header,
  240. IN PNDIS_PACKET Packet
  241. );
  242. extern
  243. PCLUSTER_MEMBER
  244. MarsLookupClusterMember(
  245. IN PINTF pIntF,
  246. IN PHW_ADDR pHwAddr
  247. );
  248. extern
  249. PCLUSTER_MEMBER
  250. MarsCreateClusterMember(
  251. IN PINTF pIntF,
  252. IN PHW_ADDR pHwAddr
  253. );
  254. extern
  255. VOID
  256. MarsDeleteClusterMember(
  257. IN PINTF pIntF,
  258. IN PCLUSTER_MEMBER pMember
  259. );
  260. extern
  261. PMARS_ENTRY
  262. MarsLookupMarsEntry(
  263. IN PINTF pIntF,
  264. IN IPADDR GrpAddr,
  265. IN BOOLEAN bCreateNew
  266. );
  267. extern
  268. BOOLEAN
  269. MarsIsAddressMcsServed(
  270. IN PINTF pIntF,
  271. IN IPADDR IPAddress
  272. );
  273. extern
  274. VOID
  275. MarsPunchHoles(
  276. IN PMCAST_ADDR_PAIR pGrpAddrRange,
  277. IN PGROUP_MEMBER pGroupList,
  278. IN PINTF pIntF,
  279. IN IPADDR UNALIGNED * pOutBuf OPTIONAL,
  280. OUT PUSHORT pMinMaxCount,
  281. OUT BOOLEAN * pAnyHolesPunched
  282. );
  283. extern
  284. BOOLEAN
  285. MarsAddClusterMemberToGroups(
  286. IN PINTF pIntF,
  287. IN PCLUSTER_MEMBER pMember,
  288. IN PMCAST_ADDR_PAIR pGrpAddrRange,
  289. IN PNDIS_PACKET Packet,
  290. IN PMARS_JOIN_LEAVE JHdr,
  291. IN UINT Length,
  292. OUT PNDIS_PACKET * ppClusterPacket
  293. );
  294. extern
  295. VOID
  296. MarsUnlinkAllGroupsOnClusterMember(
  297. IN PINTF pIntF,
  298. IN PCLUSTER_MEMBER pMember
  299. );
  300. extern
  301. BOOLEAN
  302. MarsDelClusterMemberFromGroups(
  303. IN PINTF pIntF,
  304. IN PCLUSTER_MEMBER pMember,
  305. IN PMCAST_ADDR_PAIR pGrpAddrRange,
  306. IN PNDIS_PACKET Packet,
  307. IN PMARS_JOIN_LEAVE LHdr,
  308. IN UINT Length,
  309. OUT PNDIS_PACKET * ppClusterPacket
  310. );
  311. extern
  312. PNDIS_PACKET
  313. MarsAllocControlPacket(
  314. IN PINTF pIntF,
  315. IN ULONG PacketLength,
  316. OUT PUCHAR * pPacketStart
  317. );
  318. extern
  319. VOID
  320. MarsFreePacket(
  321. IN PNDIS_PACKET Packet
  322. );
  323. extern
  324. PNDIS_PACKET
  325. MarsAllocPacketHdrCopy(
  326. IN PNDIS_PACKET Packet
  327. );
  328. extern
  329. VOID
  330. MarsSendOnClusterControlVc(
  331. IN PINTF pIntF,
  332. IN PNDIS_PACKET Packet OPTIONAL
  333. );
  334. extern
  335. VOID
  336. MarsFreePacketsQueuedForClusterControlVc(
  337. IN PINTF pIntF
  338. );
  339. extern
  340. BOOLEAN
  341. MarsDelMemberFromClusterControlVc(
  342. IN PINTF pIntF,
  343. IN PCLUSTER_MEMBER pMember,
  344. IN BOOLEAN fIfLocked,
  345. IN KIRQL OldIrql OPTIONAL
  346. );
  347. extern
  348. VOID
  349. MarsAddMemberToClusterControlVc(
  350. IN PINTF pIntF,
  351. IN PCLUSTER_MEMBER pMember
  352. );
  353. extern
  354. PCO_CALL_PARAMETERS
  355. MarsPrepareCallParameters(
  356. IN PINTF pIntF,
  357. IN PHW_ADDR pHwAddr,
  358. IN BOOLEAN IsMakeCall
  359. );
  360. extern
  361. BOOLEAN
  362. MarsSendRedirect(
  363. IN PINTF pIntF,
  364. IN PTIMER Timer,
  365. IN BOOLEAN TimerShuttingDown
  366. );
  367. extern
  368. VOID
  369. MarsAbortAllMembers(
  370. IN PINTF pIntF
  371. );
  372. extern
  373. VOID
  374. MarsStopInterface(
  375. IN PINTF pIntF
  376. );
  377. extern
  378. VOID
  379. MarsDumpPacket(
  380. IN PUCHAR Packet,
  381. IN UINT PktLen
  382. );
  383. extern
  384. VOID
  385. MarsDumpIpAddr(
  386. IN IPADDR IpAddr,
  387. IN PCHAR String
  388. );
  389. extern
  390. VOID
  391. MarsDumpAtmAddr(
  392. IN PATM_ADDRESS AtmAddr,
  393. IN PCHAR String
  394. );
  395. extern
  396. VOID
  397. MarsDumpMap(
  398. IN PCHAR String,
  399. IN IPADDR IpAddr,
  400. IN PATM_ADDRESS AtmAddr
  401. );
  402. extern
  403. NTSTATUS
  404. ArpSInitializeNdis(
  405. VOID
  406. );
  407. extern
  408. VOID
  409. ArpSDeinitializeNdis(
  410. VOID
  411. );
  412. extern
  413. VOID
  414. ArpSOpenAdapterComplete(
  415. IN NDIS_HANDLE ProtocolBindingContext,
  416. IN NDIS_STATUS Status,
  417. IN NDIS_STATUS OpenErrorStatus
  418. );
  419. extern
  420. VOID
  421. ArpSCloseAdapterComplete(
  422. IN NDIS_HANDLE ProtocolBindingContext,
  423. IN NDIS_STATUS Status
  424. );
  425. extern
  426. VOID
  427. ArpSStatus(
  428. IN NDIS_HANDLE ProtocolBindingContext,
  429. IN NDIS_STATUS GeneralStatus,
  430. IN PVOID StatusBuffer,
  431. IN UINT StatusBufferSize
  432. );
  433. extern
  434. VOID
  435. ArpSReceiveComplete(
  436. IN NDIS_HANDLE ProtocolBindingContext
  437. );
  438. extern
  439. VOID
  440. ArpSStatusComplete(
  441. IN NDIS_HANDLE ProtocolBindingContext
  442. );
  443. VOID
  444. ArpSQueryAdapter(
  445. IN PINTF pIntF
  446. );
  447. extern
  448. VOID
  449. ArpSSendNdisRequest(
  450. IN PINTF pIntF,
  451. IN NDIS_OID Oid,
  452. IN PVOID pBuffer,
  453. IN ULONG BufferLength
  454. );
  455. extern
  456. VOID
  457. ArpSRequestComplete(
  458. IN NDIS_HANDLE ProtocolBindingContext,
  459. IN PNDIS_REQUEST pRequest,
  460. IN NDIS_STATUS Status
  461. );
  462. extern
  463. VOID
  464. ArpSBindAdapter(
  465. OUT PNDIS_STATUS Status,
  466. IN NDIS_HANDLE BindContext,
  467. IN PNDIS_STRING DeviceName,
  468. IN PVOID SystemSpecific1,
  469. IN PVOID SystemSpecific2
  470. );
  471. extern
  472. VOID
  473. ArpSUnbindAdapter(
  474. OUT PNDIS_STATUS Status,
  475. IN NDIS_HANDLE ProtocolBindingContext,
  476. IN NDIS_HANDLE UnbindContext
  477. );
  478. extern
  479. VOID
  480. ArpSCoSendComplete(
  481. IN NDIS_STATUS Status,
  482. IN NDIS_HANDLE ProtocolVcContext,
  483. IN PNDIS_PACKET Packet
  484. );
  485. extern
  486. VOID
  487. ArpSCoStatus(
  488. IN NDIS_HANDLE ProtocolBindingContext,
  489. IN NDIS_HANDLE ProtocolVcContext OPTIONAL,
  490. IN NDIS_STATUS GeneralStatus,
  491. IN PVOID StatusBuffer,
  492. IN UINT StatusBufferSize
  493. );
  494. extern
  495. NDIS_STATUS
  496. ArpSCoRequest(
  497. IN NDIS_HANDLE ProtocolAfContext,
  498. IN NDIS_HANDLE ProtocolVcContext OPTIONAL,
  499. IN NDIS_HANDLE ProtocolPartyContext OPTIONAL,
  500. IN OUT PNDIS_REQUEST NdisRequest
  501. );
  502. extern
  503. VOID
  504. ArpSCoRequestComplete(
  505. IN NDIS_STATUS Status,
  506. IN NDIS_HANDLE ProtocolAfContext,
  507. IN NDIS_HANDLE ProtocolVcContext OPTIONAL,
  508. IN NDIS_HANDLE ProtocolPartyContext OPTIONAL,
  509. IN PNDIS_REQUEST NdisRequest
  510. );
  511. extern
  512. VOID
  513. ArpSCoAfRegisterNotify(
  514. IN NDIS_HANDLE ProtocolBindingContext,
  515. IN PCO_ADDRESS_FAMILY AddressFamily
  516. );
  517. extern
  518. NDIS_STATUS
  519. ArpSCreateVc(
  520. IN NDIS_HANDLE ProtocolAfContext,
  521. IN NDIS_HANDLE NdisVcHandle,
  522. OUT PNDIS_HANDLE ProtocolVcContext
  523. );
  524. extern
  525. NDIS_STATUS
  526. ArpSDeleteVc(
  527. IN NDIS_HANDLE ProtocolVcContext
  528. );
  529. extern
  530. VOID
  531. ArpSOpenAfComplete(
  532. IN NDIS_STATUS Status,
  533. IN NDIS_HANDLE ProtocolAfContext,
  534. IN NDIS_HANDLE NdisAfHandle
  535. );
  536. extern
  537. VOID
  538. ArpSCloseAfComplete(
  539. IN NDIS_STATUS Status,
  540. IN NDIS_HANDLE ProtocolAfContext
  541. );
  542. extern
  543. VOID
  544. ArpSRegisterSap(
  545. IN PINTF pIntF
  546. );
  547. extern
  548. VOID
  549. ArpSRegisterSapComplete(
  550. IN NDIS_STATUS Status,
  551. IN NDIS_HANDLE ProtocolSapContext,
  552. IN PCO_SAP Sap,
  553. IN NDIS_HANDLE NdisSapHandle
  554. );
  555. extern
  556. VOID
  557. ArpSDeregisterSapComplete(
  558. IN NDIS_STATUS Status,
  559. IN NDIS_HANDLE ProtocolSapContext
  560. );
  561. extern
  562. VOID
  563. ArpSMakeCallComplete(
  564. IN NDIS_STATUS Status,
  565. IN NDIS_HANDLE ProtocolVcContext,
  566. IN NDIS_HANDLE NdisPartyHandle OPTIONAL,
  567. IN PCO_CALL_PARAMETERS CallParameters
  568. );
  569. extern
  570. VOID
  571. ArpSCloseCallComplete(
  572. IN NDIS_STATUS Status,
  573. IN NDIS_HANDLE ProtocolVcContext,
  574. IN NDIS_HANDLE ProtocolPartyContext OPTIONAL
  575. );
  576. extern
  577. VOID
  578. ArpSAddPartyComplete(
  579. IN NDIS_STATUS Status,
  580. IN NDIS_HANDLE ProtocolPartyContext,
  581. IN NDIS_HANDLE NdisPartyHandle,
  582. IN PCO_CALL_PARAMETERS CallParameters
  583. );
  584. extern
  585. VOID
  586. ArpSDropPartyComplete(
  587. IN NDIS_STATUS Status,
  588. IN NDIS_HANDLE ProtocolPartyContext
  589. );
  590. extern
  591. NDIS_STATUS
  592. ArpSIncomingCall(
  593. IN NDIS_HANDLE ProtocolSapContext,
  594. IN NDIS_HANDLE ProtocolVcContext,
  595. IN OUT PCO_CALL_PARAMETERS CallParameters
  596. );
  597. extern
  598. VOID
  599. ArpSIncomingDropParty(
  600. IN NDIS_STATUS DropStatus,
  601. IN NDIS_HANDLE ProtocolPartyContext,
  602. IN PVOID CloseData OPTIONAL,
  603. IN UINT Size OPTIONAL
  604. );
  605. extern
  606. VOID
  607. ArpSCallConnected(
  608. IN NDIS_HANDLE ProtocolVcContext
  609. );
  610. extern
  611. VOID
  612. ArpSIncomingCloseCall(
  613. IN NDIS_STATUS CloseStatus,
  614. IN NDIS_HANDLE ProtocolVcContext,
  615. IN PVOID CloseData OPTIONAL,
  616. IN UINT Size OPTIONAL
  617. );
  618. extern
  619. VOID
  620. ArpSIncomingCallQoSChange(
  621. IN NDIS_HANDLE ProtocolVcContext,
  622. IN PCO_CALL_PARAMETERS CallParameters
  623. );
  624. extern
  625. VOID
  626. ArpSInitiateCloseCall(
  627. IN PARP_VC Vc
  628. );
  629. extern
  630. UINT
  631. ArpSHandleArpRequest(
  632. IN NDIS_HANDLE ProtocolBindingContext,
  633. IN NDIS_HANDLE ProtocolVcContext,
  634. IN PNDIS_PACKET Packet
  635. );
  636. extern
  637. PARP_ENTRY
  638. ArpSLookupEntryByIpAddr(
  639. IN PINTF pIntF,
  640. IN IPADDR IpAddr
  641. );
  642. extern
  643. PARP_ENTRY
  644. ArpSLookupEntryByAtmAddr(
  645. IN PINTF pIntF,
  646. IN PATM_ADDRESS Address,
  647. IN PATM_ADDRESS SubAddress OPTIONAL
  648. );
  649. extern
  650. PARP_ENTRY
  651. ArpSAddArpEntry(
  652. IN PINTF pIntF,
  653. IN IPADDR IpAddr,
  654. IN PATM_ADDRESS Address,
  655. IN PATM_ADDRESS SubAddress OPTIONAL,
  656. IN PARP_VC Vc OPTIONAL
  657. );
  658. extern
  659. PARP_ENTRY
  660. ArpSAddArpEntryFromDisk(
  661. IN PINTF pIntF,
  662. IN PDISK_ENTRY pDiskEntry
  663. );
  664. extern
  665. VOID
  666. ArpSUpdateArpEntry(
  667. IN PINTF pIntF,
  668. IN PARP_ENTRY ArpEntry,
  669. IN IPADDR IpAddr,
  670. IN PHW_ADDR HwAddr,
  671. IN PARP_VC Vc
  672. );
  673. extern
  674. VOID
  675. ArpSBuildArpReply(
  676. IN PINTF pIntF,
  677. IN PARP_ENTRY ArpEntry,
  678. IN PARPS_HEADER Header,
  679. IN PNDIS_PACKET Pkt
  680. );
  681. extern
  682. BOOLEAN
  683. ArpSAgeEntry(
  684. IN PINTF pIntF,
  685. IN PTIMER Timer,
  686. IN BOOLEAN TimerShuttingDown
  687. );
  688. extern
  689. BOOLEAN
  690. ArpSDeleteIntFAddresses(
  691. IN PINTF pIntF,
  692. IN INT NumAddresses,
  693. IN PATM_ADDRESS AddrList
  694. );
  695. extern
  696. VOID
  697. ArpSQueryAndSetAddresses(
  698. IN PINTF pIntF
  699. );
  700. VOID
  701. ArpSValidateAndSetRegdAddresses(
  702. IN PINTF pIntF,
  703. IN KIRQL OldIrql
  704. );
  705. VOID
  706. ArpSMakeRegAddrCallComplete(
  707. IN NDIS_STATUS Status,
  708. IN PREG_ADDR_CTXT pRegAddrCtxt
  709. );
  710. VOID
  711. ArpSCloseRegAddrCallComplete(
  712. IN NDIS_STATUS Status,
  713. IN PREG_ADDR_CTXT pRegAddrCtxt
  714. );
  715. VOID
  716. ArpSIncomingRegAddrCloseCall(
  717. IN NDIS_STATUS Status,
  718. IN PREG_ADDR_CTXT pRegAddrCtxt
  719. );
  720. VOID
  721. ArpSValidateOneRegdAddress(
  722. IN PINTF pIntF,
  723. IN KIRQL OldIrql
  724. );
  725. VOID
  726. ArpSSetupValidationCallParams(
  727. IN PREG_ADDR_CTXT pRegAddrCtxt, // LOCKIN LOCKOUT (pIntF lock)
  728. IN PATM_ADDRESS pAtmAddr
  729. );
  730. VOID
  731. ArpSUnlinkRegAddrCtxt(
  732. PINTF pIntF, // LOCKIN NOLOCKOUT
  733. KIRQL OldIrql
  734. );
  735. VOID
  736. ArpSLogFailedRegistration(
  737. PATM_ADDRESS pAtmAddress
  738. );
  739. extern
  740. BOOLEAN
  741. ArpSReferenceIntF(
  742. IN PINTF pIntF
  743. );
  744. extern
  745. PINTF
  746. ArpSReferenceIntFByName(
  747. IN PINTERFACE_NAME pInterface
  748. );
  749. extern
  750. VOID
  751. ArpSDereferenceIntF(
  752. IN PINTF pIntF
  753. );
  754. extern
  755. BOOLEAN
  756. ArpSReferenceVc(
  757. IN PARP_VC Vc,
  758. IN BOOLEAN bSendRef
  759. );
  760. extern
  761. VOID
  762. ArpSDereferenceVc(
  763. IN PARP_VC Vc,
  764. IN BOOLEAN KillArpEntry,
  765. IN BOOLEAN bSendComplete
  766. );
  767. extern
  768. VOID
  769. ArpSSleep(
  770. IN UINT TimeInMs
  771. );
  772. extern
  773. VOID
  774. ArpSFreeGlobalData(
  775. VOID
  776. );
  777. extern
  778. VOID
  779. ArpSTimerCancel(
  780. IN PTIMER pTimerList
  781. );
  782. extern
  783. VOID
  784. ArpSTimerEnqueue(
  785. IN PINTF pIntF,
  786. IN PTIMER pTimer
  787. );
  788. extern
  789. PVOID
  790. ArpSAllocBlock(
  791. IN PINTF pIntF,
  792. IN ENTRY_TYPE EntryType
  793. );
  794. extern
  795. VOID
  796. ArpSFreeBlock(
  797. IN PVOID pBlock
  798. );
  799. BOOLEAN
  800. ArpSValidAtmAddress(
  801. IN PATM_ADDRESS AtmAddr,
  802. IN UINT MaxSize
  803. );
  804. VOID
  805. DeregisterAllAddresses(
  806. IN PINTF pIntF
  807. );
  808. BOOLEAN
  809. MarsIsValidClusterMember(
  810. PINTF pIntF,
  811. PCLUSTER_MEMBER pPossibleMember
  812. );
  813. VOID
  814. ArpSTryCloseAdapter(
  815. IN PINTF pIntF // NOLOCKIN LOLOCKOUT
  816. );
  817. #if DBG
  818. extern
  819. VOID
  820. ArpSDumpPacket(
  821. IN PUCHAR Packet,
  822. IN UINT PktLen
  823. );
  824. extern
  825. VOID
  826. ArpSDumpAddress(
  827. IN IPADDR IpAddr,
  828. IN PHW_ADDR HwAddr,
  829. IN PCHAR String
  830. );
  831. extern
  832. VOID
  833. ArpSDumpIpAddr(
  834. IN IPADDR IpAddr,
  835. IN PCHAR String
  836. );
  837. extern
  838. VOID
  839. ArpSDumpAtmAddr(
  840. IN PATM_ADDRESS AtmAddr,
  841. IN PCHAR String
  842. );
  843. #else
  844. #define ArpSDumpPacket(_Packet, _PktLen)
  845. #define ArpSDumpAddress(_IpAddr, _HwAddr, _String)
  846. #define ArpSDumpIpAddr(_IpAddr, _String)
  847. #define ArpSDumpAtmAddr(_AtmAddr, _String)
  848. #endif
  849. /*
  850. * The following macros deal with on-the-wire integer and long values
  851. *
  852. * On the wire format is big-endian i.e. a long value of 0x01020304 is
  853. * represented as 01 02 03 04. Similarly an int value of 0x0102 is
  854. * represented as 01 02.
  855. *
  856. * The host format is not assumed since it will vary from processor to
  857. * processor.
  858. */
  859. #pragma alloc_text(INIT, DriverEntry)
  860. #pragma alloc_text(INIT, ArpSReadGlobalConfiguration)
  861. #pragma alloc_text(INIT, ArpSInitializeNdis)
  862. #pragma alloc_text(PAGE, ArpSReadArpCache)
  863. #pragma alloc_text(PAGE, ArpSWriteArpCache)
  864. #pragma alloc_text(PAGE, ArpSSleep)
  865. #pragma alloc_text(PAGE, ArpSReqThread)
  866. #pragma alloc_text(PAGE, ArpSTimerThread)
  867. #pragma alloc_text(PAGE, ArpSDispatch)
  868. #pragma alloc_text(PAGE, ArpSLookupEntryByIpAddr)
  869. #pragma alloc_text(PAGE, ArpSLookupEntryByAtmAddr)
  870. #pragma alloc_text(PAGE, ArpSAddArpEntry)
  871. #pragma alloc_text(PAGE, ArpSAddArpEntryFromDisk)
  872. #pragma alloc_text(PAGE, ArpSCreateIntF)
  873. #pragma alloc_text(PAGE, MarsReqThread)
  874. #endif // _PROTOS_