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.

181 lines
3.8 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. dummy.c - dummy global vars.
  5. Abstract:
  6. Revision History:
  7. Who When What
  8. -------- -------- ----------------------------------------------
  9. josephj 03-30-98 Created
  10. Notes:
  11. --*/
  12. #include "precomp.h"
  13. #if TESTPROGRAM
  14. ATMARP_GLOBALS DummyAtmArpGlobalInfo;
  15. ATMARP_ADAPTER DummyAtmArpAdapter;
  16. ATMARP_INTERFACE DummyAtmArpInterface0;
  17. ATMARP_INTERFACE DummyAtmArpInterface1;
  18. ATMARP_INTERFACE DummyAtmArpInterface2;
  19. ATMARP_ATM_ENTRY DummyAtmArpAtmEntry0;
  20. ATMARP_ATM_ENTRY DummyAtmArpAtmEntry1;
  21. ATMARP_ATM_ENTRY DummyAtmArpAtmEntry2;
  22. ATMARP_IP_ENTRY DummyAtmArpIpEntry0;
  23. ATMARP_IP_ENTRY DummyAtmArpIpEntry1;
  24. ATMARP_IP_ENTRY DummyAtmArpIpEntry2;
  25. ATMARP_VC DummyAtmArpVc0;
  26. ATMARP_VC DummyAtmArpVc1;
  27. ATMARP_VC DummyAtmArpVc2;
  28. NDIS_PROTOCOL_CHARACTERISTICS DummyAtmArpProtocolCharacteristics;
  29. NDIS_CLIENT_CHARACTERISTICS DummyAtmArpClientCharacteristics;
  30. void *pvDummyAtmArpGlobalInfo = &DummyAtmArpGlobalInfo;
  31. void *pvDummyAtmArpProtocolCharacteristics =&DummyAtmArpProtocolCharacteristics;
  32. void *pvDummyAtmArpClientCharacteristics = &DummyAtmArpClientCharacteristics;
  33. void
  34. init_ATMARP_INTERFACE(ATMARP_INTERFACE *pI, ATMARP_INTERFACE *pNext);
  35. void
  36. init_ATMARP_ADAPTER(ATMARP_ADAPTER *pA, ATMARP_ADAPTER *pNext);
  37. void
  38. init_ATMARP_GLOBALS(ATMARP_GLOBALS *pG);
  39. void
  40. init_ATMARP_ATM_ENTRY(ATMARP_ATM_ENTRY *pAE, ATMARP_ATM_ENTRY *pNext);
  41. void
  42. init_ATMARP_IP_ENTRY(ATMARP_IP_ENTRY *pIP, ATMARP_IP_ENTRY *pNext);
  43. void
  44. init_ATMARP_VC(ATMARP_VC *pVC, ATMARP_VC *pNext);
  45. void setup_dummy_vars(void)
  46. {
  47. //
  48. // Set up dummy list of VCs
  49. //
  50. init_ATMARP_VC(&DummyAtmArpVc0, &DummyAtmArpVc1);
  51. init_ATMARP_VC(&DummyAtmArpVc1, &DummyAtmArpVc2);
  52. init_ATMARP_VC(&DummyAtmArpVc2, NULL);
  53. // Set up dummy list of IP entries..
  54. //
  55. init_ATMARP_IP_ENTRY(&DummyAtmArpIpEntry0, &DummyAtmArpIpEntry1);
  56. init_ATMARP_IP_ENTRY(&DummyAtmArpIpEntry1, &DummyAtmArpIpEntry2);
  57. init_ATMARP_IP_ENTRY(&DummyAtmArpIpEntry2, NULL);
  58. //
  59. // Set up dummy list of atm entries..
  60. //
  61. init_ATMARP_ATM_ENTRY(&DummyAtmArpAtmEntry0, &DummyAtmArpAtmEntry1);
  62. init_ATMARP_ATM_ENTRY(&DummyAtmArpAtmEntry1, &DummyAtmArpAtmEntry2);
  63. init_ATMARP_ATM_ENTRY(&DummyAtmArpAtmEntry2, NULL);
  64. //
  65. // Set up dummy list of interfaces..
  66. //
  67. init_ATMARP_INTERFACE(&DummyAtmArpInterface0, &DummyAtmArpInterface1);
  68. init_ATMARP_INTERFACE(&DummyAtmArpInterface1, &DummyAtmArpInterface2);
  69. init_ATMARP_INTERFACE(&DummyAtmArpInterface2, NULL);
  70. //
  71. // Set up dummy adapter structure.
  72. //
  73. init_ATMARP_ADAPTER(&DummyAtmArpAdapter, NULL);
  74. //
  75. // Set up dummy gobal info structure.
  76. //
  77. init_ATMARP_GLOBALS(&DummyAtmArpGlobalInfo);
  78. }
  79. void
  80. init_ATMARP_INTERFACE(ATMARP_INTERFACE *pI, ATMARP_INTERFACE *pNext)
  81. {
  82. #if DBG
  83. pI->aai_sig = aai_signature;
  84. #endif // DBG
  85. pI->pNextInterface = pNext;
  86. pI->pAtmEntryList = &DummyAtmArpAtmEntry0;
  87. }
  88. void
  89. init_ATMARP_ADAPTER(ATMARP_ADAPTER *pA, ATMARP_ADAPTER *pNext)
  90. {
  91. #if DBG
  92. pA->aaa_sig = aaa_signature;
  93. #endif
  94. pA->pNextAdapter = pNext;
  95. pA->pInterfaceList = &DummyAtmArpInterface0;
  96. pA->InterfaceCount = 3;
  97. }
  98. void
  99. init_ATMARP_GLOBALS(ATMARP_GLOBALS *pG)
  100. {
  101. #if DBG
  102. pG->aag_sig = aag_signature;
  103. #endif
  104. pG->pAdapterList = &DummyAtmArpAdapter;
  105. pG->AdapterCount = 1;
  106. }
  107. void
  108. init_ATMARP_ATM_ENTRY(ATMARP_ATM_ENTRY *pAE, ATMARP_ATM_ENTRY *pNext)
  109. {
  110. #if DBG
  111. pAE->aae_sig = aae_signature;
  112. #endif // DBG
  113. pAE->pNext = pNext;
  114. pAE->pIpEntryList = &DummyAtmArpIpEntry0;
  115. pAE->pVcList = &DummyAtmArpVc0;
  116. pAE->Flags = AA_ATM_ENTRY_CLOSING;
  117. }
  118. void
  119. init_ATMARP_IP_ENTRY(ATMARP_IP_ENTRY *pIP, ATMARP_IP_ENTRY *pNext)
  120. {
  121. #if DBG
  122. pIP->aip_sig = aip_signature;
  123. #endif // DBG
  124. pIP->pNextToAtm = pNext;
  125. pIP->Flags = AA_IP_ENTRY_ADDR_TYPE_NUCAST| AA_IP_ENTRY_MC_REVALIDATING;
  126. }
  127. void
  128. init_ATMARP_VC(ATMARP_VC *pVC, ATMARP_VC *pNext)
  129. {
  130. #if DBG
  131. pVC->avc_sig = avc_signature;
  132. #endif // DBG
  133. pVC->pNextVc = pNext;
  134. }
  135. #endif // TESTPROGRAM