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.

186 lines
9.1 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. mibentry.c
  5. Abstract:
  6. Sample subagent mib structures.
  7. Note:
  8. This file is an example of the output to be produced from the
  9. code generation utility.
  10. --*/
  11. #include <snmp.h>
  12. #include <snmpexts.h>
  13. #include "mibfuncs.h"
  14. #include "mibentry.h"
  15. ///////////////////////////////////////////////////////////////////////////////
  16. // //
  17. // root oid //
  18. // //
  19. ///////////////////////////////////////////////////////////////////////////////
  20. static UINT ids_msipbootp[] = {1,3,6,1,4,1,311,1,12};
  21. ///////////////////////////////////////////////////////////////////////////////
  22. // //
  23. // global group (1.3.6.1.4.1.311.1.12.1) //
  24. // //
  25. ///////////////////////////////////////////////////////////////////////////////
  26. static UINT ids_global[] = {1,0};
  27. static UINT ids_globalLoggingLevel[] = {1,1,0};
  28. static UINT ids_globalMaxRecQueueSize[] = {1,2,0};
  29. static UINT ids_globalServerCount[] = {1,3,0};
  30. static UINT ids_globalBOOTPServerTable[] = {1,4,0};
  31. ///////////////////////////////////////////////////////////////////////////////
  32. // //
  33. // globalBOOTPServerEntry table (1.3.6.1.4.1.311.1.12.1.4.1) //
  34. // //
  35. ///////////////////////////////////////////////////////////////////////////////
  36. static UINT ids_globalBOOTPServerEntry[] = {1,4,1};
  37. static UINT ids_globalBOOTPServerAddr[] = {1,4,1,1};
  38. static UINT ids_globalBOOTPServerTag[] = {1,4,1,2};
  39. ///////////////////////////////////////////////////////////////////////////////
  40. // //
  41. // interface group (1.3.6.1.4.1.311.1.12.2) //
  42. // //
  43. ///////////////////////////////////////////////////////////////////////////////
  44. static UINT ids_interface[] = {2,0};
  45. static UINT ids_ifStatsTable[] = {2,1,0};
  46. static UINT ids_ifConfigTable[] = {2,2,0};
  47. static UINT ids_ifBindingTable[] = {2,3,0};
  48. static UINT ids_ifAddressTable[] = {2,4,0};
  49. ///////////////////////////////////////////////////////////////////////////////
  50. // //
  51. // ifStatsEntry table (1.3.6.1.4.1.311.1.12.2.1.1) //
  52. // //
  53. ///////////////////////////////////////////////////////////////////////////////
  54. static UINT ids_ifStatsEntry[] = {2,1,1};
  55. static UINT ids_ifSEIndex[] = {2,1,1,1};
  56. static UINT ids_ifSEState[] = {2,1,1,2};
  57. static UINT ids_ifSESendFailures[] = {2,1,1,3};
  58. static UINT ids_ifSEReceiveFailures[] = {2,1,1,4};
  59. static UINT ids_ifSEArpUpdateFailures[] = {2,1,1,5};
  60. static UINT ids_ifSERequestReceiveds[] = {2,1,1,6};
  61. static UINT ids_ifSERequestDiscards[] = {2,1,1,7};
  62. static UINT ids_ifSEReplyReceiveds[] = {2,1,1,8};
  63. static UINT ids_ifSEReplyDiscards[] = {2,1,1,9};
  64. ///////////////////////////////////////////////////////////////////////////////
  65. // //
  66. // ifConfigEntry table (1.3.6.1.4.1.311.1.12.2.2.1) //
  67. // //
  68. ///////////////////////////////////////////////////////////////////////////////
  69. static UINT ids_ifConfigEntry[] = {2,2,1};
  70. static UINT ids_ifCEIndex[] = {2,2,1,1};
  71. static UINT ids_ifCEState[] = {2,2,1,2};
  72. static UINT ids_ifCERelayMode[] = {2,2,1,3};
  73. static UINT ids_ifCEMaxHopCount[] = {2,2,1,4};
  74. static UINT ids_ifCEMinSecondsSinceBoot[] = {2,2,1,5};
  75. ///////////////////////////////////////////////////////////////////////////////
  76. // //
  77. // ifBindingEntry table (1.3.6.1.4.1.311.1.12.2.3.1) //
  78. // //
  79. ///////////////////////////////////////////////////////////////////////////////
  80. static UINT ids_ifBindingEntry[] = {2,3,1};
  81. static UINT ids_ifBindingIndex[] = {2,3,1,1};
  82. static UINT ids_ifBindingState[] = {2,3,1,2};
  83. static UINT ids_ifBindingAddrCount[] = {2,3,1,3};
  84. ///////////////////////////////////////////////////////////////////////////////
  85. // //
  86. // ifAddressEntry table (1.3.6.1.4.1.311.1.12.2.4.1) //
  87. // //
  88. ///////////////////////////////////////////////////////////////////////////////
  89. static UINT ids_ifAddressEntry[] = {2,4,1};
  90. static UINT ids_ifAEIfIndex[] = {2,4,1,1};
  91. static UINT ids_ifAEAddress[] = {2,4,1,2};
  92. static UINT ids_ifAEMask[] = {2,4,1,3};
  93. ///////////////////////////////////////////////////////////////////////////////
  94. // //
  95. // Mib entry list //
  96. // //
  97. ///////////////////////////////////////////////////////////////////////////////
  98. SnmpMibEntry mib_msipbootp[] = {
  99. MIB_GROUP(global),
  100. MIB_INTEGER_RW(globalLoggingLevel),
  101. MIB_INTEGER_RW(globalMaxRecQueueSize),
  102. MIB_INTEGER(globalServerCount),
  103. MIB_TABLE_ROOT(globalBOOTPServerTable),
  104. MIB_TABLE_ENTRY(globalBOOTPServerEntry),
  105. MIB_IPADDRESS_RW(globalBOOTPServerAddr),
  106. MIB_INTEGER_RW(globalBOOTPServerTag),
  107. MIB_GROUP(interface),
  108. MIB_TABLE_ROOT(ifStatsTable),
  109. MIB_TABLE_ENTRY(ifStatsEntry),
  110. MIB_INTEGER(ifSEIndex),
  111. MIB_INTEGER(ifSEState),
  112. MIB_COUNTER(ifSESendFailures),
  113. MIB_COUNTER(ifSEReceiveFailures),
  114. MIB_COUNTER(ifSEArpUpdateFailures),
  115. MIB_COUNTER(ifSERequestReceiveds),
  116. MIB_COUNTER(ifSERequestDiscards),
  117. MIB_COUNTER(ifSEReplyReceiveds),
  118. MIB_COUNTER(ifSEReplyDiscards),
  119. MIB_TABLE_ROOT(ifConfigTable),
  120. MIB_TABLE_ENTRY(ifConfigEntry),
  121. MIB_INTEGER(ifCEIndex),
  122. MIB_INTEGER(ifCEState),
  123. MIB_INTEGER_RW(ifCERelayMode),
  124. MIB_INTEGER_RW_L(ifCEMaxHopCount,1,16),
  125. MIB_INTEGER_RW(ifCEMinSecondsSinceBoot),
  126. MIB_TABLE_ROOT(ifBindingTable),
  127. MIB_TABLE_ENTRY(ifBindingEntry),
  128. MIB_INTEGER(ifBindingIndex),
  129. MIB_INTEGER(ifBindingState),
  130. MIB_INTEGER(ifBindingAddrCount),
  131. MIB_TABLE_ROOT(ifAddressTable),
  132. MIB_TABLE_ENTRY(ifAddressEntry),
  133. MIB_INTEGER(ifAEIfIndex),
  134. MIB_IPADDRESS(ifAEAddress),
  135. MIB_IPADDRESS(ifAEMask),
  136. MIB_END()
  137. };
  138. ///////////////////////////////////////////////////////////////////////////////
  139. // //
  140. // Mib entry list //
  141. // //
  142. ///////////////////////////////////////////////////////////////////////////////
  143. SnmpMibTable tbl_msipbootp[] = {
  144. MIB_TABLE(msipbootp,globalBOOTPServerEntry,NULL),
  145. MIB_TABLE(msipbootp,ifStatsEntry,NULL),
  146. MIB_TABLE(msipbootp,ifConfigEntry,NULL),
  147. MIB_TABLE(msipbootp,ifBindingEntry,NULL),
  148. MIB_TABLE(msipbootp,ifAddressEntry,NULL)
  149. };
  150. ///////////////////////////////////////////////////////////////////////////////
  151. // //
  152. // Mib view //
  153. // //
  154. ///////////////////////////////////////////////////////////////////////////////
  155. SnmpMibView v_msipbootp = MIB_VIEW(msipbootp);