packet-protocols 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/arp.rb +0 -2
- data/lib/ipv4.rb +0 -1
- metadata +1 -4
- data/lib/ipv4_address.rb +0 -14
- data/lib/ipv6_address.rb +0 -14
- data/lib/mac_address.rb +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6b0199c78e4d88c7a93a913101a51996edd71a93
|
4
|
+
data.tar.gz: b072ef6077fd1597d7a32f971c1f60253c5bcd78
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 42ff1521bc9116c4f75cc0da225b1f7d6d1af8e1cad61b8eceb6675f02f7cbbf3868d896fc3b8aaf7826330ebd0dca6ab77e495569fde63b8bf35d9c557145ea
|
7
|
+
data.tar.gz: 9355743bd1da87e5c2f7bb0273f89e51a0f9ce6d42b1c73cb84a9437be7956d7a8bafb9651e58bcb73e90f22c63e71c9bc3ac301745fc72430a6e975f30c0838
|
data/lib/arp.rb
CHANGED
data/lib/ipv4.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: packet-protocols
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jérémy Pagé
|
@@ -21,9 +21,6 @@ files:
|
|
21
21
|
- lib/ethernet.rb
|
22
22
|
- lib/icmp.rb
|
23
23
|
- lib/ipv4.rb
|
24
|
-
- lib/ipv4_address.rb
|
25
|
-
- lib/ipv6_address.rb
|
26
|
-
- lib/mac_address.rb
|
27
24
|
- lib/packet-protocols.rb
|
28
25
|
- lib/tcp.rb
|
29
26
|
- lib/udp.rb
|
data/lib/ipv4_address.rb
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
require 'bindata'
|
2
|
-
|
3
|
-
class Ipv4Address < BinData::Primitive
|
4
|
-
endian :big
|
5
|
-
array :octets, type: :uint8, initial_length: 4
|
6
|
-
|
7
|
-
def get
|
8
|
-
octets.map(&:to_s).join('.')
|
9
|
-
end
|
10
|
-
|
11
|
-
def set(value)
|
12
|
-
self.octets = value.split('.').map(&:to_i)
|
13
|
-
end
|
14
|
-
end
|
data/lib/ipv6_address.rb
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
require 'bindata'
|
2
|
-
|
3
|
-
class Ipv6Address < BinData::Primitive
|
4
|
-
endian :big
|
5
|
-
array :octets, type: :uint8, initial_length: 16
|
6
|
-
|
7
|
-
def get
|
8
|
-
octets.map { |o| o.to_s(16) }.join(':')
|
9
|
-
end
|
10
|
-
|
11
|
-
def set(value)
|
12
|
-
self.octets = value.split(':').map { |o| o.to_i(16) }
|
13
|
-
end
|
14
|
-
end
|
data/lib/mac_address.rb
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
require 'bindata'
|
2
|
-
|
3
|
-
class MacAddress < BinData::Primitive
|
4
|
-
endian :big
|
5
|
-
array :octets, type: :uint8, initial_length: 6
|
6
|
-
|
7
|
-
def get
|
8
|
-
octets.map { |octet| format('%02x', octet) }.join(':')
|
9
|
-
end
|
10
|
-
|
11
|
-
def set(value)
|
12
|
-
self.octets = value.split(':').map(&:hex)
|
13
|
-
end
|
14
|
-
end
|