snmp 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (295) hide show
  1. data/README.rdoc +179 -0
  2. data/Rakefile +34 -39
  3. data/data/ruby/snmp/mibs/ACCOUNTING-CONTROL-MIB.yaml +33 -32
  4. data/data/ruby/snmp/mibs/ADSL-LINE-EXT-MIB.yaml +57 -56
  5. data/data/ruby/snmp/mibs/ADSL-LINE-MIB.yaml +224 -223
  6. data/data/ruby/snmp/mibs/ADSL-TC-MIB.yaml +1 -0
  7. data/data/ruby/snmp/mibs/ADSL2-LINE-MIB.yaml +321 -0
  8. data/data/ruby/snmp/mibs/ADSL2-LINE-TC-MIB.yaml +3 -0
  9. data/data/ruby/snmp/mibs/AGENTX-MIB.yaml +25 -24
  10. data/data/ruby/snmp/mibs/AGGREGATE-MIB.yaml +28 -0
  11. data/data/ruby/snmp/mibs/ALARM-MIB.yaml +77 -0
  12. data/data/ruby/snmp/mibs/APM-MIB.yaml +75 -74
  13. data/data/ruby/snmp/mibs/APPC-MIB.yaml +261 -260
  14. data/data/ruby/snmp/mibs/APPLETALK-MIB.yaml +255 -254
  15. data/data/ruby/snmp/mibs/APPLICATION-MIB.yaml +138 -137
  16. data/data/ruby/snmp/mibs/APPN-DLUR-MIB.yaml +30 -29
  17. data/data/ruby/snmp/mibs/APPN-MIB.yaml +325 -324
  18. data/data/ruby/snmp/mibs/APPN-TRAP-MIB.yaml +10 -9
  19. data/data/ruby/snmp/mibs/APS-MIB.yaml +50 -49
  20. data/data/ruby/snmp/mibs/ARC-MIB.yaml +19 -0
  21. data/data/ruby/snmp/mibs/ATM-ACCOUNTING-INFORMATION-MIB.yaml +22 -21
  22. data/data/ruby/snmp/mibs/ATM-MIB.yaml +94 -93
  23. data/data/ruby/snmp/mibs/ATM-TC-MIB.yaml +12 -11
  24. data/data/ruby/snmp/mibs/ATM2-MIB.yaml +156 -155
  25. data/data/ruby/snmp/mibs/BGP4-MIB.yaml +48 -41
  26. data/data/ruby/snmp/mibs/BLDG-HVAC-MIB.yaml +25 -24
  27. data/data/ruby/snmp/mibs/BRIDGE-MIB.yaml +50 -44
  28. data/data/ruby/snmp/mibs/CHARACTER-MIB.yaml +35 -34
  29. data/data/ruby/snmp/mibs/CIRCUIT-IF-MIB.yaml +13 -12
  30. data/data/ruby/snmp/mibs/CLNS-MIB.yaml +98 -97
  31. data/data/ruby/snmp/mibs/COFFEE-POT-MIB.yaml +8 -7
  32. data/data/ruby/snmp/mibs/COPS-CLIENT-MIB.yaml +38 -37
  33. data/data/ruby/snmp/mibs/DECNET-PHIV-MIB.yaml +209 -208
  34. data/data/ruby/snmp/mibs/DIAL-CONTROL-MIB.yaml +72 -71
  35. data/data/ruby/snmp/mibs/DIFFSERV-CONFIG-MIB.yaml +11 -10
  36. data/data/ruby/snmp/mibs/DIFFSERV-DSCP-TC.yaml +1 -0
  37. data/data/ruby/snmp/mibs/DIFFSERV-MIB.yaml +151 -150
  38. data/data/ruby/snmp/mibs/DIRECTORY-SERVER-MIB.yaml +35 -34
  39. data/data/ruby/snmp/mibs/DISMAN-EVENT-MIB.yaml +95 -94
  40. data/data/ruby/snmp/mibs/DISMAN-EXPRESSION-MIB.yaml +37 -36
  41. data/data/ruby/snmp/mibs/DISMAN-NSLOOKUP-MIB.yaml +15 -14
  42. data/data/ruby/snmp/mibs/DISMAN-PING-MIB.yaml +43 -42
  43. data/data/ruby/snmp/mibs/DISMAN-SCHEDULE-MIB.yaml +22 -21
  44. data/data/ruby/snmp/mibs/DISMAN-SCRIPT-MIB.yaml +64 -63
  45. data/data/ruby/snmp/mibs/DISMAN-TRACEROUTE-MIB.yaml +59 -58
  46. data/data/ruby/snmp/mibs/DLSW-MIB.yaml +172 -171
  47. data/data/ruby/snmp/mibs/DNS-RESOLVER-MIB.yaml +70 -69
  48. data/data/ruby/snmp/mibs/DNS-SERVER-MIB.yaml +57 -56
  49. data/data/ruby/snmp/mibs/DOCS-BPI-MIB.yaml +81 -80
  50. data/data/ruby/snmp/mibs/DOCS-CABLE-DEVICE-MIB.yaml +114 -89
  51. data/data/ruby/snmp/mibs/DOCS-IETF-BPI2-MIB.yaml +187 -0
  52. data/data/ruby/snmp/mibs/DOCS-IETF-CABLE-DEVICE-NOTIFICATION-MIB.yaml +39 -0
  53. data/data/ruby/snmp/mibs/DOCS-IETF-QOS-MIB.yaml +166 -0
  54. data/data/ruby/snmp/mibs/DOCS-IETF-SUBMGT-MIB.yaml +32 -0
  55. data/data/ruby/snmp/mibs/DOCS-IF-MIB.yaml +208 -119
  56. data/data/ruby/snmp/mibs/DOT12-IF-MIB.yaml +21 -20
  57. data/data/ruby/snmp/mibs/DOT3-EPON-MIB.yaml +101 -0
  58. data/data/ruby/snmp/mibs/DOT3-OAM-MIB.yaml +82 -0
  59. data/data/ruby/snmp/mibs/DS0-MIB.yaml +11 -10
  60. data/data/ruby/snmp/mibs/DS0BUNDLE-MIB.yaml +9 -8
  61. data/data/ruby/snmp/mibs/DS1-MIB.yaml +102 -98
  62. data/data/ruby/snmp/mibs/DS3-MIB.yaml +84 -83
  63. data/data/ruby/snmp/mibs/DSA-MIB.yaml +31 -30
  64. data/data/ruby/snmp/mibs/DSMON-MIB.yaml +193 -192
  65. data/data/ruby/snmp/mibs/EBN-MIB.yaml +32 -31
  66. data/data/ruby/snmp/mibs/EFM-CU-MIB.yaml +113 -0
  67. data/data/ruby/snmp/mibs/ENTITY-MIB.yaml +41 -38
  68. data/data/ruby/snmp/mibs/ENTITY-SENSOR-MIB.yaml +8 -7
  69. data/data/ruby/snmp/mibs/ENTITY-STATE-MIB.yaml +18 -0
  70. data/data/ruby/snmp/mibs/ENTITY-STATE-TC-MIB.yaml +3 -0
  71. data/data/ruby/snmp/mibs/ETHER-CHIPSET-MIB.yaml +61 -60
  72. data/data/ruby/snmp/mibs/ETHER-WIS.yaml +16 -15
  73. data/data/ruby/snmp/mibs/EtherLike-MIB.yaml +43 -42
  74. data/data/ruby/snmp/mibs/FC-MGMT-MIB.yaml +154 -0
  75. data/data/ruby/snmp/mibs/FCIP-MGMT-MIB.yaml +68 -0
  76. data/data/ruby/snmp/mibs/FDDI-SMT73-MIB.yaml +107 -106
  77. data/data/ruby/snmp/mibs/FIBRE-CHANNEL-FE-MIB.yaml +100 -99
  78. data/data/ruby/snmp/mibs/FLOW-METER-MIB.yaml +92 -91
  79. data/data/ruby/snmp/mibs/FR-ATM-PVC-SERVICE-IWF-MIB.yaml +33 -32
  80. data/data/ruby/snmp/mibs/FR-MFR-MIB.yaml +38 -37
  81. data/data/ruby/snmp/mibs/FRAME-RELAY-DTE-MIB.yaml +41 -40
  82. data/data/ruby/snmp/mibs/FRNETSERV-MIB.yaml +92 -91
  83. data/data/ruby/snmp/mibs/FRSLD-MIB.yaml +66 -65
  84. data/data/ruby/snmp/mibs/Finisher-MIB.yaml +38 -37
  85. data/data/ruby/snmp/mibs/GMPLS-LABEL-STD-MIB.yaml +27 -0
  86. data/data/ruby/snmp/mibs/GMPLS-LSR-STD-MIB.yaml +20 -0
  87. data/data/ruby/snmp/mibs/GMPLS-TC-STD-MIB.yaml +3 -0
  88. data/data/ruby/snmp/mibs/GMPLS-TE-STD-MIB.yaml +72 -0
  89. data/data/ruby/snmp/mibs/GSMP-MIB.yaml +75 -74
  90. data/data/ruby/snmp/mibs/HC-ALARM-MIB.yaml +26 -25
  91. data/data/ruby/snmp/mibs/HC-PerfHist-TC-MIB.yaml +1 -0
  92. data/data/ruby/snmp/mibs/HC-RMON-MIB.yaml +164 -163
  93. data/data/ruby/snmp/mibs/HCNUM-TC.yaml +1 -0
  94. data/data/ruby/snmp/mibs/HDSL2-SHDSL-LINE-MIB.yaml +117 -112
  95. data/data/ruby/snmp/mibs/HOST-RESOURCES-MIB.yaml +82 -81
  96. data/data/ruby/snmp/mibs/HOST-RESOURCES-TYPES.yaml +40 -39
  97. data/data/ruby/snmp/mibs/HPR-IP-MIB.yaml +17 -16
  98. data/data/ruby/snmp/mibs/HPR-MIB.yaml +64 -63
  99. data/data/ruby/snmp/mibs/IANA-ITU-ALARM-TC-MIB.yaml +3 -0
  100. data/data/ruby/snmp/mibs/IF-CAP-STACK-MIB.yaml +13 -0
  101. data/data/ruby/snmp/mibs/IF-INVERTED-STACK-MIB.yaml +6 -5
  102. data/data/ruby/snmp/mibs/IF-MIB.yaml +57 -56
  103. data/data/ruby/snmp/mibs/IFCP-MGMT-MIB.yaml +65 -0
  104. data/data/ruby/snmp/mibs/IGMP-STD-MIB.yaml +24 -23
  105. data/data/ruby/snmp/mibs/INET-ADDRESS-MIB.yaml +1 -0
  106. data/data/ruby/snmp/mibs/INTEGRATED-SERVICES-GUARANTEED-MIB.yaml +6 -5
  107. data/data/ruby/snmp/mibs/INTEGRATED-SERVICES-MIB.yaml +29 -28
  108. data/data/ruby/snmp/mibs/INTERFACETOPN-MIB.yaml +21 -20
  109. data/data/ruby/snmp/mibs/IP-FORWARD-MIB.yaml +49 -27
  110. data/data/ruby/snmp/mibs/IP-MIB.yaml +243 -40
  111. data/data/ruby/snmp/mibs/IPATM-IPMC-MIB.yaml +179 -178
  112. data/data/ruby/snmp/mibs/IPMCAST-MIB.yaml +105 -0
  113. data/data/ruby/snmp/mibs/IPMROUTE-STD-MIB.yaml +49 -48
  114. data/data/ruby/snmp/mibs/IPOA-MIB.yaml +74 -73
  115. data/data/ruby/snmp/mibs/IPS-AUTH-MIB.yaml +68 -0
  116. data/data/ruby/snmp/mibs/IPSEC-SPD-MIB.yaml +121 -0
  117. data/data/ruby/snmp/mibs/IPV6-FLOW-LABEL-MIB.yaml +1 -0
  118. data/data/ruby/snmp/mibs/IPV6-ICMP-MIB.yaml +27 -26
  119. data/data/ruby/snmp/mibs/IPV6-MIB.yaml +70 -69
  120. data/data/ruby/snmp/mibs/IPV6-MLD-MIB.yaml +18 -17
  121. data/data/ruby/snmp/mibs/IPV6-TCP-MIB.yaml +7 -6
  122. data/data/ruby/snmp/mibs/IPV6-UDP-MIB.yaml +6 -5
  123. data/data/ruby/snmp/mibs/ISCSI-MIB.yaml +199 -0
  124. data/data/ruby/snmp/mibs/ISDN-MIB.yaml +57 -56
  125. data/data/ruby/snmp/mibs/ISIS-MIB.yaml +247 -0
  126. data/data/ruby/snmp/mibs/ISNS-MIB.yaml +179 -0
  127. data/data/ruby/snmp/mibs/ITU-ALARM-MIB.yaml +34 -0
  128. data/data/ruby/snmp/mibs/ITU-ALARM-TC-MIB.yaml +3 -0
  129. data/data/ruby/snmp/mibs/Job-Monitoring-MIB.yaml +26 -27
  130. data/data/ruby/snmp/mibs/L2TP-MIB.yaml +138 -137
  131. data/data/ruby/snmp/mibs/LANGTAG-TC-MIB.yaml +3 -0
  132. data/data/ruby/snmp/mibs/LMP-MIB.yaml +202 -0
  133. data/data/ruby/snmp/mibs/MALLOC-MIB.yaml +66 -65
  134. data/data/ruby/snmp/mibs/MAU-MIB.yaml +55 -95
  135. data/data/ruby/snmp/mibs/MIDCOM-MIB.yaml +83 -0
  136. data/data/ruby/snmp/mibs/MIOX25-MIB.yaml +28 -27
  137. data/data/ruby/snmp/mibs/MIP-MIB.yaml +157 -156
  138. data/data/ruby/snmp/mibs/MOBILEIPV6-MIB.yaml +189 -0
  139. data/data/ruby/snmp/mibs/MPLS-FTN-STD-MIB.yaml +29 -28
  140. data/data/ruby/snmp/mibs/MPLS-L3VPN-STD-MIB.yaml +88 -0
  141. data/data/ruby/snmp/mibs/MPLS-LC-ATM-STD-MIB.yaml +19 -0
  142. data/data/ruby/snmp/mibs/MPLS-LC-FR-STD-MIB.yaml +16 -0
  143. data/data/ruby/snmp/mibs/MPLS-LDP-ATM-STD-MIB.yaml +23 -22
  144. data/data/ruby/snmp/mibs/MPLS-LDP-FRAME-RELAY-STD-MIB.yaml +17 -16
  145. data/data/ruby/snmp/mibs/MPLS-LDP-GENERIC-STD-MIB.yaml +9 -8
  146. data/data/ruby/snmp/mibs/MPLS-LDP-STD-MIB.yaml +103 -102
  147. data/data/ruby/snmp/mibs/MPLS-LSR-STD-MIB.yaml +85 -84
  148. data/data/ruby/snmp/mibs/MPLS-TC-STD-MIB.yaml +1 -0
  149. data/data/ruby/snmp/mibs/MPLS-TE-STD-MIB.yaml +106 -105
  150. data/data/ruby/snmp/mibs/MSDP-MIB.yaml +71 -0
  151. data/data/ruby/snmp/mibs/MTA-MIB.yaml +42 -41
  152. data/data/ruby/snmp/mibs/Modem-MIB.yaml +87 -86
  153. data/data/ruby/snmp/mibs/NAT-MIB.yaml +116 -0
  154. data/data/ruby/snmp/mibs/NETWORK-SERVICES-MIB.yaml +18 -17
  155. data/data/ruby/snmp/mibs/NHRP-MIB.yaml +140 -139
  156. data/data/ruby/snmp/mibs/NOTIFICATION-LOG-MIB.yaml +37 -36
  157. data/data/ruby/snmp/mibs/OPT-IF-MIB.yaml +394 -393
  158. data/data/ruby/snmp/mibs/OSPF-MIB.yaml +192 -123
  159. data/data/ruby/snmp/mibs/OSPF-TRAP-MIB.yaml +24 -19
  160. data/data/ruby/snmp/mibs/P-BRIDGE-MIB.yaml +37 -35
  161. data/data/ruby/snmp/mibs/PARALLEL-MIB.yaml +16 -15
  162. data/data/ruby/snmp/mibs/PIM-MIB.yaml +47 -46
  163. data/data/ruby/snmp/mibs/PIM-STD-MIB.yaml +235 -0
  164. data/data/ruby/snmp/mibs/PINT-MIB.yaml +38 -37
  165. data/data/ruby/snmp/mibs/PKTC-IETF-MTA-MIB.yaml +81 -0
  166. data/data/ruby/snmp/mibs/PKTC-IETF-SIG-MIB.yaml +128 -0
  167. data/data/ruby/snmp/mibs/POLICY-BASED-MANAGEMENT-MIB.yaml +94 -0
  168. data/data/ruby/snmp/mibs/POWER-ETHERNET-MIB.yaml +27 -26
  169. data/data/ruby/snmp/mibs/PPP-BRIDGE-NCP-MIB.yaml +16 -15
  170. data/data/ruby/snmp/mibs/PPP-IP-NCP-MIB.yaml +7 -6
  171. data/data/ruby/snmp/mibs/PPP-LCP-MIB.yaml +33 -32
  172. data/data/ruby/snmp/mibs/PPP-SEC-MIB.yaml +13 -12
  173. data/data/ruby/snmp/mibs/PTOPO-MIB.yaml +29 -28
  174. data/data/ruby/snmp/mibs/PerfHist-TC-MIB.yaml +1 -0
  175. data/data/ruby/snmp/mibs/Printer-MIB.yaml +185 -184
  176. data/data/ruby/snmp/mibs/Q-BRIDGE-MIB.yaml +96 -82
  177. data/data/ruby/snmp/mibs/RADIUS-ACC-CLIENT-MIB.yaml +34 -16
  178. data/data/ruby/snmp/mibs/RADIUS-ACC-SERVER-MIB.yaml +40 -24
  179. data/data/ruby/snmp/mibs/RADIUS-AUTH-CLIENT-MIB.yaml +38 -18
  180. data/data/ruby/snmp/mibs/RADIUS-AUTH-SERVER-MIB.yaml +40 -23
  181. data/data/ruby/snmp/mibs/RADIUS-DYNAUTH-CLIENT-MIB.yaml +44 -0
  182. data/data/ruby/snmp/mibs/RADIUS-DYNAUTH-SERVER-MIB.yaml +40 -0
  183. data/data/ruby/snmp/mibs/RAQMON-MIB.yaml +90 -0
  184. data/data/ruby/snmp/mibs/RDBMS-MIB.yaml +69 -68
  185. data/data/ruby/snmp/mibs/RFC1065-SMI.yaml +4 -5
  186. data/data/ruby/snmp/mibs/RFC1155-SMI.yaml +4 -5
  187. data/data/ruby/snmp/mibs/RFC1158-MIB.yaml +174 -173
  188. data/data/ruby/snmp/mibs/RFC1213-MIB.yaml +173 -172
  189. data/data/ruby/snmp/mibs/RFC1269-MIB.yaml +20 -19
  190. data/data/ruby/snmp/mibs/RFC1271-MIB.yaml +185 -184
  191. data/data/ruby/snmp/mibs/RFC1285-MIB.yaml +85 -84
  192. data/data/ruby/snmp/mibs/RFC1316-MIB.yaml +30 -29
  193. data/data/ruby/snmp/mibs/RFC1381-MIB.yaml +40 -39
  194. data/data/ruby/snmp/mibs/RFC1382-MIB.yaml +149 -148
  195. data/data/ruby/snmp/mibs/RFC1414-MIB.yaml +4 -3
  196. data/data/ruby/snmp/mibs/RIPv2-MIB.yaml +25 -24
  197. data/data/ruby/snmp/mibs/RMON-MIB.yaml +192 -191
  198. data/data/ruby/snmp/mibs/RMON2-MIB.yaml +253 -252
  199. data/data/ruby/snmp/mibs/ROHC-MIB.yaml +49 -48
  200. data/data/ruby/snmp/mibs/ROHC-RTP-MIB.yaml +19 -18
  201. data/data/ruby/snmp/mibs/ROHC-UNCOMPRESSED-MIB.yaml +6 -5
  202. data/data/ruby/snmp/mibs/RS-232-MIB.yaml +36 -35
  203. data/data/ruby/snmp/mibs/RSTP-MIB.yaml +18 -0
  204. data/data/ruby/snmp/mibs/RSVP-MIB.yaml +137 -136
  205. data/data/ruby/snmp/mibs/RTP-MIB.yaml +42 -41
  206. data/data/ruby/snmp/mibs/SCSI-MIB.yaml +160 -0
  207. data/data/ruby/snmp/mibs/SCTP-MIB.yaml +83 -0
  208. data/data/ruby/snmp/mibs/SFLOW-MIB.yaml +15 -14
  209. data/data/ruby/snmp/mibs/SIP-COMMON-MIB.yaml +112 -0
  210. data/data/ruby/snmp/mibs/SIP-MIB.yaml +56 -55
  211. data/data/ruby/snmp/mibs/SIP-SERVER-MIB.yaml +52 -0
  212. data/data/ruby/snmp/mibs/SIP-TC-MIB.yaml +3 -0
  213. data/data/ruby/snmp/mibs/SIP-UA-MIB.yaml +14 -0
  214. data/data/ruby/snmp/mibs/SLAPM-MIB.yaml +134 -133
  215. data/data/ruby/snmp/mibs/SMON-MIB.yaml +47 -46
  216. data/data/ruby/snmp/mibs/SNA-NAU-MIB.yaml +117 -116
  217. data/data/ruby/snmp/mibs/SNA-SDLC-MIB.yaml +126 -125
  218. data/data/ruby/snmp/mibs/SNMP-COMMUNITY-MIB.yaml +12 -11
  219. data/data/ruby/snmp/mibs/SNMP-FRAMEWORK-MIB.yaml +8 -7
  220. data/data/ruby/snmp/mibs/SNMP-MPD-MIB.yaml +6 -5
  221. data/data/ruby/snmp/mibs/SNMP-NOTIFICATION-MIB.yaml +16 -15
  222. data/data/ruby/snmp/mibs/SNMP-PROXY-MIB.yaml +10 -9
  223. data/data/ruby/snmp/mibs/SNMP-REPEATER-MIB.yaml +120 -119
  224. data/data/ruby/snmp/mibs/SNMP-TARGET-MIB.yaml +19 -18
  225. data/data/ruby/snmp/mibs/SNMP-USER-BASED-SM-MIB.yaml +26 -25
  226. data/data/ruby/snmp/mibs/SNMP-USM-AES-MIB.yaml +4 -0
  227. data/data/ruby/snmp/mibs/SNMP-USM-DH-OBJECTS-MIB.yaml +10 -9
  228. data/data/ruby/snmp/mibs/SNMP-VIEW-BASED-ACM-MIB.yaml +26 -25
  229. data/data/ruby/snmp/mibs/SNMPv2-MIB.yaml +46 -45
  230. data/data/ruby/snmp/mibs/SNMPv2-SMI.yaml +12 -11
  231. data/data/ruby/snmp/mibs/SNMPv2-TM.yaml +5 -4
  232. data/data/ruby/snmp/mibs/SNMPv2-USEC-MIB.yaml +10 -9
  233. data/data/ruby/snmp/mibs/SONET-MIB.yaml +110 -109
  234. data/data/ruby/snmp/mibs/SOURCE-ROUTING-MIB.yaml +18 -17
  235. data/data/ruby/snmp/mibs/SSPM-MIB.yaml +67 -0
  236. data/data/ruby/snmp/mibs/SYSAPPL-MIB.yaml +65 -64
  237. data/data/ruby/snmp/mibs/T11-FC-FABRIC-ADDR-MGR-MIB.yaml +63 -0
  238. data/data/ruby/snmp/mibs/T11-FC-FABRIC-CONFIG-SERVER-MIB.yaml +100 -0
  239. data/data/ruby/snmp/mibs/T11-FC-FABRIC-LOCK-MIB.yaml +22 -0
  240. data/data/ruby/snmp/mibs/T11-FC-FSPF-MIB.yaml +70 -0
  241. data/data/ruby/snmp/mibs/T11-FC-NAME-SERVER-MIB.yaml +56 -0
  242. data/data/ruby/snmp/mibs/T11-FC-ROUTE-MIB.yaml +27 -0
  243. data/data/ruby/snmp/mibs/T11-FC-RSCN-MIB.yaml +47 -0
  244. data/data/ruby/snmp/mibs/T11-FC-VIRTUAL-FABRIC-MIB.yaml +31 -0
  245. data/data/ruby/snmp/mibs/T11-FC-ZONE-SERVER-MIB.yaml +124 -0
  246. data/data/ruby/snmp/mibs/T11-TC-MIB.yaml +3 -0
  247. data/data/ruby/snmp/mibs/TCP-ESTATS-MIB.yaml +167 -0
  248. data/data/ruby/snmp/mibs/TCP-MIB.yaml +37 -18
  249. data/data/ruby/snmp/mibs/TCPIPX-MIB.yaml +16 -15
  250. data/data/ruby/snmp/mibs/TE-LINK-STD-MIB.yaml +82 -0
  251. data/data/ruby/snmp/mibs/TE-MIB.yaml +81 -0
  252. data/data/ruby/snmp/mibs/TIME-AGGREGATE-MIB.yaml +22 -0
  253. data/data/ruby/snmp/mibs/TN3270E-MIB.yaml +85 -84
  254. data/data/ruby/snmp/mibs/TN3270E-RT-MIB.yaml +33 -32
  255. data/data/ruby/snmp/mibs/TOKEN-RING-RMON-MIB.yaml +159 -158
  256. data/data/ruby/snmp/mibs/TOKENRING-MIB.yaml +42 -41
  257. data/data/ruby/snmp/mibs/TOKENRING-STATION-SR-MIB.yaml +8 -7
  258. data/data/ruby/snmp/mibs/TRANSPORT-ADDRESS-MIB.yaml +13 -12
  259. data/data/ruby/snmp/mibs/TRIP-MIB.yaml +118 -0
  260. data/data/ruby/snmp/mibs/TRIP-TC-MIB.yaml +3 -0
  261. data/data/ruby/snmp/mibs/TUNNEL-MIB.yaml +29 -13
  262. data/data/ruby/snmp/mibs/UDP-MIB.yaml +19 -6
  263. data/data/ruby/snmp/mibs/UDPLITE-MIB.yaml +26 -0
  264. data/data/ruby/snmp/mibs/UPS-MIB.yaml +100 -99
  265. data/data/ruby/snmp/mibs/URI-TC-MIB.yaml +3 -0
  266. data/data/ruby/snmp/mibs/VDSL-LINE-EXT-MCM-MIB.yaml +42 -0
  267. data/data/ruby/snmp/mibs/VDSL-LINE-EXT-SCM-MIB.yaml +27 -0
  268. data/data/ruby/snmp/mibs/VDSL-LINE-MIB.yaml +162 -161
  269. data/data/ruby/snmp/mibs/VPN-TC-STD-MIB.yaml +3 -0
  270. data/data/ruby/snmp/mibs/VRRP-MIB.yaml +39 -38
  271. data/data/ruby/snmp/mibs/WWW-MIB.yaml +75 -74
  272. data/examples/dump.rb +5 -5
  273. data/examples/iftable.rb +4 -4
  274. data/examples/link_down.rb +18 -18
  275. data/examples/log_traps.rb +9 -9
  276. data/examples/walk.rb +4 -4
  277. data/lib/snmp/agent.rb +42 -43
  278. data/lib/snmp/ber.rb +155 -156
  279. data/lib/snmp/manager.rb +412 -372
  280. data/lib/snmp/mib.rb +172 -182
  281. data/lib/snmp/options.rb +64 -0
  282. data/lib/snmp/pdu.rb +245 -245
  283. data/lib/snmp/varbind.rb +346 -341
  284. data/lib/snmp/version.rb +3 -0
  285. data/test/test_ber.rb +232 -233
  286. data/test/test_manager.rb +277 -238
  287. data/test/test_mib.rb +57 -57
  288. data/test/test_pdu.rb +172 -172
  289. data/test/test_retry.rb +54 -54
  290. data/test/test_smi.rb +10 -10
  291. data/test/test_varbind.rb +342 -331
  292. data/test/test_walk.rb +150 -150
  293. metadata +103 -45
  294. data/README +0 -252
  295. data/setup.rb +0 -1360
@@ -8,160 +8,150 @@
8
8
  #
9
9
 
10
10
  require 'snmp/varbind'
11
- require 'rbconfig'
12
11
  require 'fileutils'
13
12
  require 'yaml'
14
13
 
15
14
  module SNMP
16
15
 
17
- class MIB
16
+ class MIB
18
17
 
19
18
  #:stopdoc:
20
- share_path = File.join(Config::CONFIG["datadir"], "ruby", "snmp", "mibs")
21
- data_path = File.expand_path(
22
- File.join(File.dirname(__FILE__), "..", "..", "data", "ruby", "snmp", "mibs")
23
- )
24
- if (File.exist?(share_path) && File.exist?(data_path))
25
- warn "Found two MIB directories:\n #{share_path}\n #{data_path}\n" +
26
- "Using MIB::DEFAULT_MIB_PATH=#{data_path}"
27
- DEFAULT_MIB_PATH = data_path
28
- elsif (File.exist?(data_path))
29
- DEFAULT_MIB_PATH = data_path
30
- elsif (File.exist?(share_path))
31
- DEFAULT_MIB_PATH = share_path
19
+ data_path = File.expand_path(File.dirname(__FILE__) + "/../../data/ruby/snmp/mibs")
20
+ DEFAULT_MIB_PATH = if (File.exist?(data_path))
21
+ data_path
32
22
  else
33
- warn "Could not find default MIB directory, tried:\n #{share_path}\n #{data_path}"
34
- DEFAULT_MIB_PATH = nil
23
+ warn "Could not find default MIB directory, tried:\n #{data_path}"
24
+ nil
35
25
  end
36
26
  #:startdoc:
37
-
27
+
38
28
  MODULE_EXT = 'yaml'
39
-
29
+
40
30
  class ModuleNotLoadedError < RuntimeError; end
41
-
31
+
42
32
  class << self
43
- ##
44
- # Import an SMIv2 MIB file for later loading. A module only needs to
45
- # be installed once.
46
- #
47
- # module_file - the filename of the module to be imported
48
- # mib_dir - the output directory for the serialized MIB data
49
- #
50
- # NOTE: This implementation requires that the 'smidump' tool is available
51
- # in the PATH. This tool can be obtained from the libsmi website at
52
- # http://http://www.ibr.cs.tu-bs.de/projects/libsmi/ .
53
- #
54
- # ALSO NOTE: The file format in future releases is subject to
55
- # change. For now, it is a simple YAML hash with the MIB symbol
56
- # as the key and the OID as the value. These files could be
57
- # generated manually if 'smidump' is not available.
58
- #
59
- # Here is an example of the contents of an output file:
60
- #
61
- # ---
62
- # ipDefaultTTL: 1.3.6.1.2.1.4.2
63
- # ipForwDatagrams: 1.3.6.1.2.1.4.6
64
- # ipOutRequests: 1.3.6.1.2.1.4.10
65
- # ipOutNoRoutes: 1.3.6.1.2.1.4.12
66
- # ipReasmTimeout: 1.3.6.1.2.1.4.13
67
- # icmpInDestUnreachs: 1.3.6.1.2.1.5.3
68
- #
69
- def import_module(module_file, mib_dir=DEFAULT_MIB_PATH)
70
- raise "smidump tool must be installed" unless import_supported?
71
- FileUtils.makedirs mib_dir
72
- mib_hash = `smidump -f python #{module_file}`
73
- mib = eval_mib_data(mib_hash)
74
- if mib
75
- module_name = mib["moduleName"]
76
- raise "#{module_file}: invalid file format; no module name" unless module_name
77
- if mib["nodes"]
78
- oid_hash = {}
79
- mib["nodes"].each { |key, value| oid_hash[key] = value["oid"] }
80
- if mib["notifications"]
81
- mib["notifications"].each { |key, value| oid_hash[key] = value["oid"] }
82
- end
83
- File.open(module_file_name(module_name, mib_dir), 'w') do |file|
84
- YAML.dump(oid_hash, file)
85
- file.puts
86
- end
87
- module_name
88
- else
89
- warn "*** No nodes defined in: #{module_file} ***"
90
- nil
91
- end
92
- else
93
- warn "*** Import failed for: #{module_file} ***"
94
- nil
33
+ ##
34
+ # Import an SMIv2 MIB file for later loading. A module only needs to
35
+ # be installed once.
36
+ #
37
+ # module_file - the filename of the module to be imported
38
+ # mib_dir - the output directory for the serialized MIB data
39
+ #
40
+ # NOTE: This implementation requires that the 'smidump' tool is available
41
+ # in the PATH. This tool can be obtained from the libsmi website at
42
+ # http://http://www.ibr.cs.tu-bs.de/projects/libsmi/ .
43
+ #
44
+ # ALSO NOTE: The file format in future releases is subject to
45
+ # change. For now, it is a simple YAML hash with the MIB symbol
46
+ # as the key and the OID as the value. These files could be
47
+ # generated manually if 'smidump' is not available.
48
+ #
49
+ # Here is an example of the contents of an output file:
50
+ #
51
+ # ---
52
+ # ipDefaultTTL: 1.3.6.1.2.1.4.2
53
+ # ipForwDatagrams: 1.3.6.1.2.1.4.6
54
+ # ipOutRequests: 1.3.6.1.2.1.4.10
55
+ # ipOutNoRoutes: 1.3.6.1.2.1.4.12
56
+ # ipReasmTimeout: 1.3.6.1.2.1.4.13
57
+ # icmpInDestUnreachs: 1.3.6.1.2.1.5.3
58
+ #
59
+ def import_module(module_file, mib_dir=DEFAULT_MIB_PATH)
60
+ raise "smidump tool must be installed" unless import_supported?
61
+ FileUtils.makedirs mib_dir
62
+ mib_hash = `smidump -k -f python #{module_file}`
63
+ mib = eval_mib_data(mib_hash)
64
+ if mib
65
+ module_name = mib["moduleName"]
66
+ raise "#{module_file}: invalid file format; no module name" unless module_name
67
+ if mib["nodes"]
68
+ oid_hash = {}
69
+ mib["nodes"].each { |key, value| oid_hash[key] = value["oid"] }
70
+ if mib["notifications"]
71
+ mib["notifications"].each { |key, value| oid_hash[key] = value["oid"] }
72
+ end
73
+ File.open(module_file_name(module_name, mib_dir), 'w') do |file|
74
+ YAML.dump(oid_hash, file)
75
+ file.puts
95
76
  end
77
+ module_name
78
+ else
79
+ warn "*** No nodes defined in: #{module_file} ***"
80
+ nil
81
+ end
82
+ else
83
+ warn "*** Import failed for: #{module_file} ***"
84
+ nil
96
85
  end
86
+ end
97
87
 
98
- ##
99
- # Returns the full filename of the imported MIB file for the given
100
- # module name.
101
- #
102
- def module_file_name(module_name, mib_dir=DEFAULT_MIB_PATH)
103
- File.join(mib_dir, module_name + "." + MODULE_EXT)
104
- end
88
+ ##
89
+ # Returns the full filename of the imported MIB file for the given
90
+ # module name.
91
+ #
92
+ def module_file_name(module_name, mib_dir=DEFAULT_MIB_PATH)
93
+ File.join(mib_dir, module_name + "." + MODULE_EXT)
94
+ end
105
95
 
106
- ##
107
- # The MIB.import_module method is only supported if the external
108
- # 'smidump' tool is available. This method returns true if a
109
- # known version of the tool is available.
110
- #
111
- def import_supported?
112
- `smidump --version` =~ /^smidump 0.4/ && $? == 0
113
- end
96
+ ##
97
+ # The MIB.import_module method is only supported if the external
98
+ # 'smidump' tool is available. This method returns true if a
99
+ # known version of the tool is available.
100
+ #
101
+ def import_supported?
102
+ `smidump --version` =~ /^smidump 0.4/ && $? == 0
103
+ end
114
104
 
115
- ##
116
- # Returns a list of MIB modules that have been imported. All of
117
- # the current IETF MIBs should be available from the default
118
- # MIB directory.
119
- #
120
- # If a regex is provided, then the module names are matched
121
- # against that pattern.
122
- #
123
- def list_imported(regex=//, mib_dir=DEFAULT_MIB_PATH)
124
- list = []
125
- Dir["#{mib_dir}/*.#{MODULE_EXT}"].each do |name|
126
- module_name = File.basename(name, ".*")
127
- list << module_name if module_name =~ regex
128
- end
129
- list
105
+ ##
106
+ # Returns a list of MIB modules that have been imported. All of
107
+ # the current IETF MIBs should be available from the default
108
+ # MIB directory.
109
+ #
110
+ # If a regex is provided, then the module names are matched
111
+ # against that pattern.
112
+ #
113
+ def list_imported(regex=//, mib_dir=DEFAULT_MIB_PATH)
114
+ list = []
115
+ Dir["#{mib_dir}/*.#{MODULE_EXT}"].each do |name|
116
+ module_name = File.basename(name, ".*")
117
+ list << module_name if module_name =~ regex
130
118
  end
131
-
132
- private
133
-
119
+ list
120
+ end
121
+
122
+ private
123
+
134
124
  def eval_mib_data(mib_hash)
135
- ruby_hash = mib_hash.
136
- gsub(':', '=>'). # fix hash syntax
137
- gsub('(', '[').gsub(')', ']'). # fix tuple syntax
138
- sub('FILENAME =', 'filename ='). # get rid of constants
139
- sub('MIB =', 'mib =')
140
- mib = nil
141
- eval(ruby_hash)
142
- mib
125
+ ruby_hash = mib_hash.
126
+ gsub(':', '=>'). # fix hash syntax
127
+ gsub('(', '[').gsub(')', ']'). # fix tuple syntax
128
+ sub('FILENAME =', 'filename ='). # get rid of constants
129
+ sub('MIB =', 'mib =')
130
+ mib = nil
131
+ eval(ruby_hash)
132
+ mib
143
133
  end
144
134
  end # class methods
145
-
135
+
146
136
  def initialize
147
- @by_name = {}
148
- @by_module_by_name = {}
137
+ @by_name = {}
138
+ @by_module_by_name = {}
149
139
  end
150
-
140
+
151
141
  ##
152
142
  # Loads a module into this MIB. The module must be imported before it
153
143
  # can be loaded. See MIB.import_module .
154
144
  #
155
145
  def load_module(module_name, mib_dir=DEFAULT_MIB_PATH)
156
- oid_hash = nil
157
- File.open(MIB.module_file_name(module_name, mib_dir)) do |file|
158
- oid_hash = YAML.load(file.read)
159
- end
160
- @by_name.merge!(oid_hash) do |key, old, value|
161
- warn "warning: overwriting old MIB name '#{key}'"
162
- end
163
- @by_module_by_name[module_name] = {}
164
- @by_module_by_name[module_name].merge!(oid_hash)
146
+ oid_hash = nil
147
+ File.open(MIB.module_file_name(module_name, mib_dir)) do |file|
148
+ oid_hash = YAML.load(file.read)
149
+ end
150
+ @by_name.merge!(oid_hash) do |key, old, value|
151
+ warn "warning: overwriting old MIB name '#{key}'"
152
+ end
153
+ @by_module_by_name[module_name] = {}
154
+ @by_module_by_name[module_name].merge!(oid_hash)
165
155
  end
166
156
 
167
157
  ##
@@ -174,36 +164,36 @@ class MIB
174
164
  # - list of string object IDs
175
165
  # - list of ObjectIds
176
166
  # - list of VarBinds
177
- #
167
+ #
178
168
  def varbind_list(object_list, option=:KeepValue)
179
- vb_list = VarBindList.new
180
- if object_list.respond_to? :to_str
181
- vb_list << oid(object_list).to_varbind
182
- elsif object_list.respond_to? :to_varbind
183
- vb_list << apply_option(object_list.to_varbind, option)
184
- else
185
- object_list.each do |item|
186
- if item.respond_to? :to_str
187
- varbind = oid(item).to_varbind
188
- else
189
- varbind = item.to_varbind
190
- end
191
- vb_list << apply_option(varbind, option)
192
- end
169
+ vb_list = VarBindList.new
170
+ if object_list.respond_to? :to_str
171
+ vb_list << oid(object_list).to_varbind
172
+ elsif object_list.respond_to? :to_varbind
173
+ vb_list << apply_option(object_list.to_varbind, option)
174
+ else
175
+ object_list.each do |item|
176
+ if item.respond_to? :to_str
177
+ varbind = oid(item).to_varbind
178
+ else
179
+ varbind = item.to_varbind
180
+ end
181
+ vb_list << apply_option(varbind, option)
193
182
  end
194
- vb_list
183
+ end
184
+ vb_list
195
185
  end
196
186
 
197
187
  def apply_option(varbind, option)
198
- if option == :NullValue
199
- varbind.value = Null
200
- elsif option != :KeepValue
201
- raise ArgumentError, "invalid option: #{option.to_s}", caller
202
- end
203
- varbind
188
+ if option == :NullValue
189
+ varbind.value = Null
190
+ elsif option != :KeepValue
191
+ raise ArgumentError, "invalid option: #{option.to_s}", caller
192
+ end
193
+ varbind
204
194
  end
205
195
  private :apply_option
206
-
196
+
207
197
  ##
208
198
  # Returns a VarBind object for the given name and value. The name
209
199
  # can be a String, ObjectId, or anything that responds to :to_varbind.
@@ -212,52 +202,52 @@ class MIB
212
202
  # ModuleName and Index being optional.
213
203
  #
214
204
  def varbind(name, value=Null)
215
- if name.respond_to? :to_str
216
- vb = VarBind.new(oid(name), value)
217
- else
218
- vb = name.to_varbind
219
- vb.value = value
220
- end
221
- vb
205
+ if name.respond_to? :to_str
206
+ vb = VarBind.new(oid(name), value)
207
+ else
208
+ vb = name.to_varbind
209
+ vb.value = value
210
+ end
211
+ vb
222
212
  end
223
-
213
+
224
214
  ##
225
215
  # Returns an ObjectId for the given name. Names are in the format
226
216
  # <ModuleName>::<NodeName>.<Index> with ModuleName and Index being
227
217
  # optional.
228
- #
218
+ #
229
219
  def oid(name)
230
- module_parts = name.to_str.split("::")
231
- if module_parts.length == 1
232
- parse_oid(@by_name, name.to_str)
233
- elsif module_parts.length == 2
234
- module_name = module_parts[0]
235
- oid = module_parts[1]
236
- module_hash = @by_module_by_name[module_name]
237
- if module_hash
238
- parse_oid(module_hash, oid)
239
- else
240
- raise ModuleNotLoadedError, "module '#{module_name}' not loaded"
241
- end
220
+ module_parts = name.to_str.split("::")
221
+ if module_parts.length == 1
222
+ parse_oid(@by_name, name.to_str)
223
+ elsif module_parts.length == 2
224
+ module_name = module_parts[0]
225
+ oid = module_parts[1]
226
+ module_hash = @by_module_by_name[module_name]
227
+ if module_hash
228
+ parse_oid(module_hash, oid)
242
229
  else
243
- raise ArgumentError, "invalid format: #{name.to_str}"
230
+ raise ModuleNotLoadedError, "module '#{module_name}' not loaded"
244
231
  end
232
+ else
233
+ raise ArgumentError, "invalid format: #{name.to_str}"
234
+ end
245
235
  end
246
236
 
247
237
  def parse_oid(node_hash, name)
248
- oid_parts = name.split(".")
249
- first_part = oid_parts.shift
250
- oid_string = node_hash[first_part]
251
- if oid_string
252
- oid_array = oid_string.split(".")
253
- else
254
- oid_array = [first_part]
255
- end
256
- oid_array.concat(oid_parts)
257
- ObjectId.new(oid_array)
238
+ oid_parts = name.split(".")
239
+ first_part = oid_parts.shift
240
+ oid_string = node_hash[first_part]
241
+ if oid_string
242
+ oid_array = oid_string.split(".")
243
+ else
244
+ oid_array = [first_part]
245
+ end
246
+ oid_array.concat(oid_parts)
247
+ ObjectId.new(oid_array)
258
248
  end
259
249
  private :parse_oid
260
-
261
- end
250
+
251
+ end
262
252
 
263
253
  end # module SNMP
@@ -0,0 +1,64 @@
1
+ #
2
+ # Copyright (c) 2004 David R. Halliday
3
+ # All rights reserved.
4
+ #
5
+ # This SNMP library is free software. Redistribution is permitted under the
6
+ # same terms and conditions as the standard Ruby distribution. See the
7
+ # COPYING file in the Ruby distribution for details.
8
+ #
9
+
10
+ module SNMP
11
+
12
+ ##
13
+ # Helper class for processing options Hash.
14
+ #
15
+ class Options #:nodoc:
16
+
17
+ class << self
18
+ attr_reader :alternates
19
+
20
+ def option(symbol, alternate, defaulter=nil)
21
+ @alternates = {} unless @alternates
22
+ @alternates[symbol] = alternate
23
+ define_method(symbol) do
24
+ alternate_symbol = self.class.alternates[symbol]
25
+ option_value = @config[symbol] || @config[alternate_symbol] ||
26
+ (defaulter.kind_of?(Proc) ? defaulter.call(self) : defaulter)
27
+ @applied_config[symbol] = @applied_config[alternate_symbol] = option_value
28
+ end
29
+ end
30
+
31
+ def default_modules
32
+ ["SNMPv2-SMI", "SNMPv2-MIB", "IF-MIB", "IP-MIB", "TCP-MIB", "UDP-MIB"]
33
+ end
34
+
35
+ def choose_transport(klass, config)
36
+ address_family = config.use_IPv6 ? Socket::AF_INET6 : Socket::AF_INET
37
+ klass.new(address_family)
38
+ end
39
+
40
+ def ipv6_address?(config)
41
+ hostname = config.host.to_s
42
+ hostname.include?("::") || hostname.split(":").size == 8
43
+ end
44
+ end
45
+
46
+ attr_reader :applied_config
47
+
48
+ def initialize(config)
49
+ @config = validate_keys(config)
50
+ @applied_config = {}
51
+ end
52
+
53
+ def validate_keys(config)
54
+ valid_symbols = self.class.alternates.keys + self.class.alternates.values
55
+ config.each_key { |k| raise "Invalid option: #{k}" unless valid_symbols.include? k }
56
+ config
57
+ end
58
+
59
+ def socket_address_family
60
+ use_IPv6 ? Socket::AF_INET6 : Socket::AF_INET
61
+ end
62
+ end
63
+
64
+ end