Module: Net::SNMP

Includes:
Constants
Included in:
ManagerRepl
Defined in:
lib/net/snmp/mib/node.rb,
lib/net/snmp.rb,
lib/net/snmp/oid.rb,
lib/net/snmp/pdu.rb,
lib/net/snmp/debug.rb,
lib/net/snmp/error.rb,
lib/net/snmp/message.rb,
lib/net/snmp/mib/mib.rb,
lib/net/snmp/session.rb,
lib/net/snmp/varbind.rb,
lib/net/snmp/version.rb,
lib/net/snmp/wrapper.rb,
lib/net/snmp/listener.rb,
lib/net/snmp/constants.rb,
lib/net/snmp/mib/module.rb,
lib/net/snmp/agent/agent.rb,
lib/net/snmp/trap_session.rb,
lib/net/snmp/agent/provider.rb,
lib/net/snmp/repl/manager_repl.rb,
lib/net/snmp/agent/provider_dsl.rb,
lib/net/snmp/trap_handler/v1_trap_dsl.rb,
lib/net/snmp/trap_handler/v2_trap_dsl.rb,
lib/net/snmp/trap_handler/trap_handler.rb,
lib/net/snmp/trap_handler/v2_inform_dsl.rb

Overview

Ruby api to the Wrapper::Module class (represents netsnmp’s ‘struct module`)

Defined Under Namespace

Modules: Constants, Debug, MIB, Utility, Wrapper Classes: Agent, Dispatcher, Error, Listener, ManagerRepl, Message, Module, OID, PDU, Provider, ProviderDsl, Session, TimeoutError, TrapHandler, TrapSession, V1TrapDsl, V2InformDsl, V2TrapDsl, Varbind

Constant Summary collapse

VERSION =
"0.3.1"

Constants included from Constants

Constants::ASN_APPLICATION, Constants::ASN_BIT8, Constants::ASN_BIT_STR, Constants::ASN_BOOLEAN, Constants::ASN_CONSTRUCTOR, Constants::ASN_CONTEXT, Constants::ASN_COUNTER, Constants::ASN_COUNTER64, Constants::ASN_EXTENSION_ID, Constants::ASN_GAUGE, Constants::ASN_INTEGER, Constants::ASN_IPADDRESS, Constants::ASN_LONG_LEN, Constants::ASN_NSAP, Constants::ASN_NULL, Constants::ASN_OBJECT_ID, Constants::ASN_OCTET_STR, Constants::ASN_OPAQUE, Constants::ASN_PRIMITIVE, Constants::ASN_PRIVATE, Constants::ASN_SEQUENCE, Constants::ASN_SET, Constants::ASN_TIMETICKS, Constants::ASN_UINTEGER, Constants::ASN_UNIVERSAL, Constants::ASN_UNSIGNED, Constants::DUMP_PACKET, Constants::MAX_NAME_LEN, Constants::MAX_OID_LEN, Constants::MAX_STATS, Constants::MAX_SUBID, Constants::MIN_OID_LEN, Constants::NETSNMP_CALLBACK_OP_CONNECT, Constants::NETSNMP_CALLBACK_OP_DISCONNECT, Constants::NETSNMP_CALLBACK_OP_RECEIVED_MESSAGE, Constants::NETSNMP_CALLBACK_OP_SEND_FAILED, Constants::NETSNMP_CALLBACK_OP_TIMED_OUT, Constants::OID_SNMP_TRAP_OID, Constants::OID_SYS_UP_TIME_INSTANCE, Constants::PARSE_PACKET, Constants::REPORT_STATS_LEN, Constants::REPORT_snmpInvalidMsgs_NUM, Constants::REPORT_snmpUnknownSecurityModels_NUM, Constants::REPORT_usmStatsDecryptionErrors_NUM, Constants::REPORT_usmStatsNotInTimeWindows_NUM, Constants::REPORT_usmStatsUnknownEngineIDs_NUM, Constants::REPORT_usmStatsUnknownUserNames_NUM, Constants::REPORT_usmStatsUnsupportedSecLevels_NUM, Constants::REPORT_usmStatsWrongDigests_NUM, Constants::SNMPERR_ABORT, Constants::SNMPERR_ASN_PARSE_ERR, Constants::SNMPERR_AUTHENTICATION_FAILURE, Constants::SNMPERR_BAD_ACL, Constants::SNMPERR_BAD_ADDRESS, Constants::SNMPERR_BAD_ASN1_BUILD, Constants::SNMPERR_BAD_COMMUNITY, Constants::SNMPERR_BAD_CONTEXT, Constants::SNMPERR_BAD_DST_PARTY, Constants::SNMPERR_BAD_ENG_ID, Constants::SNMPERR_BAD_LOCPORT, Constants::SNMPERR_BAD_NAME, Constants::SNMPERR_BAD_PARSE, Constants::SNMPERR_BAD_PARTY, Constants::SNMPERR_BAD_RECVFROM, Constants::SNMPERR_BAD_REPEATERS, Constants::SNMPERR_BAD_REPETITIONS, Constants::SNMPERR_BAD_SEC_LEVEL, Constants::SNMPERR_BAD_SEC_NAME, Constants::SNMPERR_BAD_SENDTO, Constants::SNMPERR_BAD_SESSION, Constants::SNMPERR_BAD_SRC_PARTY, Constants::SNMPERR_BAD_SUBID, Constants::SNMPERR_BAD_VERSION, Constants::SNMPERR_DECRYPTION_ERR, Constants::SNMPERR_GENERR, Constants::SNMPERR_INVALID_MSG, Constants::SNMPERR_KRB5, Constants::SNMPERR_KT_NOT_AVAILABLE, Constants::SNMPERR_LONG_OID, Constants::SNMPERR_MALLOC, Constants::SNMPERR_MAX, Constants::SNMPERR_MAX_SUBID, Constants::SNMPERR_NOAUTH_DESPRIV, Constants::SNMPERR_NOMIB, Constants::SNMPERR_NOT_IN_TIME_WINDOW, Constants::SNMPERR_NO_SOCKET, Constants::SNMPERR_NO_VARS, Constants::SNMPERR_NULL_PDU, Constants::SNMPERR_OID_NONINCREASING, Constants::SNMPERR_PROTOCOL, Constants::SNMPERR_RANGE, Constants::SNMPERR_SC_GENERAL_FAILURE, Constants::SNMPERR_SC_NOT_CONFIGURED, Constants::SNMPERR_SUCCESS, Constants::SNMPERR_TIMEOUT, Constants::SNMPERR_TOO_LONG, Constants::SNMPERR_UNKNOWN_ENG_ID, Constants::SNMPERR_UNKNOWN_OBJID, Constants::SNMPERR_UNKNOWN_PDU, Constants::SNMPERR_UNKNOWN_REPORT, Constants::SNMPERR_UNKNOWN_SEC_MODEL, Constants::SNMPERR_UNKNOWN_USER_NAME, Constants::SNMPERR_UNSUPPORTED_SEC_LEVEL, Constants::SNMPERR_USM_AUTHENTICATIONFAILURE, Constants::SNMPERR_USM_DECRYPTIONERROR, Constants::SNMPERR_USM_ENCRYPTIONERROR, Constants::SNMPERR_USM_GENERICERROR, Constants::SNMPERR_USM_NOTINTIMEWINDOW, Constants::SNMPERR_USM_PARSEERROR, Constants::SNMPERR_USM_UNKNOWNENGINEID, Constants::SNMPERR_USM_UNKNOWNSECURITYNAME, Constants::SNMPERR_USM_UNSUPPORTEDSECURITYLEVEL, Constants::SNMPERR_V1_IN_V2, Constants::SNMPERR_V2_IN_V1, Constants::SNMPERR_VALUE, Constants::SNMPERR_VAR_TYPE, Constants::SNMPV3_IGNORE_UNAUTH_REPORTS, Constants::SNMP_DEFAULT_ADDRESS, Constants::SNMP_DEFAULT_COMMUNITY_LEN, Constants::SNMP_DEFAULT_CONTEXT, Constants::SNMP_DEFAULT_ENTERPRISE_LENGTH, Constants::SNMP_DEFAULT_ERRINDEX, Constants::SNMP_DEFAULT_ERRSTAT, Constants::SNMP_DEFAULT_MSGID, Constants::SNMP_DEFAULT_REMPORT, Constants::SNMP_DEFAULT_REQID, Constants::SNMP_DEFAULT_RETRIES, Constants::SNMP_DEFAULT_SECMODEL, Constants::SNMP_DEFAULT_TIME, Constants::SNMP_DEFAULT_TIMEOUT, Constants::SNMP_DEFAULT_VERSION, Constants::SNMP_DETAIL_SIZE, Constants::SNMP_ENDOFMIBVIEW, Constants::SNMP_ERR_AUTHORIZATIONERROR, Constants::SNMP_ERR_BADVALUE, Constants::SNMP_ERR_COMMITFAILED, Constants::SNMP_ERR_GENERR, Constants::SNMP_ERR_INCONSISTENTNAME, Constants::SNMP_ERR_INCONSISTENTVALUE, Constants::SNMP_ERR_NOACCESS, Constants::SNMP_ERR_NOCREATION, Constants::SNMP_ERR_NOERROR, Constants::SNMP_ERR_NOSUCHNAME, Constants::SNMP_ERR_NOTWRITABLE, Constants::SNMP_ERR_READONLY, Constants::SNMP_ERR_RESOURCEUNAVAILABLE, Constants::SNMP_ERR_TOOBIG, Constants::SNMP_ERR_UNDOFAILED, Constants::SNMP_ERR_WRONGENCODING, Constants::SNMP_ERR_WRONGLENGTH, Constants::SNMP_ERR_WRONGTYPE, Constants::SNMP_ERR_WRONGVALUE, Constants::SNMP_FLAGS_DONT_PROBE, Constants::SNMP_FLAGS_LISTENING, Constants::SNMP_FLAGS_RESP_CALLBACK, Constants::SNMP_FLAGS_STREAM_SOCKET, Constants::SNMP_FLAGS_STRIKE1, Constants::SNMP_FLAGS_STRIKE2, Constants::SNMP_FLAGS_SUBSESSION, Constants::SNMP_FLAGS_USER_CREATED, Constants::SNMP_MAX_CONTEXT_SIZE, Constants::SNMP_MAX_ENG_SIZE, Constants::SNMP_MAX_MSG_V3_HDRS, Constants::SNMP_MAX_SEC_NAME_SIZE, Constants::SNMP_MSG_GET, Constants::SNMP_MSG_GETBULK, Constants::SNMP_MSG_GETNEXT, Constants::SNMP_MSG_INFORM, Constants::SNMP_MSG_REPORT, Constants::SNMP_MSG_RESPONSE, Constants::SNMP_MSG_SET, Constants::SNMP_MSG_TRAP, Constants::SNMP_MSG_TRAP2, Constants::SNMP_NOSUCHINSTANCE, Constants::SNMP_NOSUCHOBJECT, Constants::SNMP_SEC_LEVEL_AUTHNOPRIV, Constants::SNMP_SEC_LEVEL_AUTHPRIV, Constants::SNMP_SEC_LEVEL_NOAUTH, Constants::SNMP_SEC_PARAM_BUF_SIZE, Constants::SNMP_SESS_AUTHORITATIVE, Constants::SNMP_SESS_NONAUTHORITATIVE, Constants::SNMP_SESS_UNKNOWNAUTH, Constants::SNMP_VERSION_1, Constants::SNMP_VERSION_2c, Constants::SNMP_VERSION_3, Constants::STAT_ERROR, Constants::STAT_MPD_STATS_END, Constants::STAT_MPD_STATS_START, Constants::STAT_SNMPINASNPARSEERRS, Constants::STAT_SNMPINBADCOMMUNITYNAMES, Constants::STAT_SNMPINBADCOMMUNITYUSES, Constants::STAT_SNMPINBADVALUES, Constants::STAT_SNMPINBADVERSIONS, Constants::STAT_SNMPINGENERRS, Constants::STAT_SNMPINGETNEXTS, Constants::STAT_SNMPINGETREQUESTS, Constants::STAT_SNMPINGETRESPONSES, Constants::STAT_SNMPINNOSUCHNAMES, Constants::STAT_SNMPINPKTS, Constants::STAT_SNMPINREADONLYS, Constants::STAT_SNMPINSETREQUESTS, Constants::STAT_SNMPINTOOBIGS, Constants::STAT_SNMPINTOTALREQVARS, Constants::STAT_SNMPINTOTALSETVARS, Constants::STAT_SNMPINTRAPS, Constants::STAT_SNMPINVALIDMSGS, Constants::STAT_SNMPOUTBADVALUES, Constants::STAT_SNMPOUTGENERRS, Constants::STAT_SNMPOUTGETNEXTS, Constants::STAT_SNMPOUTGETREQUESTS, Constants::STAT_SNMPOUTGETRESPONSES, Constants::STAT_SNMPOUTNOSUCHNAMES, Constants::STAT_SNMPOUTPKTS, Constants::STAT_SNMPOUTSETREQUESTS, Constants::STAT_SNMPOUTTOOBIGS, Constants::STAT_SNMPOUTTRAPS, Constants::STAT_SNMPPROXYDROPS, Constants::STAT_SNMPSILENTDROPS, Constants::STAT_SNMPUNAVAILABLECONTEXTS, Constants::STAT_SNMPUNKNOWNCONTEXTS, Constants::STAT_SNMPUNKNOWNPDUHANDLERS, Constants::STAT_SNMPUNKNOWNSECURITYMODELS, Constants::STAT_SNMP_STATS_END, Constants::STAT_SNMP_STATS_START, Constants::STAT_SUCCESS, Constants::STAT_TARGET_STATS_END, Constants::STAT_TARGET_STATS_START, Constants::STAT_TIMEOUT, Constants::STAT_USMSTATSDECRYPTIONERRORS, Constants::STAT_USMSTATSNOTINTIMEWINDOWS, Constants::STAT_USMSTATSUNKNOWNENGINEIDS, Constants::STAT_USMSTATSUNKNOWNUSERNAMES, Constants::STAT_USMSTATSUNSUPPORTEDSECLEVELS, Constants::STAT_USMSTATSWRONGDIGESTS, Constants::STAT_USM_STATS_END, Constants::STAT_USM_STATS_START, Constants::USM_AUTH_KU_LEN, Constants::USM_PRIV_KU_LEN

Class Method Summary collapse

Class Method Details

.init(tag = "snmp") ⇒ Object



9
10
11
12
# File 'lib/net/snmp.rb', line 9

def self.init(tag="snmp")
  Wrapper.init_snmp(tag)
  @initialized = true
end

.initialized?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/net/snmp.rb', line 22

def self.initialized?
  @initialized
end

.thread_safeObject



18
19
20
# File 'lib/net/snmp.rb', line 18

def self.thread_safe
  @thread_safe
end

.thread_safe=(val) ⇒ Object



14
15
16
# File 'lib/net/snmp.rb', line 14

def self.thread_safe=(val)
  @thread_safe = val
end