netcrawl 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/netcrawl/method/cdp.rb +3 -1
- data/netcrawl.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b5e9fe103683bde2c6c01244ea5b9863fda382e
|
4
|
+
data.tar.gz: 803c4fcd2591d20388afe7e7818b7676156bff74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 813a3c039742405dff24004d5add19897ad8945a5d1a7fbfdfdcb88b9c8dfe025597a297a4cc102fff4db8d4a8ff8a775acdc2fbf1bb700c6971606c9ae01fc8
|
7
|
+
data.tar.gz: 909607c9c5e5d17e5b26487a1acb21182d874e029d874e6110d2506afef24b3bd62a45d52a35b9bda85ba4d586f2efc7a045cca1b047dc295f6db263ae71889d
|
data/lib/netcrawl/method/cdp.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
class NetCrawl
|
2
2
|
class CDP < XDP
|
3
|
+
require 'pry'
|
3
4
|
MIB = '1.3.6.1.4.1.9.9.23' # ciscoCdpMIB
|
4
5
|
OID = {
|
5
6
|
# http://tools.cisco.com/Support/SNMP/do/BrowseOID.do?local=en&translate=Translate&objectInput=1.3.6.1.4.1.9.9.23.1.2.1.1
|
@@ -22,7 +23,8 @@ class NetCrawl
|
|
22
23
|
peer.raw_name = @mib[OID[:cdpCacheDeviceId], peer_id].value
|
23
24
|
peer.ip = get_ip peer.raw_ip, peer.raw_name
|
24
25
|
peer.dst = @mib[OID[:cdpCacheDevicePort], peer_id].value
|
25
|
-
peer.src = @mib[OID[:cdpInterfaceName], peer_id.first]
|
26
|
+
peer.src = @mib[OID[:cdpInterfaceName], peer_id.first]
|
27
|
+
peer.src = peer.src.value if peer.src
|
26
28
|
peer.raw_ip = @mib[OID[:cdpCacheAddress], peer_id].value
|
27
29
|
peers << peer
|
28
30
|
end
|
data/netcrawl.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: netcrawl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Saku Ytti
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: snmp
|