hvutils 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/LICENSE.txt +22 -0
- data/README.md +37 -0
- data/Rakefile +15 -0
- data/ext/arp_get/arp_get.c +67 -0
- data/ext/arp_get/arp_get.h +13 -0
- data/ext/arp_get/extconf.rb +3 -0
- data/ext/get_ip/extconf.rb +3 -0
- data/ext/get_ip/get_ip.c +85 -0
- data/ext/get_ip/get_ip.h +13 -0
- data/ext/get_mac/extconf.rb +3 -0
- data/ext/get_mac/get_mac.c +93 -0
- data/ext/get_mac/get_mac.h +17 -0
- data/hvutils.gemspec +26 -0
- data/lib/hvutils/version.rb +3 -0
- data/lib/hvutils.rb +8 -0
- data/spec/get_mac_spec.rb +20 -0
- metadata +124 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: f1f416f628b3bbc76c9fca62de8185af51799d3a
|
4
|
+
data.tar.gz: 570774ad0aa672df7d0f378ce7a7ecbb5cb9ecd3
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: e865acf9e2b5c34c379ac646f8842848c3c0db30db606640957675fd0078e384577d7d9dde93400b16e3fc5cb7d3716c68b8814643fb0bd309b43e07b89cb4fe
|
7
|
+
data.tar.gz: bcd614f744df9ec090fc604bdf3c273f698b9e27791cd1b469bd379898c1f3ce4e49e666ec19f8edaa36c82451b7607680d64d8cf5c4d6e1ea02cf86f62776a0
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Herman verschooten
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
22
|
+
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2015 Herman verschooten
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
# Hvutils
|
2
|
+
|
3
|
+
A set of small utilities.
|
4
|
+
|
5
|
+
* get_mac : returns the MAC address of the interface.
|
6
|
+
* get_ip : returns the IPv4 address of the interface.
|
7
|
+
* arp_get : returns the MAC address for an IP on an interface.
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
Add this line to your application's Gemfile:
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
gem 'hvutils'
|
15
|
+
```
|
16
|
+
|
17
|
+
And then execute:
|
18
|
+
|
19
|
+
$ bundle
|
20
|
+
|
21
|
+
Or install it yourself as:
|
22
|
+
|
23
|
+
$ gem install hvutils
|
24
|
+
|
25
|
+
## Usage
|
26
|
+
|
27
|
+
Hvutils.get_mac('eth0') => mac address as string
|
28
|
+
Hvutils.get_ip('eth0') => ip address as string
|
29
|
+
Hvutils.arp_get('eth0', '192.168.1.1') => mac address as string
|
30
|
+
|
31
|
+
## Contributing
|
32
|
+
|
33
|
+
1. Fork it ( https://github.com/Hermanverschooten/getmac/fork )
|
34
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
35
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
36
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
37
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
2
|
+
require "rake/extensiontask"
|
3
|
+
|
4
|
+
Rake::ExtensionTask.new('get_mac') do |ext|
|
5
|
+
ext.lib_dir = "lib/hvutils"
|
6
|
+
end
|
7
|
+
|
8
|
+
Rake::ExtensionTask.new('get_ip') do |ext|
|
9
|
+
ext.lib_dir = "lib/hvutils"
|
10
|
+
end
|
11
|
+
|
12
|
+
Rake::ExtensionTask.new('arp_get') do |ext|
|
13
|
+
ext.lib_dir = "lib/hvutils"
|
14
|
+
end
|
15
|
+
|
@@ -0,0 +1,67 @@
|
|
1
|
+
/*
|
2
|
+
* arp_get.c
|
3
|
+
*
|
4
|
+
* Utility to get MAC address for a given ip.
|
5
|
+
*
|
6
|
+
* (c) 2015 Herman verschooten
|
7
|
+
*/
|
8
|
+
#include <ruby.h>
|
9
|
+
#include <arp_get.h>
|
10
|
+
#include <errno.h>
|
11
|
+
#include <arpa/inet.h>
|
12
|
+
#include <net/if_arp.h>
|
13
|
+
#include <sys/ioctl.h>
|
14
|
+
|
15
|
+
|
16
|
+
VALUE Module = Qnil;
|
17
|
+
|
18
|
+
void Init_arp_get() {
|
19
|
+
Module = rb_define_module("Hvutils");
|
20
|
+
rb_define_module_function(Module, "arp_get", method_arp_get, 2);
|
21
|
+
}
|
22
|
+
|
23
|
+
VALUE method_arp_get(VALUE self, VALUE interface, VALUE ipaddress) {
|
24
|
+
#if defined(__linux__)
|
25
|
+
char* iface = StringValueCStr(interface);
|
26
|
+
char* req_ip = StringValueCStr(ipaddress);
|
27
|
+
int s;
|
28
|
+
struct sockaddr_in *sin;
|
29
|
+
struct in_addr ipaddr;
|
30
|
+
struct arpreq areq;
|
31
|
+
char mac[18];
|
32
|
+
unsigned char *ptr ;
|
33
|
+
|
34
|
+
if((s=socket(AF_INET, SOCK_DGRAM,0)) == -1){
|
35
|
+
rb_raise(rb_eIOError, "Could not create socket in arp_get");
|
36
|
+
return Qnil;
|
37
|
+
}
|
38
|
+
|
39
|
+
memset(&areq, 0, sizeof(areq));
|
40
|
+
sin = (struct sockaddr_in *) &areq.arp_pa;
|
41
|
+
inet_pton(AF_INET, req_ip, &ipaddr);
|
42
|
+
sin->sin_addr = ipaddr;
|
43
|
+
sin->sin_family = AF_INET;
|
44
|
+
|
45
|
+
sin = (struct sockaddr_in *) &areq.arp_ha;
|
46
|
+
sin->sin_family= ARPHRD_ETHER;
|
47
|
+
|
48
|
+
strncpy(areq.arp_dev,iface, 15);
|
49
|
+
|
50
|
+
if (ioctl(s,SIOCGARP, (caddr_t) &areq)==-1){
|
51
|
+
close(s);
|
52
|
+
if(errno != ENXIO)
|
53
|
+
rb_raise(rb_eIOError,"Unable to make ARP request, %s", strerror(errno));
|
54
|
+
return Qnil;
|
55
|
+
}
|
56
|
+
close(s);
|
57
|
+
|
58
|
+
ptr = (unsigned char *) &(areq.arp_ha.sa_data);
|
59
|
+
sprintf(mac,"%02x:%02x:%02x:%02x:%02x:%02x",
|
60
|
+
(ptr[0] & 0377), (ptr[1] & 0377),
|
61
|
+
(ptr[2] & 0377), (ptr[3] & 0377),
|
62
|
+
(ptr[4] & 0377), (ptr[5] & 0377));
|
63
|
+
return rb_str_new2(mac);
|
64
|
+
#else
|
65
|
+
return Qnil;
|
66
|
+
#endif
|
67
|
+
}
|
data/ext/get_ip/get_ip.c
ADDED
@@ -0,0 +1,85 @@
|
|
1
|
+
/*
|
2
|
+
* get_ip.c
|
3
|
+
*
|
4
|
+
* Utility to get ip address for a given interface.
|
5
|
+
*
|
6
|
+
* (c) 2015 Herman verschooten
|
7
|
+
*/
|
8
|
+
#include <ruby.h>
|
9
|
+
#include <get_ip.h>
|
10
|
+
#include <errno.h>
|
11
|
+
#include <arpa/inet.h>
|
12
|
+
#ifdef _DARWIN_C_SOURCE
|
13
|
+
#include <ifaddrs.h>
|
14
|
+
#endif
|
15
|
+
#ifdef __linux__
|
16
|
+
#include <net/if.h>
|
17
|
+
#include <sys/ioctl.h>
|
18
|
+
#endif
|
19
|
+
|
20
|
+
|
21
|
+
VALUE Getip = Qnil;
|
22
|
+
|
23
|
+
void Init_get_ip() {
|
24
|
+
Getip = rb_define_module("Hvutils");
|
25
|
+
rb_define_module_function(Getip, "get_ip", method_get_ip, 1);
|
26
|
+
}
|
27
|
+
|
28
|
+
VALUE method_get_ip(VALUE self, VALUE interface) {
|
29
|
+
char* iface = StringValueCStr(interface);
|
30
|
+
char ip[INET_ADDRSTRLEN];
|
31
|
+
|
32
|
+
#if defined(__linux__)
|
33
|
+
struct ifreq if_data;
|
34
|
+
int sockd;
|
35
|
+
struct sockaddr_in* ipaddr;
|
36
|
+
|
37
|
+
if((sockd = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP)) < 0) {
|
38
|
+
rb_raise(rb_eStandardError,"%s", strerror(errno));
|
39
|
+
return Qnil;
|
40
|
+
}
|
41
|
+
|
42
|
+
strcpy(if_data.ifr_name, iface);
|
43
|
+
|
44
|
+
if(ioctl(sockd, SIOCGIFADDR, &if_data) < 0) {
|
45
|
+
close(sockd);
|
46
|
+
rb_raise(rb_eRuntimeError,"%s", strerror(errno));
|
47
|
+
return Qnil;
|
48
|
+
}
|
49
|
+
|
50
|
+
close(sockd);
|
51
|
+
|
52
|
+
ipaddr = (struct sockaddr_in*)&if_data.ifr_addr;
|
53
|
+
|
54
|
+
inet_ntop(AF_INET, &(ipaddr->sin_addr), ip, INET_ADDRSTRLEN);
|
55
|
+
|
56
|
+
#elif defined(_DARWIN_C_SOURCE)
|
57
|
+
struct ifaddrs *ifa, *ifap;
|
58
|
+
struct sockaddr_in* ipaddr;
|
59
|
+
|
60
|
+
if (getifaddrs(&ifap) == -1) {
|
61
|
+
rb_raise(rb_eStandardError,"%s", strerror(errno));
|
62
|
+
return Qnil;
|
63
|
+
}
|
64
|
+
for (ifa = ifap; ifa != NULL; ifa = ifa->ifa_next) {
|
65
|
+
if (strcmp(ifa->ifa_name, iface) == 0 &&
|
66
|
+
ifa->ifa_addr->sa_family == AF_INET)
|
67
|
+
break;
|
68
|
+
}
|
69
|
+
if (ifa == NULL) {
|
70
|
+
freeifaddrs(ifap);
|
71
|
+
rb_raise(rb_eRuntimeError, "%s: no IPV4 address assigned", iface);
|
72
|
+
return Qnil;
|
73
|
+
}
|
74
|
+
|
75
|
+
ipaddr = (struct sockaddr_in *) ifa->ifa_addr;
|
76
|
+
|
77
|
+
inet_ntop(AF_INET, &(ipaddr->sin_addr), ip, INET_ADDRSTRLEN);
|
78
|
+
|
79
|
+
freeifaddrs(ifap);
|
80
|
+
#else
|
81
|
+
return Qnil;
|
82
|
+
#endif
|
83
|
+
return rb_str_new2(ip);
|
84
|
+
}
|
85
|
+
|
data/ext/get_ip/get_ip.h
ADDED
@@ -0,0 +1,93 @@
|
|
1
|
+
/*
|
2
|
+
* get_mac.c
|
3
|
+
*
|
4
|
+
* Utility to get mac address for a given interface.
|
5
|
+
*
|
6
|
+
* (c) 2015 Herman verschooten
|
7
|
+
*/
|
8
|
+
#include <ruby.h>
|
9
|
+
#include <get_mac.h>
|
10
|
+
#include <errno.h>
|
11
|
+
#ifdef _DARWIN_C_SOURCE
|
12
|
+
#include <sys/socket.h>
|
13
|
+
#include <net/if_dl.h>
|
14
|
+
#include <ifaddrs.h>
|
15
|
+
#endif
|
16
|
+
#ifdef __linux__
|
17
|
+
#include <net/if.h>
|
18
|
+
#include <netinet/in.h>
|
19
|
+
#include <sys/ioctl.h>
|
20
|
+
#endif
|
21
|
+
|
22
|
+
|
23
|
+
VALUE GetMac = Qnil;
|
24
|
+
|
25
|
+
void Init_get_mac() {
|
26
|
+
GetMac = rb_define_module("Hvutils");
|
27
|
+
rb_define_module_function(GetMac, "get_mac", method_get_mac, 1);
|
28
|
+
}
|
29
|
+
|
30
|
+
VALUE method_get_mac(VALUE self, VALUE interface) {
|
31
|
+
char* ifname = StringValueCStr(interface);
|
32
|
+
char mac[13];
|
33
|
+
#if defined(__linux__)
|
34
|
+
int r, s;
|
35
|
+
struct ifreq ifr;
|
36
|
+
char *hwaddr;
|
37
|
+
|
38
|
+
strcpy(ifr.ifr_name, ifname);
|
39
|
+
|
40
|
+
s = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP);
|
41
|
+
if (-1 == s) {
|
42
|
+
rb_raise(rb_eIOError, "%s", strerror(errno));
|
43
|
+
return Qnil;
|
44
|
+
}
|
45
|
+
|
46
|
+
r = ioctl(s, SIOCGIFHWADDR, &ifr);
|
47
|
+
if (r == -1) {
|
48
|
+
close(s);
|
49
|
+
rb_raise(rb_eIOError, "%s", strerror(errno));
|
50
|
+
return Qnil;
|
51
|
+
}
|
52
|
+
|
53
|
+
hwaddr = ifr.ifr_hwaddr.sa_data;
|
54
|
+
close(s);
|
55
|
+
|
56
|
+
snprintf(mac, sizeof (mac), "%02X%02X%02X%02X%02X%02X",
|
57
|
+
hwaddr[0] & 0xFF, hwaddr[1] & 0xFF,
|
58
|
+
hwaddr[2] & 0xFF, hwaddr[3] & 0xFF,
|
59
|
+
hwaddr[4] & 0xFF, hwaddr[5] & 0xFF);
|
60
|
+
|
61
|
+
#elif defined(_DARWIN_C_SOURCE)
|
62
|
+
struct ifaddrs *ifa, *ifap;
|
63
|
+
const char *hwaddr;
|
64
|
+
struct sockaddr_dl *sdl;
|
65
|
+
|
66
|
+
if (getifaddrs(&ifap) == -1) {
|
67
|
+
rb_raise(rb_eIOError, "%s", strerror(errno));
|
68
|
+
return Qnil;
|
69
|
+
}
|
70
|
+
for (ifa = ifap; ifa != NULL; ifa = ifa->ifa_next) {
|
71
|
+
if (strcmp(ifa->ifa_name, ifname) == 0 &&
|
72
|
+
ifa->ifa_addr->sa_family == AF_LINK)
|
73
|
+
break;
|
74
|
+
}
|
75
|
+
if (ifa == NULL) {
|
76
|
+
freeifaddrs(ifap);
|
77
|
+
rb_raise(rb_eIOError,"%s: no link-layer address assigned", ifname);
|
78
|
+
return Qnil;
|
79
|
+
}
|
80
|
+
sdl = (struct sockaddr_dl *) ifa->ifa_addr;
|
81
|
+
hwaddr = LLADDR(sdl);
|
82
|
+
snprintf(mac, sizeof (mac), "%02X%02X%02X%02X%02X%02X",
|
83
|
+
hwaddr[0] & 0xFF, hwaddr[1] & 0xFF,
|
84
|
+
hwaddr[2] & 0xFF, hwaddr[3] & 0xFF,
|
85
|
+
hwaddr[4] & 0xFF, hwaddr[5] & 0xFF);
|
86
|
+
|
87
|
+
freeifaddrs(ifap);
|
88
|
+
#else
|
89
|
+
return Qnil;
|
90
|
+
#endif
|
91
|
+
return rb_str_new2(mac);
|
92
|
+
}
|
93
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
/*
|
2
|
+
* get_mac.h
|
3
|
+
*
|
4
|
+
* Utility to get mac address for a given interface.
|
5
|
+
*
|
6
|
+
* (c) 2015 Herman verschooten
|
7
|
+
*/
|
8
|
+
#ifndef __get_mac_h__
|
9
|
+
#define __get_mac_h__
|
10
|
+
|
11
|
+
#define VERSION "0.0.1"
|
12
|
+
|
13
|
+
VALUE method_get_mac(VALUE, VALUE);
|
14
|
+
|
15
|
+
char *get_iface_mac(const char *ifname);
|
16
|
+
|
17
|
+
#endif
|
data/hvutils.gemspec
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'hvutils/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "hvutils"
|
8
|
+
spec.version = Hvutils::VERSION
|
9
|
+
spec.authors = ["Herman verschooten"]
|
10
|
+
spec.email = ["Herman@verschooten.net"]
|
11
|
+
spec.summary = %q{A number of utilities, getMAC,...}
|
12
|
+
spec.description = %q{A number of utilities, including getting the MAC address for an interface.}
|
13
|
+
spec.homepage = "https://github.com/Hermanverschooten/HVUtils"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib", "ext"]
|
20
|
+
spec.extensions = Dir['ext/**/extconf.rb']
|
21
|
+
|
22
|
+
spec.add_development_dependency "bundler", "~> 1.7"
|
23
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
24
|
+
spec.add_development_dependency "rake-compiler"
|
25
|
+
spec.add_development_dependency "rspec"
|
26
|
+
end
|
data/lib/hvutils.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'hvutils'
|
2
|
+
|
3
|
+
describe Hvutils do
|
4
|
+
let(:interface) { RbConfig::CONFIG['host_os'] =~ /darwin/i ? 'en0' : 'eth0' }
|
5
|
+
|
6
|
+
it 'returns the mac address for an interface' do
|
7
|
+
expect(Hvutils.get_mac(interface)).to match(/[0-9A-F]{12}/)
|
8
|
+
end
|
9
|
+
|
10
|
+
it 'returns the ip address for an interface' do
|
11
|
+
expect(Hvutils.get_ip(interface)).to match(/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/)
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'finds the mac address of an ip on an interface' do
|
15
|
+
if interface == 'eth0'
|
16
|
+
ip = '10.211.55.2'
|
17
|
+
expect(Hvutils.arp_get(interface,ip)).to match(/([0-9A-F]{2}\:){5}[0-9A-F]{2}/i)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
metadata
ADDED
@@ -0,0 +1,124 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: hvutils
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Herman verschooten
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-01-18 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.7'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.7'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake-compiler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
description: A number of utilities, including getting the MAC address for an interface.
|
70
|
+
email:
|
71
|
+
- Herman@verschooten.net
|
72
|
+
executables: []
|
73
|
+
extensions:
|
74
|
+
- ext/arp_get/extconf.rb
|
75
|
+
- ext/get_ip/extconf.rb
|
76
|
+
- ext/get_mac/extconf.rb
|
77
|
+
extra_rdoc_files: []
|
78
|
+
files:
|
79
|
+
- ".gitignore"
|
80
|
+
- Gemfile
|
81
|
+
- LICENSE
|
82
|
+
- LICENSE.txt
|
83
|
+
- README.md
|
84
|
+
- Rakefile
|
85
|
+
- ext/arp_get/arp_get.c
|
86
|
+
- ext/arp_get/arp_get.h
|
87
|
+
- ext/arp_get/extconf.rb
|
88
|
+
- ext/get_ip/extconf.rb
|
89
|
+
- ext/get_ip/get_ip.c
|
90
|
+
- ext/get_ip/get_ip.h
|
91
|
+
- ext/get_mac/extconf.rb
|
92
|
+
- ext/get_mac/get_mac.c
|
93
|
+
- ext/get_mac/get_mac.h
|
94
|
+
- hvutils.gemspec
|
95
|
+
- lib/hvutils.rb
|
96
|
+
- lib/hvutils/version.rb
|
97
|
+
- spec/get_mac_spec.rb
|
98
|
+
homepage: https://github.com/Hermanverschooten/HVUtils
|
99
|
+
licenses:
|
100
|
+
- MIT
|
101
|
+
metadata: {}
|
102
|
+
post_install_message:
|
103
|
+
rdoc_options: []
|
104
|
+
require_paths:
|
105
|
+
- lib
|
106
|
+
- ext
|
107
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - ">="
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '0'
|
112
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - ">="
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '0'
|
117
|
+
requirements: []
|
118
|
+
rubyforge_project:
|
119
|
+
rubygems_version: 2.4.5
|
120
|
+
signing_key:
|
121
|
+
specification_version: 4
|
122
|
+
summary: A number of utilities, getMAC,...
|
123
|
+
test_files:
|
124
|
+
- spec/get_mac_spec.rb
|