netsnmp 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/netsnmp/mib.rb +11 -1
- data/lib/netsnmp/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c87bf65264474758aed741b992dadbd6bbb277aae52b925254da2e5fea56c5b3
|
4
|
+
data.tar.gz: cf7134f2e8b451c619aabdf9dcd6b931404ab51afd7953c785e4013a348cce02
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1cade51302613f51f8da018351401b27c2d0fe08a43b915a79252ff420d5efdfe4a405ce29a60f10ade2d0f0f4a03dc2302117653043c451dd01683e8eb2c7a5
|
7
|
+
data.tar.gz: 0ce54aa2fb2cba42f47ccab2fd83e2536e8fd9e73d29d2f7a85aef4ab90d9e0c956f64f0f8fbe19f95c36a048ab2911492f55c4ca95ada0843941a896564b2cf
|
data/README.md
CHANGED
@@ -245,6 +245,8 @@ This library supports and is tested against ruby versions 2.1 or more recent, in
|
|
245
245
|
|
246
246
|
All encoding/decoding/encryption/decryption/digests are done using `openssl`, which is (still) a part of the standard library. If at some point `openssl` is removed and not specifically distributed, you'll have to install it yourself. Hopefully this will never happen.
|
247
247
|
|
248
|
+
It also uses the `openssl` ASN.1 API to encode/decode BERs, which is known to be strict, and [may not be able to decode PDUs if not compliant with the supported RFC](https://github.com/swisscom/ruby-netsnmp/issues/47).
|
249
|
+
|
248
250
|
## Debugging
|
249
251
|
|
250
252
|
You can either set the `NETSNMP_DEBUG` to the desided debug level (currently, 1 and 2). The logs will be written to stderr.
|
data/lib/netsnmp/mib.rb
CHANGED
@@ -33,7 +33,9 @@ module NETSNMP
|
|
33
33
|
if idx
|
34
34
|
mod = prefix[0..(idx - 1)]
|
35
35
|
type = prefix[(idx + 2)..-1]
|
36
|
-
|
36
|
+
unless module_loaded?(mod)
|
37
|
+
return unless load(mod)
|
38
|
+
end
|
37
39
|
else
|
38
40
|
type = prefix
|
39
41
|
end
|
@@ -84,6 +86,14 @@ module NETSNMP
|
|
84
86
|
true
|
85
87
|
end
|
86
88
|
|
89
|
+
def module_loaded?(mod)
|
90
|
+
if File.file?(mod)
|
91
|
+
@modules_loaded.include?(mod)
|
92
|
+
else
|
93
|
+
@modules_loaded.map { |path| File.basename(path, ".*") }.include?(mod)
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
87
97
|
TYPES = ["OBJECT IDENTIFIER", "OBJECT-TYPE", "MODULE-IDENTITY"].freeze
|
88
98
|
|
89
99
|
STATIC_MIB_TO_OID = {
|
data/lib/netsnmp/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: netsnmp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tiago Cardoso
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parslet
|
@@ -104,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
104
104
|
version: '0'
|
105
105
|
requirements:
|
106
106
|
- net-snmp
|
107
|
-
rubygems_version: 3.2.
|
107
|
+
rubygems_version: 3.2.15
|
108
108
|
signing_key:
|
109
109
|
specification_version: 4
|
110
110
|
summary: SNMP Client library
|