snmp 1.2.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.rdoc +57 -63
- data/Rakefile +2 -0
- data/data/ruby/snmp/mibs/ACCOUNTING-CONTROL-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/ADSL-LINE-EXT-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/ADSL-LINE-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/ADSL-TC-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/ADSL2-LINE-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/ADSL2-LINE-TC-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/AGENTX-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/AGGREGATE-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/ALARM-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/APM-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/APPC-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/APPLETALK-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/APPLICATION-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/APPN-DLUR-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/APPN-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/APPN-TRAP-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/APS-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/ARC-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/ATM-ACCOUNTING-INFORMATION-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/ATM-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/ATM-TC-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/ATM2-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/BGP4-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/BLDG-HVAC-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/BRIDGE-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/CHARACTER-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/CIRCUIT-IF-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/CLNS-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/COFFEE-POT-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/COPS-CLIENT-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/DECNET-PHIV-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/DIAL-CONTROL-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/DIFFSERV-CONFIG-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/DIFFSERV-DSCP-TC.yaml +0 -0
- data/data/ruby/snmp/mibs/DIFFSERV-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/DIRECTORY-SERVER-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/DISMAN-EVENT-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/DISMAN-EXPRESSION-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/DISMAN-NSLOOKUP-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/DISMAN-PING-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/DISMAN-SCHEDULE-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/DISMAN-SCRIPT-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/DISMAN-TRACEROUTE-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/DLSW-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/DNS-RESOLVER-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/DNS-SERVER-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/DOCS-BPI-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/DOCS-CABLE-DEVICE-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/DOCS-IETF-BPI2-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/DOCS-IETF-CABLE-DEVICE-NOTIFICATION-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/DOCS-IETF-QOS-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/DOCS-IETF-SUBMGT-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/DOCS-IF-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/DOT12-IF-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/DOT3-EPON-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/DOT3-OAM-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/DS0-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/DS0BUNDLE-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/DS1-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/DS3-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/DSA-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/DSMON-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/EBN-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/EFM-CU-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/ENTITY-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/ENTITY-SENSOR-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/ENTITY-STATE-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/ENTITY-STATE-TC-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/ETHER-CHIPSET-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/ETHER-WIS.yaml +0 -0
- data/data/ruby/snmp/mibs/EtherLike-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/FC-MGMT-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/FCIP-MGMT-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/FDDI-SMT73-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/FIBRE-CHANNEL-FE-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/FLOW-METER-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/FR-ATM-PVC-SERVICE-IWF-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/FR-MFR-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/FRAME-RELAY-DTE-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/FRNETSERV-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/FRSLD-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/Finisher-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/GMPLS-LABEL-STD-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/GMPLS-LSR-STD-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/GMPLS-TC-STD-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/GMPLS-TE-STD-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/GSMP-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/HC-ALARM-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/HC-PerfHist-TC-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/HC-RMON-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/HCNUM-TC.yaml +0 -0
- data/data/ruby/snmp/mibs/HDSL2-SHDSL-LINE-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/HOST-RESOURCES-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/HOST-RESOURCES-TYPES.yaml +0 -0
- data/data/ruby/snmp/mibs/HPR-IP-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/HPR-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/IANA-ITU-ALARM-TC-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/IF-CAP-STACK-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/IF-INVERTED-STACK-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/IF-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/IFCP-MGMT-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/IGMP-STD-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/INET-ADDRESS-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/INTEGRATED-SERVICES-GUARANTEED-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/INTEGRATED-SERVICES-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/INTERFACETOPN-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/IP-FORWARD-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/IP-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/IPATM-IPMC-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/IPMCAST-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/IPMROUTE-STD-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/IPOA-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/IPS-AUTH-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/IPSEC-SPD-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/IPV6-FLOW-LABEL-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/IPV6-ICMP-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/IPV6-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/IPV6-MLD-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/IPV6-TCP-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/IPV6-UDP-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/ISCSI-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/ISDN-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/ISIS-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/ISNS-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/ITU-ALARM-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/ITU-ALARM-TC-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/Job-Monitoring-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/L2TP-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/LANGTAG-TC-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/LMP-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/MALLOC-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/MAU-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/MIDCOM-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/MIOX25-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/MIP-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/MOBILEIPV6-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/MPLS-FTN-STD-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/MPLS-L3VPN-STD-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/MPLS-LC-ATM-STD-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/MPLS-LC-FR-STD-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/MPLS-LDP-ATM-STD-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/MPLS-LDP-FRAME-RELAY-STD-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/MPLS-LDP-GENERIC-STD-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/MPLS-LDP-STD-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/MPLS-LSR-STD-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/MPLS-TC-STD-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/MPLS-TE-STD-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/MSDP-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/MTA-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/Modem-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/NAT-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/NETWORK-SERVICES-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/NHRP-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/NOTIFICATION-LOG-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/OPT-IF-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/OSPF-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/OSPF-TRAP-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/P-BRIDGE-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/PARALLEL-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/PIM-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/PIM-STD-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/PINT-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/PKTC-IETF-MTA-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/PKTC-IETF-SIG-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/POLICY-BASED-MANAGEMENT-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/POWER-ETHERNET-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/PPP-BRIDGE-NCP-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/PPP-IP-NCP-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/PPP-LCP-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/PPP-SEC-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/PTOPO-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/PerfHist-TC-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/Printer-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/Q-BRIDGE-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/RADIUS-ACC-CLIENT-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/RADIUS-ACC-SERVER-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/RADIUS-AUTH-CLIENT-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/RADIUS-AUTH-SERVER-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/RADIUS-DYNAUTH-CLIENT-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/RADIUS-DYNAUTH-SERVER-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/RAQMON-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/RDBMS-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/RFC1065-SMI.yaml +0 -0
- data/data/ruby/snmp/mibs/RFC1155-SMI.yaml +0 -0
- data/data/ruby/snmp/mibs/RFC1158-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/RFC1213-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/RFC1269-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/RFC1271-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/RFC1285-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/RFC1316-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/RFC1381-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/RFC1382-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/RFC1414-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/RIPv2-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/RMON-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/RMON2-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/ROHC-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/ROHC-RTP-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/ROHC-UNCOMPRESSED-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/RS-232-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/RSTP-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/RSVP-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/RTP-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/SCSI-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/SCTP-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/SFLOW-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/SIP-COMMON-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/SIP-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/SIP-SERVER-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/SIP-TC-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/SIP-UA-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/SLAPM-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/SMON-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/SNA-NAU-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/SNA-SDLC-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/SNMP-COMMUNITY-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/SNMP-FRAMEWORK-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/SNMP-MPD-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/SNMP-NOTIFICATION-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/SNMP-PROXY-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/SNMP-REPEATER-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/SNMP-TARGET-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/SNMP-USER-BASED-SM-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/SNMP-USM-AES-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/SNMP-USM-DH-OBJECTS-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/SNMP-VIEW-BASED-ACM-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/SNMPv2-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/SNMPv2-SMI.yaml +0 -0
- data/data/ruby/snmp/mibs/SNMPv2-TM.yaml +0 -0
- data/data/ruby/snmp/mibs/SNMPv2-USEC-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/SONET-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/SOURCE-ROUTING-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/SSPM-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/SYSAPPL-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/T11-FC-FABRIC-ADDR-MGR-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/T11-FC-FABRIC-CONFIG-SERVER-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/T11-FC-FABRIC-LOCK-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/T11-FC-FSPF-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/T11-FC-NAME-SERVER-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/T11-FC-ROUTE-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/T11-FC-RSCN-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/T11-FC-VIRTUAL-FABRIC-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/T11-FC-ZONE-SERVER-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/T11-TC-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/TCP-ESTATS-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/TCP-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/TCPIPX-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/TE-LINK-STD-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/TE-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/TIME-AGGREGATE-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/TN3270E-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/TN3270E-RT-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/TOKEN-RING-RMON-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/TOKENRING-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/TOKENRING-STATION-SR-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/TRANSPORT-ADDRESS-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/TRIP-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/TRIP-TC-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/TUNNEL-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/UCD-SNMP-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/UDP-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/UDPLITE-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/UPS-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/URI-TC-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/VDSL-LINE-EXT-MCM-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/VDSL-LINE-EXT-SCM-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/VDSL-LINE-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/VPN-TC-STD-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/VRRP-MIB.yaml +0 -0
- data/data/ruby/snmp/mibs/WWW-MIB.yaml +0 -0
- data/examples/datetime.rb +0 -0
- data/examples/dump.rb +0 -0
- data/examples/get.rb +0 -0
- data/examples/iftable.rb +0 -0
- data/examples/link_down.rb +0 -0
- data/examples/log_traps.rb +0 -0
- data/examples/set.rb +0 -0
- data/examples/walk.rb +0 -0
- data/lib/snmp/agent.rb +0 -0
- data/lib/snmp/ber.rb +244 -237
- data/lib/snmp/manager.rb +4 -1
- data/lib/snmp/mib.rb +1 -1
- data/lib/snmp/options.rb +0 -0
- data/lib/snmp/pdu.rb +36 -22
- data/lib/snmp/varbind.rb +46 -26
- data/lib/snmp/version.rb +1 -1
- data/lib/snmp.rb +0 -0
- data/test/if_table1.yaml +0 -0
- data/test/if_table6.yaml +0 -0
- data/test/test_ber.rb +17 -16
- data/test/test_manager.rb +3 -3
- data/test/test_mib.rb +1 -1
- data/test/test_pdu.rb +3 -3
- data/test/test_retry.rb +1 -1
- data/test/test_smi.rb +0 -0
- data/test/test_varbind.rb +4 -2
- data/test/test_walk.rb +2 -2
- metadata +8 -7
data/lib/snmp/pdu.rb
CHANGED
@@ -23,8 +23,6 @@
|
|
23
23
|
require 'snmp/ber'
|
24
24
|
require 'snmp/varbind'
|
25
25
|
|
26
|
-
include SNMP::BER
|
27
|
-
|
28
26
|
module SNMP
|
29
27
|
|
30
28
|
# Exceptions thrown during message/pdu decoding
|
@@ -40,6 +38,9 @@ module SNMP
|
|
40
38
|
SNMP_TRAP_OID_OID = ObjectId.new("1.3.6.1.6.3.1.1.4.1.0")
|
41
39
|
|
42
40
|
class Message
|
41
|
+
include SNMP::BER::Encode
|
42
|
+
extend SNMP::BER::Decode
|
43
|
+
|
43
44
|
attr_reader :version
|
44
45
|
attr_reader :community
|
45
46
|
attr_reader :pdu
|
@@ -57,9 +58,9 @@ module SNMP
|
|
57
58
|
|
58
59
|
def decode_version(data)
|
59
60
|
version_data, remainder = decode_integer(data)
|
60
|
-
if version_data == SNMP_V1
|
61
|
+
if version_data == BER::SNMP_V1
|
61
62
|
version = :SNMPv1
|
62
|
-
elsif version_data == SNMP_V2C
|
63
|
+
elsif version_data == BER::SNMP_V2C
|
63
64
|
version = :SNMPv2c
|
64
65
|
else
|
65
66
|
raise UnsupportedVersion, version_data.to_s
|
@@ -70,24 +71,24 @@ module SNMP
|
|
70
71
|
def decode_pdu(version, data, mib=nil)
|
71
72
|
pdu_tag, pdu_data, remainder = decode_tlv(data)
|
72
73
|
case pdu_tag
|
73
|
-
when GetRequest_PDU_TAG
|
74
|
+
when BER::GetRequest_PDU_TAG
|
74
75
|
pdu = PDU.decode(GetRequest, pdu_data, mib)
|
75
|
-
when GetNextRequest_PDU_TAG
|
76
|
+
when BER::GetNextRequest_PDU_TAG
|
76
77
|
pdu = PDU.decode(GetNextRequest, pdu_data, mib)
|
77
|
-
when Response_PDU_TAG
|
78
|
+
when BER::Response_PDU_TAG
|
78
79
|
pdu = PDU.decode(Response, pdu_data, mib)
|
79
|
-
when SetRequest_PDU_TAG
|
80
|
+
when BER::SetRequest_PDU_TAG
|
80
81
|
pdu = PDU.decode(SetRequest, pdu_data, mib)
|
81
|
-
when SNMPv1_Trap_PDU_TAG
|
82
|
+
when BER::SNMPv1_Trap_PDU_TAG
|
82
83
|
raise InvalidPduTag, "SNMPv1-trap not valid for #{version.to_s}" if version != :SNMPv1
|
83
84
|
pdu = SNMPv1_Trap.decode(pdu_data, mib)
|
84
|
-
when GetBulkRequest_PDU_TAG
|
85
|
+
when BER::GetBulkRequest_PDU_TAG
|
85
86
|
raise InvalidPduTag, "get-bulk not valid for #{version.to_s}" if version != :SNMPv2c
|
86
87
|
pdu = PDU.decode(GetBulkRequest, pdu_data, mib)
|
87
|
-
when InformRequest_PDU_TAG
|
88
|
+
when BER::InformRequest_PDU_TAG
|
88
89
|
raise InvalidPduTag, "inform not valid for #{version.to_s}" if version != :SNMPv2c
|
89
90
|
pdu = PDU.decode(InformRequest, pdu_data, mib)
|
90
|
-
when SNMPv2_Trap_PDU_TAG
|
91
|
+
when BER::SNMPv2_Trap_PDU_TAG
|
91
92
|
raise InvalidPduTag, "SNMPv2c-trap not valid for #{version.to_s}" if version != :SNMPv2c
|
92
93
|
pdu = PDU.decode(SNMPv2_Trap, pdu_data, mib)
|
93
94
|
else
|
@@ -109,9 +110,9 @@ module SNMP
|
|
109
110
|
|
110
111
|
def encode_version(version)
|
111
112
|
if version == :SNMPv1
|
112
|
-
encode_integer(SNMP_V1)
|
113
|
+
encode_integer(BER::SNMP_V1)
|
113
114
|
elsif version == :SNMPv2c
|
114
|
-
encode_integer(SNMP_V2C)
|
115
|
+
encode_integer(BER::SNMP_V2C)
|
115
116
|
else
|
116
117
|
raise UnsupportedVersion, version.to_s
|
117
118
|
end
|
@@ -126,6 +127,9 @@ module SNMP
|
|
126
127
|
end
|
127
128
|
|
128
129
|
class PDU
|
130
|
+
include SNMP::BER::Encode
|
131
|
+
extend SNMP::BER::Decode
|
132
|
+
|
129
133
|
attr_accessor :request_id
|
130
134
|
attr_accessor :error_index
|
131
135
|
attr_accessor :varbind_list
|
@@ -202,19 +206,19 @@ module SNMP
|
|
202
206
|
|
203
207
|
class GetRequest < PDU
|
204
208
|
def encode
|
205
|
-
encode_pdu(GetRequest_PDU_TAG)
|
209
|
+
encode_pdu(BER::GetRequest_PDU_TAG)
|
206
210
|
end
|
207
211
|
end
|
208
212
|
|
209
213
|
class GetNextRequest < PDU
|
210
214
|
def encode
|
211
|
-
encode_pdu(GetNextRequest_PDU_TAG)
|
215
|
+
encode_pdu(BER::GetNextRequest_PDU_TAG)
|
212
216
|
end
|
213
217
|
end
|
214
218
|
|
215
219
|
class SetRequest < PDU
|
216
220
|
def encode
|
217
|
-
encode_pdu(SetRequest_PDU_TAG)
|
221
|
+
encode_pdu(BER::SetRequest_PDU_TAG)
|
218
222
|
end
|
219
223
|
end
|
220
224
|
|
@@ -222,8 +226,15 @@ module SNMP
|
|
222
226
|
alias max_repetitions error_index
|
223
227
|
alias max_repetitions= error_index=
|
224
228
|
|
229
|
+
def initialize(request_id, varbind_list, non_repeaters, max_repetitions)
|
230
|
+
super(request_id, varbind_list)
|
231
|
+
# Reuse attributes of superclass - same encoding
|
232
|
+
@error_status = non_repeaters
|
233
|
+
@error_index = max_repetitions
|
234
|
+
end
|
235
|
+
|
225
236
|
def encode
|
226
|
-
encode_pdu(GetBulkRequest_PDU_TAG)
|
237
|
+
encode_pdu(BER::GetBulkRequest_PDU_TAG)
|
227
238
|
end
|
228
239
|
|
229
240
|
def non_repeaters=(number)
|
@@ -244,7 +255,7 @@ module SNMP
|
|
244
255
|
end
|
245
256
|
|
246
257
|
def encode
|
247
|
-
encode_pdu(Response_PDU_TAG)
|
258
|
+
encode_pdu(BER::Response_PDU_TAG)
|
248
259
|
end
|
249
260
|
end
|
250
261
|
|
@@ -257,7 +268,7 @@ module SNMP
|
|
257
268
|
#
|
258
269
|
class SNMPv2_Trap < PDU
|
259
270
|
def encode
|
260
|
-
encode_pdu(SNMPv2_Trap_PDU_TAG)
|
271
|
+
encode_pdu(BER::SNMPv2_Trap_PDU_TAG)
|
261
272
|
end
|
262
273
|
|
263
274
|
##
|
@@ -301,7 +312,7 @@ module SNMP
|
|
301
312
|
#
|
302
313
|
class InformRequest < SNMPv2_Trap
|
303
314
|
def encode
|
304
|
-
encode_pdu(InformRequest_PDU_TAG)
|
315
|
+
encode_pdu(BER::InformRequest_PDU_TAG)
|
305
316
|
end
|
306
317
|
end
|
307
318
|
|
@@ -309,6 +320,9 @@ module SNMP
|
|
309
320
|
# The PDU class for traps in SNMPv1.
|
310
321
|
#
|
311
322
|
class SNMPv1_Trap
|
323
|
+
include SNMP::BER::Encode
|
324
|
+
extend SNMP::BER::Decode
|
325
|
+
|
312
326
|
##
|
313
327
|
# Returns the source IP address for the trap, usually derived from the
|
314
328
|
# source IP address of the packet that delivered the trap.
|
@@ -383,7 +397,7 @@ module SNMP
|
|
383
397
|
encode_integer(@specific_trap) <<
|
384
398
|
@timestamp.encode <<
|
385
399
|
@varbind_list.encode
|
386
|
-
encode_tlv(SNMPv1_Trap_PDU_TAG, pdu_data)
|
400
|
+
encode_tlv(BER::SNMPv1_Trap_PDU_TAG, pdu_data)
|
387
401
|
end
|
388
402
|
|
389
403
|
def each_varbind(&block)
|
data/lib/snmp/varbind.rb
CHANGED
@@ -22,14 +22,15 @@
|
|
22
22
|
|
23
23
|
require 'snmp/ber'
|
24
24
|
|
25
|
-
include SNMP::BER
|
26
|
-
|
27
25
|
module SNMP
|
28
26
|
|
29
27
|
class UnsupportedValueTag < RuntimeError; end
|
30
28
|
class InvalidIpAddress < ArgumentError; end
|
31
29
|
|
32
30
|
class VarBindList < Array
|
31
|
+
include SNMP::BER::Encode
|
32
|
+
extend SNMP::BER::Decode
|
33
|
+
|
33
34
|
def self.decode(data, mib=nil)
|
34
35
|
list = VarBindList.new
|
35
36
|
varbind_data, remainder = decode_sequence(data)
|
@@ -71,6 +72,8 @@ module SNMP
|
|
71
72
|
end
|
72
73
|
|
73
74
|
class Integer
|
75
|
+
include SNMP::BER::Encode
|
76
|
+
extend SNMP::BER::Decode
|
74
77
|
include Comparable
|
75
78
|
|
76
79
|
def self.decode(value_data)
|
@@ -86,11 +89,12 @@ module SNMP
|
|
86
89
|
end
|
87
90
|
|
88
91
|
def <=>(other)
|
92
|
+
return nil unless other.respond_to? :to_i
|
89
93
|
@value <=> other.to_i
|
90
94
|
end
|
91
95
|
|
92
96
|
def coerce(other)
|
93
|
-
if other.kind_of?
|
97
|
+
if other.kind_of? ::Integer
|
94
98
|
return [other, @value]
|
95
99
|
else
|
96
100
|
return [other.to_f, self.to_f]
|
@@ -128,6 +132,7 @@ module SNMP
|
|
128
132
|
end
|
129
133
|
|
130
134
|
class OctetString < String
|
135
|
+
include SNMP::BER::Encode
|
131
136
|
def self.decode(value_data)
|
132
137
|
OctetString.new(value_data)
|
133
138
|
end
|
@@ -148,6 +153,8 @@ module SNMP
|
|
148
153
|
end
|
149
154
|
|
150
155
|
class ObjectId < Array
|
156
|
+
include SNMP::BER::Encode
|
157
|
+
extend SNMP::BER::Decode
|
151
158
|
include Comparable
|
152
159
|
|
153
160
|
def self.decode(value_data, mib=nil)
|
@@ -258,6 +265,8 @@ module SNMP
|
|
258
265
|
end
|
259
266
|
|
260
267
|
class IpAddress
|
268
|
+
include SNMP::BER::Encode
|
269
|
+
|
261
270
|
class << self
|
262
271
|
def decode(value_data)
|
263
272
|
IpAddress.new(value_data, false)
|
@@ -325,7 +334,7 @@ module SNMP
|
|
325
334
|
end
|
326
335
|
|
327
336
|
def encode
|
328
|
-
encode_tlv(IpAddress_TAG, @value)
|
337
|
+
encode_tlv(BER::IpAddress_TAG, @value)
|
329
338
|
end
|
330
339
|
|
331
340
|
private
|
@@ -364,7 +373,7 @@ module SNMP
|
|
364
373
|
end
|
365
374
|
|
366
375
|
def encode
|
367
|
-
encode_tagged_integer(Counter32_TAG, @value)
|
376
|
+
encode_tagged_integer(BER::Counter32_TAG, @value)
|
368
377
|
end
|
369
378
|
end
|
370
379
|
|
@@ -374,7 +383,7 @@ module SNMP
|
|
374
383
|
end
|
375
384
|
|
376
385
|
def encode
|
377
|
-
encode_tagged_integer(Gauge32_TAG, @value)
|
386
|
+
encode_tagged_integer(BER::Gauge32_TAG, @value)
|
378
387
|
end
|
379
388
|
end
|
380
389
|
|
@@ -384,7 +393,7 @@ module SNMP
|
|
384
393
|
end
|
385
394
|
|
386
395
|
def encode
|
387
|
-
encode_tagged_integer(Unsigned32_TAG, @value)
|
396
|
+
encode_tagged_integer(BER::Unsigned32_TAG, @value)
|
388
397
|
end
|
389
398
|
end
|
390
399
|
|
@@ -394,7 +403,7 @@ module SNMP
|
|
394
403
|
end
|
395
404
|
|
396
405
|
def encode
|
397
|
-
encode_tagged_integer(TimeTicks_TAG, @value)
|
406
|
+
encode_tagged_integer(BER::TimeTicks_TAG, @value)
|
398
407
|
end
|
399
408
|
|
400
409
|
def to_s
|
@@ -426,7 +435,7 @@ module SNMP
|
|
426
435
|
end
|
427
436
|
|
428
437
|
def encode
|
429
|
-
encode_tlv(Opaque_TAG, self)
|
438
|
+
encode_tlv(BER::Opaque_TAG, self)
|
430
439
|
end
|
431
440
|
end
|
432
441
|
|
@@ -446,11 +455,13 @@ module SNMP
|
|
446
455
|
end
|
447
456
|
|
448
457
|
def encode
|
449
|
-
encode_tagged_integer(Counter64_TAG, @value)
|
458
|
+
encode_tagged_integer(BER::Counter64_TAG, @value)
|
450
459
|
end
|
451
460
|
end
|
452
461
|
|
453
462
|
class Null
|
463
|
+
extend SNMP::BER::Encode
|
464
|
+
|
454
465
|
class << self
|
455
466
|
def decode(value_data)
|
456
467
|
Null
|
@@ -471,13 +482,15 @@ module SNMP
|
|
471
482
|
end
|
472
483
|
|
473
484
|
class NoSuchObject
|
485
|
+
extend SNMP::BER::Encode
|
486
|
+
|
474
487
|
class << self
|
475
488
|
def decode(value_data)
|
476
489
|
NoSuchObject
|
477
490
|
end
|
478
491
|
|
479
492
|
def encode
|
480
|
-
encode_exception(NoSuchObject_TAG)
|
493
|
+
encode_exception(BER::NoSuchObject_TAG)
|
481
494
|
end
|
482
495
|
|
483
496
|
def asn1_type
|
@@ -491,13 +504,15 @@ module SNMP
|
|
491
504
|
end
|
492
505
|
|
493
506
|
class NoSuchInstance
|
507
|
+
extend SNMP::BER::Encode
|
508
|
+
|
494
509
|
class << self
|
495
510
|
def decode(value_data)
|
496
511
|
NoSuchInstance
|
497
512
|
end
|
498
513
|
|
499
514
|
def encode
|
500
|
-
encode_exception(NoSuchInstance_TAG)
|
515
|
+
encode_exception(BER::NoSuchInstance_TAG)
|
501
516
|
end
|
502
517
|
|
503
518
|
def asn1_type
|
@@ -511,13 +526,15 @@ module SNMP
|
|
511
526
|
end
|
512
527
|
|
513
528
|
class EndOfMibView
|
529
|
+
extend SNMP::BER::Encode
|
530
|
+
|
514
531
|
class << self
|
515
532
|
def decode(value_data)
|
516
533
|
EndOfMibView
|
517
534
|
end
|
518
535
|
|
519
536
|
def encode
|
520
|
-
encode_exception(EndOfMibView_TAG)
|
537
|
+
encode_exception(BER::EndOfMibView_TAG)
|
521
538
|
end
|
522
539
|
|
523
540
|
def asn1_type
|
@@ -531,6 +548,9 @@ module SNMP
|
|
531
548
|
end
|
532
549
|
|
533
550
|
class VarBind
|
551
|
+
include SNMP::BER::Encode
|
552
|
+
extend SNMP::BER::Decode
|
553
|
+
|
534
554
|
attr_accessor :name
|
535
555
|
attr_accessor :value
|
536
556
|
|
@@ -546,20 +566,20 @@ module SNMP
|
|
546
566
|
end
|
547
567
|
|
548
568
|
ValueDecoderMap = {
|
549
|
-
INTEGER_TAG => Integer,
|
550
|
-
OCTET_STRING_TAG => OctetString,
|
551
|
-
NULL_TAG => Null,
|
552
|
-
OBJECT_IDENTIFIER_TAG => ObjectId,
|
553
|
-
IpAddress_TAG => IpAddress,
|
554
|
-
Counter32_TAG => Counter32,
|
555
|
-
Gauge32_TAG => Gauge32,
|
569
|
+
BER::INTEGER_TAG => Integer,
|
570
|
+
BER::OCTET_STRING_TAG => OctetString,
|
571
|
+
BER::NULL_TAG => Null,
|
572
|
+
BER::OBJECT_IDENTIFIER_TAG => ObjectId,
|
573
|
+
BER::IpAddress_TAG => IpAddress,
|
574
|
+
BER::Counter32_TAG => Counter32,
|
575
|
+
BER::Gauge32_TAG => Gauge32,
|
556
576
|
# note Gauge32 tag same as Unsigned32
|
557
|
-
TimeTicks_TAG => TimeTicks,
|
558
|
-
Opaque_TAG => Opaque,
|
559
|
-
Counter64_TAG => Counter64,
|
560
|
-
NoSuchObject_TAG => NoSuchObject,
|
561
|
-
NoSuchInstance_TAG => NoSuchInstance,
|
562
|
-
EndOfMibView_TAG => EndOfMibView
|
577
|
+
BER::TimeTicks_TAG => TimeTicks,
|
578
|
+
BER::Opaque_TAG => Opaque,
|
579
|
+
BER::Counter64_TAG => Counter64,
|
580
|
+
BER::NoSuchObject_TAG => NoSuchObject,
|
581
|
+
BER::NoSuchInstance_TAG => NoSuchInstance,
|
582
|
+
BER::EndOfMibView_TAG => EndOfMibView
|
563
583
|
}
|
564
584
|
|
565
585
|
def decode_value(data)
|
data/lib/snmp/version.rb
CHANGED
data/lib/snmp.rb
CHANGED
File without changes
|
data/test/if_table1.yaml
CHANGED
File without changes
|
data/test/if_table6.yaml
CHANGED
File without changes
|
data/test/test_ber.rb
CHANGED
@@ -4,9 +4,10 @@ require 'minitest/autorun'
|
|
4
4
|
require 'snmp/varbind'
|
5
5
|
require 'snmp/ber'
|
6
6
|
|
7
|
-
class ASN1_Test <
|
7
|
+
class ASN1_Test < Minitest::Test
|
8
8
|
|
9
|
-
include SNMP::BER
|
9
|
+
include SNMP::BER::Encode
|
10
|
+
include SNMP::BER::Decode
|
10
11
|
|
11
12
|
def test_decode_tlv_empty
|
12
13
|
tag, value, data = decode_tlv("\001\000")
|
@@ -56,20 +57,20 @@ class ASN1_Test < MiniTest::Unit::TestCase
|
|
56
57
|
|
57
58
|
# Check invalid length - ASN.1 says that first length octet can't be 255.
|
58
59
|
def test_bad_length
|
59
|
-
assert_raises(InvalidLength) {
|
60
|
+
assert_raises(BER::InvalidLength) {
|
60
61
|
decode_tlv("\001\377\001")
|
61
62
|
}
|
62
63
|
end
|
63
64
|
|
64
65
|
# Check if input data is too short
|
65
66
|
def test_out_of_data
|
66
|
-
assert_raises(OutOfData) {
|
67
|
+
assert_raises(BER::OutOfData) {
|
67
68
|
decode_tlv("\001\001")
|
68
69
|
}
|
69
|
-
assert_raises(OutOfData) {
|
70
|
+
assert_raises(BER::OutOfData) {
|
70
71
|
decode_tlv("\001")
|
71
72
|
}
|
72
|
-
assert_raises(OutOfData) {
|
73
|
+
assert_raises(BER::OutOfData) {
|
73
74
|
decode_tlv("")
|
74
75
|
}
|
75
76
|
end
|
@@ -103,7 +104,7 @@ class ASN1_Test < MiniTest::Unit::TestCase
|
|
103
104
|
assert_equal(255, i)
|
104
105
|
assert_equal("", data)
|
105
106
|
|
106
|
-
assert_raises(InvalidTag) {
|
107
|
+
assert_raises(BER::InvalidTag) {
|
107
108
|
decode_integer("\001\004\001\002\003\004")
|
108
109
|
}
|
109
110
|
end
|
@@ -113,7 +114,7 @@ class ASN1_Test < MiniTest::Unit::TestCase
|
|
113
114
|
assert_equal(16909060, i)
|
114
115
|
assert_equal("", data)
|
115
116
|
|
116
|
-
assert_raises(InvalidTag) {
|
117
|
+
assert_raises(BER::InvalidTag) {
|
117
118
|
decode_timeticks("\002\004\001\002\003\004")
|
118
119
|
}
|
119
120
|
end
|
@@ -122,7 +123,7 @@ class ASN1_Test < MiniTest::Unit::TestCase
|
|
122
123
|
def test_decode_octet_string
|
123
124
|
s, _ = decode_octet_string("\004\202\000\005hello")
|
124
125
|
assert_equal("hello",s)
|
125
|
-
assert_raises(InvalidTag) {
|
126
|
+
assert_raises(BER::InvalidTag) {
|
126
127
|
decode_octet_string("\005\202\000\005hello")
|
127
128
|
}
|
128
129
|
end
|
@@ -130,10 +131,10 @@ class ASN1_Test < MiniTest::Unit::TestCase
|
|
130
131
|
def test_decode_ip_address
|
131
132
|
ip, _ = decode_ip_address("@\004\001\002\003\004")
|
132
133
|
assert_equal(ip, "\001\002\003\004")
|
133
|
-
assert_raises(InvalidTag) {
|
134
|
+
assert_raises(BER::InvalidTag) {
|
134
135
|
decode_ip_address("\004\004\001\002\003\004")
|
135
136
|
}
|
136
|
-
assert_raises(InvalidLength) {
|
137
|
+
assert_raises(BER::InvalidLength) {
|
137
138
|
decode_ip_address("@\005\001\002\003\004\005")
|
138
139
|
}
|
139
140
|
end
|
@@ -148,7 +149,7 @@ class ASN1_Test < MiniTest::Unit::TestCase
|
|
148
149
|
assert_equal("\002\001\077", seq)
|
149
150
|
assert_equal("\002\001\001", data)
|
150
151
|
|
151
|
-
assert_raises(InvalidTag) {
|
152
|
+
assert_raises(BER::InvalidTag) {
|
152
153
|
decode_sequence("\061\003\002\001\077")
|
153
154
|
}
|
154
155
|
end
|
@@ -180,7 +181,7 @@ class ASN1_Test < MiniTest::Unit::TestCase
|
|
180
181
|
assert_equal([0,0], object_id);
|
181
182
|
assert_equal("", remainder)
|
182
183
|
|
183
|
-
assert_raises(InvalidTag) do
|
184
|
+
assert_raises(BER::InvalidTag) do
|
184
185
|
decode_object_id("\007\001+")
|
185
186
|
end
|
186
187
|
end
|
@@ -191,7 +192,7 @@ class ASN1_Test < MiniTest::Unit::TestCase
|
|
191
192
|
assert_equal("\177", encode_length(127))
|
192
193
|
assert_equal("\201\200", encode_length(128))
|
193
194
|
assert_equal("\202\002\001", encode_length(513))
|
194
|
-
assert_raises(InvalidLength) { encode_length(-1) }
|
195
|
+
assert_raises(BER::InvalidLength) { encode_length(-1) }
|
195
196
|
end
|
196
197
|
|
197
198
|
def test_encode_integer
|
@@ -232,8 +233,8 @@ class ASN1_Test < MiniTest::Unit::TestCase
|
|
232
233
|
assert_equal("\006\002+\006", encode_object_id([1,3,6]))
|
233
234
|
assert_equal("\006\003+\202\001", encode_object_id([1,3,257]))
|
234
235
|
assert_equal("\006\003" << 82.chr << "\202\001", encode_object_id([2,2,257]))
|
235
|
-
assert_raises(InvalidObjectId) { encode_object_id([3,2,257]) }
|
236
|
-
assert_raises(InvalidObjectId) { encode_object_id([]) }
|
236
|
+
assert_raises(BER::InvalidObjectId) { encode_object_id([3,2,257]) }
|
237
|
+
assert_raises(BER::InvalidObjectId) { encode_object_id([]) }
|
237
238
|
|
238
239
|
assert_equal("\006\a+\203\377\177\203\377\177",
|
239
240
|
encode_object_id(SNMP::ObjectId.new("1.3.65535.65535")))
|
data/test/test_manager.rb
CHANGED
@@ -17,7 +17,7 @@ class EchoTransport
|
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
|
-
class TestConfig <
|
20
|
+
class TestConfig < Minitest::Test
|
21
21
|
|
22
22
|
include SNMP
|
23
23
|
|
@@ -56,7 +56,7 @@ class TestConfig < MiniTest::Unit::TestCase
|
|
56
56
|
end
|
57
57
|
end
|
58
58
|
|
59
|
-
class TestManager <
|
59
|
+
class TestManager < Minitest::Test
|
60
60
|
|
61
61
|
include SNMP
|
62
62
|
|
@@ -274,7 +274,7 @@ class TrapTestTransport
|
|
274
274
|
end
|
275
275
|
|
276
276
|
|
277
|
-
class TestTrapListener <
|
277
|
+
class TestTrapListener < Minitest::Test
|
278
278
|
include SNMP
|
279
279
|
|
280
280
|
def test_init_no_handlers
|
data/test/test_mib.rb
CHANGED
data/test/test_pdu.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
require 'snmp/pdu'
|
4
4
|
require 'minitest/autorun'
|
5
5
|
|
6
|
-
class TestProtocol <
|
6
|
+
class TestProtocol < Minitest::Test
|
7
7
|
|
8
8
|
include SNMP
|
9
9
|
|
@@ -94,9 +94,9 @@ class TestProtocol < MiniTest::Unit::TestCase
|
|
94
94
|
end
|
95
95
|
|
96
96
|
def test_get_bulk_create
|
97
|
-
request = SNMP::GetBulkRequest.new(1234, VarBindList.new("1.3.6.2"),
|
97
|
+
request = SNMP::GetBulkRequest.new(1234, VarBindList.new("1.3.6.2"), 20, 10)
|
98
98
|
assert_equal(1234, request.request_id)
|
99
|
-
assert_equal(
|
99
|
+
assert_equal(20, request.non_repeaters)
|
100
100
|
assert_equal(10, request.max_repetitions)
|
101
101
|
assert_equal(1, request.varbind_list.length)
|
102
102
|
assert_equal("1.3.6.2", request.varbind_list.first.name.to_s)
|
data/test/test_retry.rb
CHANGED
data/test/test_smi.rb
CHANGED
File without changes
|
data/test/test_varbind.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
require 'snmp/varbind'
|
4
4
|
require 'minitest/autorun'
|
5
5
|
|
6
|
-
class TestVarBind <
|
6
|
+
class TestVarBind < Minitest::Test
|
7
7
|
|
8
8
|
include SNMP
|
9
9
|
|
@@ -214,7 +214,7 @@ class TestVarBind < MiniTest::Unit::TestCase
|
|
214
214
|
end
|
215
215
|
|
216
216
|
def test_integer_create_from_string
|
217
|
-
i = Integer.new("12345")
|
217
|
+
i = SNMP::Integer.new("12345")
|
218
218
|
assert_equal(12345, i.to_i)
|
219
219
|
end
|
220
220
|
|
@@ -243,6 +243,8 @@ class TestVarBind < MiniTest::Unit::TestCase
|
|
243
243
|
assert(123 < i1)
|
244
244
|
assert(123.0 < i1)
|
245
245
|
assert(i2 > 54000)
|
246
|
+
assert(i1 != NoSuchInstance)
|
247
|
+
assert(NoSuchInstance != i1)
|
246
248
|
end
|
247
249
|
|
248
250
|
def test_integer_to_oid
|
data/test/test_walk.rb
CHANGED
@@ -65,7 +65,7 @@ class YamlDataTransport
|
|
65
65
|
end
|
66
66
|
end
|
67
67
|
|
68
|
-
class TestTransport <
|
68
|
+
class TestTransport < Minitest::Test
|
69
69
|
|
70
70
|
def test_get
|
71
71
|
YamlDataTransport.load_data(File.dirname(__FILE__) + "/if_table6.yaml")
|
@@ -85,7 +85,7 @@ class TestTransport < MiniTest::Unit::TestCase
|
|
85
85
|
|
86
86
|
end
|
87
87
|
|
88
|
-
class TestWalk <
|
88
|
+
class TestWalk < Minitest::Test
|
89
89
|
|
90
90
|
##
|
91
91
|
# A single string or single ObjectId can be passed to walk()
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: snmp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dave Halliday
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-09-02 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A Ruby implementation of SNMP (the Simple Network Management Protocol).
|
14
14
|
email: hallidave@gmail.com
|
@@ -316,8 +316,9 @@ files:
|
|
316
316
|
- test/test_smi.rb
|
317
317
|
- test/test_varbind.rb
|
318
318
|
- test/test_walk.rb
|
319
|
-
homepage:
|
320
|
-
licenses:
|
319
|
+
homepage: https://github.com/hallidave/ruby-snmp
|
320
|
+
licenses:
|
321
|
+
- MIT
|
321
322
|
metadata: {}
|
322
323
|
post_install_message:
|
323
324
|
rdoc_options:
|
@@ -331,15 +332,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
331
332
|
requirements:
|
332
333
|
- - ">="
|
333
334
|
- !ruby/object:Gem::Version
|
334
|
-
version:
|
335
|
+
version: 1.9.0
|
335
336
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
336
337
|
requirements:
|
337
338
|
- - ">="
|
338
339
|
- !ruby/object:Gem::Version
|
339
340
|
version: '0'
|
340
341
|
requirements: []
|
341
|
-
rubyforge_project:
|
342
|
-
rubygems_version: 2.
|
342
|
+
rubyforge_project:
|
343
|
+
rubygems_version: 2.7.6
|
343
344
|
signing_key:
|
344
345
|
specification_version: 4
|
345
346
|
summary: A Ruby implementation of SNMP (the Simple Network Management Protocol).
|