arpdb 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 608b55c164203c7fed6e788fd36a8c63d4f444bc
4
- data.tar.gz: a188629f558bf677b05079a53a752f3e20ea84f0
3
+ metadata.gz: b5f2fe18f2945fe8e97fe7320b4f7f182f1f6997
4
+ data.tar.gz: 0477241a4888de261a3cf64c7a05a643dcae6314
5
5
  SHA512:
6
- metadata.gz: d7876ea9bcf3484de7841bba5e4c2a428b5fb8a2da8ef59a29308ee13eb7ec4ef3ec3ba18557586e2bafe43461020037dfad6b459870c5d05cec9036010b2ea9
7
- data.tar.gz: d5bef5453a3303995c23d9f93e10166c2bb59638533bbcc4d654f1969be78860c09d43a85602122b8f9f1a87c3bf3fd8b2e071f2f1e3cdbb4105b74f614341ac
6
+ metadata.gz: bb461504b1c2c8ab18595b77925988aae8857071332cda99c84f2ce0b778d885f8fcd9151c1db91960220d0baec3b9165767b26335292bf860360911e2499310
7
+ data.tar.gz: f08a0d82111b933b4ae9d43e3fd6129b4a091c5678633fcae49c8bf3a52086c3077c229809159297de118988ad2f433b381f365b5304792ba830f5fb724cd6ed
data/README.md CHANGED
@@ -25,14 +25,23 @@ Or install it yourself as:
25
25
  ## Usage
26
26
  ```ruby
27
27
  require 'arpdb'
28
+ include Arpdb
28
29
 
29
- routers = %w(192.168.1.1 10.1.1.1)
30
- snmp_community = 'secret_community'
30
+ devices = %w(10.40.5.1 10.43.5.1)
31
+ community = 'public'
31
32
 
32
- adb = Arpdb::Arp.new(routers, snmp_community)
33
+ a = Arp.new(devices, 'srxread')
34
+
35
+ a.scan
36
+
37
+ puts a.mac_to_ip "7a70dec81b02"
38
+ puts a.ip_to_mac "172.27.50.2"
39
+
40
+ puts a.locate_mac "7a70dec81b02"
41
+ puts a.locate_ip "172.27.50.2"
42
+
43
+ a.refresh
33
44
 
34
- puts adb.mac_to_ip 'aa:bb:cc:dd:ee:ff'
35
- puts adb.ip_to_mac '192.168.1.100'
36
45
  ```
37
46
 
38
47
  ## Development
data/lib/arpdb/arp.rb CHANGED
@@ -21,7 +21,7 @@ module Arpdb
21
21
 
22
22
  # Just an alias for scan
23
23
  def refresh
24
- refresh
24
+ scan
25
25
  end
26
26
 
27
27
  def scan
data/lib/arpdb/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Arpdb
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arpdb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - J.K.Valk