Leaked source code of windows server 2003
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.

186 lines
3.2 KiB

  1. //
  2. // Copyright (c) 1998-1999, Microsoft Corporation, all rights reserved
  3. //
  4. // mp.h
  5. //
  6. // IEEE1394 mini-port/call-manager driver
  7. //
  8. // Broadcast Channel Manager - header file
  9. //
  10. // 07/05/99 ADube - Created - Declaration for miniport routines
  11. //
  12. //
  13. // Various timeout used throught the BCM algorithm
  14. //
  15. #define ONE_SEC 1000000
  16. #define ONE_MINUTE 60000
  17. #define FIFTY_MILLISECONDS 50000
  18. #define BCM_NUM_RETRY 5
  19. //
  20. // BCR Register flags in the BigEndian and little Endian format
  21. //
  22. #define BCR_IMPLEMENTED_BIG_ENDIAN 0x00000080
  23. #define BCR_IMPLEMENTED_LITTLE_ENDIAN 0x80000000
  24. #define BCR_VALID_BIG_ENDIAN 0x000000C0
  25. #define BCR_VALID_LITTLE_ENDIAN 0xC0000000
  26. typedef struct _BCM_CONTEXT
  27. {
  28. ULONG Generation;
  29. PADAPTERCB pAdapter;
  30. }BCM_CONTEXT, *PBCM_CONTEXT;
  31. //
  32. // Broadcast Channel Manager functions begin here
  33. //
  34. VOID
  35. nicBCRAccessedCallback (
  36. IN PNOTIFICATION_INFO pNotificationInfo
  37. );
  38. VOID
  39. nicBCMAbort (
  40. IN PADAPTERCB pAdapter,
  41. IN PREMOTE_NODE pRemoteNode
  42. );
  43. VOID
  44. nicBCMAddRemoteNode (
  45. IN PADAPTERCB pAdapter,
  46. IN BOOLEAN fIsOnlyRemoteNode
  47. );
  48. VOID
  49. nicBCMAlgorithm(
  50. PADAPTERCB pAdapter,
  51. ULONG BcmGeneration
  52. );
  53. VOID
  54. nicBCMAlgorithmWorkItem(
  55. PNDIS_WORK_ITEM pWorkItem,
  56. PVOID Context
  57. );
  58. VOID
  59. nicBCMCheckLastNodeRemoved(
  60. IN PADAPTERCB pAdapter
  61. );
  62. NDIS_STATUS
  63. nicFindIrmAmongRemoteNodes (
  64. IN PADAPTERCB pAdapter,
  65. IN ULONG BCMGeneration,
  66. OUT PPREMOTE_NODE ppIrmRemoteNode
  67. );
  68. VOID
  69. nicFreeBroadcastChannelRegister(
  70. IN PADAPTERCB pAdapter
  71. );
  72. NDIS_STATUS
  73. nicInformAllRemoteNodesOfBCM (
  74. IN PADAPTERCB pAdapter
  75. );
  76. NDIS_STATUS
  77. nicInitializeBroadcastChannelRegister (
  78. PADAPTERCB pAdapter
  79. );
  80. NDIS_STATUS
  81. nicIsLocalHostTheIrm(
  82. IN PADAPTERCB pAdapter,
  83. OUT PBOOLEAN pfIsLocalHostIrm,
  84. OUT PPTOPOLOGY_MAP ppTopologyMap,
  85. OUT PNODE_ADDRESS pLocalHostAddress
  86. );
  87. NDIS_STATUS
  88. nicLocalHostIsIrm(
  89. IN PADAPTERCB pAdapter
  90. );
  91. NDIS_STATUS
  92. nicLocalHostIsNotIrm (
  93. IN PADAPTERCB pAdapter,
  94. IN ULONG CurrentGeneration
  95. );
  96. NDIS_STATUS
  97. nicLocalNotIrmMandatoryWait (
  98. IN PADAPTERCB pAdapter,
  99. IN ULONG BCMGeneration,
  100. OUT NETWORK_CHANNELSR* pBCR
  101. );
  102. NDIS_STATUS
  103. nicReadIrmBcr (
  104. PREMOTE_NODE pIrmRemoteNode,
  105. IN PMDL pBCRMdl,
  106. IN ULONG GivenGeneration,
  107. OUT PBOOLEAN fDidTheBusReset
  108. );
  109. NDIS_STATUS
  110. nicRetryToReadIrmBcr(
  111. PREMOTE_NODE pIrmRemoteNode,
  112. PMDL pRemoteBCRMdl,
  113. ULONG Generation,
  114. PBOOLEAN pfDidTheBusReset
  115. );
  116. NDIS_STATUS
  117. nicScheduleBCMWorkItem(
  118. PADAPTERCB pAdapter
  119. );
  120. VOID
  121. nicSetEventMakeCall (
  122. IN PADAPTERCB pAdapter
  123. );
  124. VOID
  125. nicLocalHostIsNotIrmPost (
  126. PADAPTERCB pAdapter,
  127. PREMOTE_NODE pIrmRemoteNode,
  128. BOOLEAN fNeedToReset,
  129. BOOLEAN fRemoteNodeBCRIsValid ,
  130. BOOLEAN fLocalHostBCRIsValid ,
  131. BOOLEAN fDidTheBusReset,
  132. NETWORK_CHANNELSR* pBCR
  133. );