lib-dhcp 0.2.0 → 0.2.1
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 +4 -4
- data/.github/workflows/gem-push.yml +2 -0
- data/.github/workflows/run-test.yml +2 -0
- data/lib/lib/dhcp/messages/ack.rb +4 -2
- data/lib/lib/dhcp/messages/decline.rb +2 -2
- data/lib/lib/dhcp/messages/discover.rb +2 -2
- data/lib/lib/dhcp/messages/inform.rb +2 -2
- data/lib/lib/dhcp/messages/lease_active.rb +2 -2
- data/lib/lib/dhcp/messages/lease_query.rb +2 -2
- data/lib/lib/dhcp/messages/lease_unassigned.rb +2 -2
- data/lib/lib/dhcp/messages/lease_unknown.rb +2 -2
- data/lib/lib/dhcp/messages/message.rb +4 -0
- data/lib/lib/dhcp/messages/nack.rb +2 -2
- data/lib/lib/dhcp/messages/offer.rb +2 -2
- data/lib/lib/dhcp/messages/release.rb +2 -2
- data/lib/lib/dhcp/messages/request.rb +2 -2
- data/lib/lib/dhcp/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: fdd10e98acc7696e58820d6b1e40ce262a65c9a85a48d60229a5a9b9c2876b3b
|
4
|
+
data.tar.gz: 739aff2909214a5dc49bf09d8169bf8f0fda1b4349bb67a1cd372502bc135950
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0465a4aa77a5fea5860de2676ffcce737ba494055db6fcda1296aa3b69c42fb412ff53f7477697834c55b8ca55bfb558d0b35691f0ce0fdafac0e0bae833b964
|
7
|
+
data.tar.gz: c5705c5689e2155aff7225cdb8b7cd0cd8b57755366eb77ecff58264a7b26083b75b5bfdabd66ceba06be506578c4c8d3a04bd87c7aa57db3899856f4c3d2f93
|
@@ -10,7 +10,7 @@ module Lib
|
|
10
10
|
module DHCP
|
11
11
|
class Message
|
12
12
|
class ACK < Message
|
13
|
-
def initialize(htype: 1, hlen: 6, hops: 0, xid: nil, secs: 0, flags: 0, ciaddr: 0, yiaddr: 0, siaddr: 0, giaddr: 0, chaddr: 0, sname: '.', file: '.', options: nil)
|
13
|
+
def initialize(op:BOOTREPLY, htype: 1, hlen: 6, hops: 0, xid: nil, secs: 0, flags: 0, ciaddr: 0, yiaddr: 0, siaddr: 0, giaddr: 0, chaddr: 0, sname: '.', file: '.', options: nil)
|
14
14
|
if block_given?
|
15
15
|
yield self
|
16
16
|
else
|
@@ -40,6 +40,8 @@ module Lib
|
|
40
40
|
end
|
41
41
|
|
42
42
|
self.options.add Lib::DHCP::Option53.new(ACKNOWLEDGE)
|
43
|
+
self.option53 = ACKNOWLEDGE
|
44
|
+
self.op = BOOTREPLY
|
43
45
|
end
|
44
46
|
|
45
47
|
def pack
|
@@ -52,7 +54,7 @@ module Lib
|
|
52
54
|
|
53
55
|
def self.unpack(packet)
|
54
56
|
res = super packet
|
55
|
-
raise TypeError, "No implicit conversion of #{res.class.name} into #{self.
|
57
|
+
raise TypeError, "No implicit conversion of #{res.class.name} into #{self.name}" unless res.is_a? self
|
56
58
|
res
|
57
59
|
end
|
58
60
|
|
@@ -9,7 +9,7 @@ module Lib
|
|
9
9
|
module DHCP
|
10
10
|
class Message
|
11
11
|
class Decline < Message
|
12
|
-
def initialize(htype: 1, hlen: 6, hops: 0, xid: nil, secs: 0, flags: 0, ciaddr: 0, yiaddr: 0, siaddr: 0, giaddr: 0, chaddr: 0, sname: '.', file: '.', options: nil)
|
12
|
+
def initialize(op:BOOTREQUEST, htype: 1, hlen: 6, hops: 0, xid: nil, secs: 0, flags: 0, ciaddr: 0, yiaddr: 0, siaddr: 0, giaddr: 0, chaddr: 0, sname: '.', file: '.', options: nil)
|
13
13
|
if block_given?
|
14
14
|
yield self
|
15
15
|
else
|
@@ -51,7 +51,7 @@ module Lib
|
|
51
51
|
|
52
52
|
def self.unpack(packet)
|
53
53
|
res = super(packet)
|
54
|
-
raise TypeError, "No implicit conversion of #{res.class.name} into #{self.
|
54
|
+
raise TypeError, "No implicit conversion of #{res.class.name} into #{self.name}" unless res.is_a? self
|
55
55
|
res
|
56
56
|
end
|
57
57
|
|
@@ -9,7 +9,7 @@ module Lib
|
|
9
9
|
module DHCP
|
10
10
|
class Message
|
11
11
|
class Discover < Message
|
12
|
-
def initialize(htype: 1, hlen: 6, hops: 0, xid: nil, secs: 0, flags: 0, ciaddr: 0, yiaddr: 0, siaddr: 0, giaddr: 0, chaddr: 0, sname: '.', file: '.', options: nil)
|
12
|
+
def initialize(op:BOOTREQUEST, htype: 1, hlen: 6, hops: 0, xid: nil, secs: 0, flags: 0, ciaddr: 0, yiaddr: 0, siaddr: 0, giaddr: 0, chaddr: 0, sname: '.', file: '.', options: nil)
|
13
13
|
if block_given?
|
14
14
|
yield self
|
15
15
|
else
|
@@ -50,7 +50,7 @@ module Lib
|
|
50
50
|
|
51
51
|
def self.unpack(packet)
|
52
52
|
res = super(packet)
|
53
|
-
raise TypeError, "No implicit conversion of #{res.class.name} into #{self.
|
53
|
+
raise TypeError, "No implicit conversion of #{res.class.name} into #{self.name}" unless res.is_a? self
|
54
54
|
res
|
55
55
|
end
|
56
56
|
|
@@ -9,7 +9,7 @@ module Lib
|
|
9
9
|
module DHCP
|
10
10
|
class Message
|
11
11
|
class Inform < Message
|
12
|
-
def initialize(htype: 1, hlen: 6, hops: 0, xid: nil, secs: 0, flags: 0, ciaddr: 0, yiaddr: 0, siaddr: 0, giaddr: 0, chaddr: 0, sname: '.', file: '.', options: nil)
|
12
|
+
def initialize(op:BOOTREQUEST, htype: 1, hlen: 6, hops: 0, xid: nil, secs: 0, flags: 0, ciaddr: 0, yiaddr: 0, siaddr: 0, giaddr: 0, chaddr: 0, sname: '.', file: '.', options: nil)
|
13
13
|
if block_given?
|
14
14
|
yield self
|
15
15
|
else
|
@@ -50,7 +50,7 @@ module Lib
|
|
50
50
|
|
51
51
|
def self.unpack(packet)
|
52
52
|
res = super(packet)
|
53
|
-
raise TypeError, "No implicit conversion of #{res.class.name} into #{self.
|
53
|
+
raise TypeError, "No implicit conversion of #{res.class.name} into #{self.name}" unless res.is_a? self
|
54
54
|
res
|
55
55
|
end
|
56
56
|
|
@@ -9,7 +9,7 @@ module Lib
|
|
9
9
|
module DHCP
|
10
10
|
class Message
|
11
11
|
class LeaseActive < Message
|
12
|
-
def initialize(htype: 1, hlen: 6, hops: 0, xid: nil, secs: 0, flags: 0, ciaddr: 0, yiaddr: 0, siaddr: 0, giaddr: 0, chaddr: 0, sname: '.', file: '.', options: nil)
|
12
|
+
def initialize(op:BOOTREPLY, htype: 1, hlen: 6, hops: 0, xid: nil, secs: 0, flags: 0, ciaddr: 0, yiaddr: 0, siaddr: 0, giaddr: 0, chaddr: 0, sname: '.', file: '.', options: nil)
|
13
13
|
if block_given?
|
14
14
|
yield self
|
15
15
|
else
|
@@ -51,7 +51,7 @@ module Lib
|
|
51
51
|
|
52
52
|
def self.unpack(packet)
|
53
53
|
res = super(packet)
|
54
|
-
raise TypeError, "No implicit conversion of #{res.class.name} into #{self.
|
54
|
+
raise TypeError, "No implicit conversion of #{res.class.name} into #{self.name}" unless res.is_a? self
|
55
55
|
res
|
56
56
|
end
|
57
57
|
|
@@ -9,7 +9,7 @@ module Lib
|
|
9
9
|
module DHCP
|
10
10
|
class Message
|
11
11
|
class LeaseQuery < Message
|
12
|
-
def initialize(htype: 1, hlen: 6, hops: 0, xid: nil, secs: 0, flags: 0, ciaddr: 0, yiaddr: 0, siaddr: 0, giaddr: 0, chaddr: 0, sname: '.', file: '.', options: nil)
|
12
|
+
def initialize(op:BOOTREQUEST, htype: 1, hlen: 6, hops: 0, xid: nil, secs: 0, flags: 0, ciaddr: 0, yiaddr: 0, siaddr: 0, giaddr: 0, chaddr: 0, sname: '.', file: '.', options: nil)
|
13
13
|
if block_given?
|
14
14
|
yield self
|
15
15
|
else
|
@@ -50,7 +50,7 @@ module Lib
|
|
50
50
|
|
51
51
|
def self.unpack(packet)
|
52
52
|
res = super(packet)
|
53
|
-
raise TypeError, "No implicit conversion of #{res.class.name} into #{self.
|
53
|
+
raise TypeError, "No implicit conversion of #{res.class.name} into #{self.name}" unless res.is_a? self
|
54
54
|
res
|
55
55
|
end
|
56
56
|
|
@@ -9,7 +9,7 @@ module Lib
|
|
9
9
|
module DHCP
|
10
10
|
class Message
|
11
11
|
class LeaseUnassigned < Message
|
12
|
-
def initialize(htype: 1, hlen: 6, hops: 0, xid: nil, secs: 0, flags: 0, ciaddr: 0, yiaddr: 0, siaddr: 0, giaddr: 0, chaddr: 0, sname: '.', file: '.', options: nil)
|
12
|
+
def initialize(op:BOOTREPLY, htype: 1, hlen: 6, hops: 0, xid: nil, secs: 0, flags: 0, ciaddr: 0, yiaddr: 0, siaddr: 0, giaddr: 0, chaddr: 0, sname: '.', file: '.', options: nil)
|
13
13
|
if block_given?
|
14
14
|
yield self
|
15
15
|
else
|
@@ -50,7 +50,7 @@ module Lib
|
|
50
50
|
|
51
51
|
def self.unpack(packet)
|
52
52
|
res = super(packet)
|
53
|
-
raise TypeError, "No implicit conversion of #{res.class.name} into #{self.
|
53
|
+
raise TypeError, "No implicit conversion of #{res.class.name} into #{self.name}" unless res.is_a? self
|
54
54
|
res
|
55
55
|
end
|
56
56
|
|
@@ -9,7 +9,7 @@ module Lib
|
|
9
9
|
module DHCP
|
10
10
|
class Message
|
11
11
|
class LeaseUnknown < Message
|
12
|
-
def initialize(htype: 1, hlen: 6, hops: 0, xid: nil, secs: 0, flags: 0, ciaddr: 0, yiaddr: 0, siaddr: 0, giaddr: 0, chaddr: 0, sname: '.', file: '.', options: nil)
|
12
|
+
def initialize(op:BOOTREPLY, htype: 1, hlen: 6, hops: 0, xid: nil, secs: 0, flags: 0, ciaddr: 0, yiaddr: 0, siaddr: 0, giaddr: 0, chaddr: 0, sname: '.', file: '.', options: nil)
|
13
13
|
if block_given?
|
14
14
|
yield self
|
15
15
|
else
|
@@ -50,7 +50,7 @@ module Lib
|
|
50
50
|
|
51
51
|
def self.unpack(packet)
|
52
52
|
res = super(packet)
|
53
|
-
raise TypeError, "No implicit conversion of #{res.class.name} into #{self.
|
53
|
+
raise TypeError, "No implicit conversion of #{res.class.name} into #{self.name}" unless res.is_a? self
|
54
54
|
res
|
55
55
|
end
|
56
56
|
|
@@ -9,7 +9,7 @@ module Lib
|
|
9
9
|
module DHCP
|
10
10
|
class Message
|
11
11
|
class NACK < Message
|
12
|
-
def initialize(htype: 1, hlen: 6, hops: 0, xid: nil, secs: 0, flags: 0, ciaddr: 0, yiaddr: 0, siaddr: 0, giaddr: 0, chaddr: 0, sname: '.', file: '.', options: nil)
|
12
|
+
def initialize(op:BOOTREPLY, htype: 1, hlen: 6, hops: 0, xid: nil, secs: 0, flags: 0, ciaddr: 0, yiaddr: 0, siaddr: 0, giaddr: 0, chaddr: 0, sname: '.', file: '.', options: nil)
|
13
13
|
if block_given?
|
14
14
|
yield self
|
15
15
|
else
|
@@ -50,7 +50,7 @@ module Lib
|
|
50
50
|
|
51
51
|
def self.unpack(packet)
|
52
52
|
res = super(packet)
|
53
|
-
raise TypeError, "No implicit conversion of #{res.class.name} into #{self.
|
53
|
+
raise TypeError, "No implicit conversion of #{res.class.name} into #{self.name}" unless res.is_a? self
|
54
54
|
res
|
55
55
|
end
|
56
56
|
|
@@ -9,7 +9,7 @@ module Lib
|
|
9
9
|
module DHCP
|
10
10
|
class Message
|
11
11
|
class Offer < Message
|
12
|
-
def initialize(htype: 1, hlen: 6, hops: 0, xid: nil, secs: 0, flags: 0, ciaddr: 0, yiaddr: 0, siaddr: 0, giaddr: 0, chaddr: 0, sname: '.', file: '.', options: nil)
|
12
|
+
def initialize(op:BOOTREPLY, htype: 1, hlen: 6, hops: 0, xid: nil, secs: 0, flags: 0, ciaddr: 0, yiaddr: 0, siaddr: 0, giaddr: 0, chaddr: 0, sname: '.', file: '.', options: nil)
|
13
13
|
if block_given?
|
14
14
|
yield self
|
15
15
|
else
|
@@ -50,7 +50,7 @@ module Lib
|
|
50
50
|
|
51
51
|
def self.unpack(packet)
|
52
52
|
res = super(packet)
|
53
|
-
raise TypeError, "No implicit conversion of #{res.class.name} into #{self.
|
53
|
+
raise TypeError, "No implicit conversion of #{res.class.name} into #{self.name}" unless res.is_a? self
|
54
54
|
res
|
55
55
|
end
|
56
56
|
|
@@ -9,7 +9,7 @@ module Lib
|
|
9
9
|
module DHCP
|
10
10
|
class Message
|
11
11
|
class Release < Message
|
12
|
-
def initialize(htype: 1, hlen: 6, hops: 0, xid: nil, secs: 0, flags: 0, ciaddr: 0, yiaddr: 0, siaddr: 0, giaddr: 0, chaddr: 0, sname: '.', file: '.', options: nil)
|
12
|
+
def initialize(op:BOOTREQUEST, htype: 1, hlen: 6, hops: 0, xid: nil, secs: 0, flags: 0, ciaddr: 0, yiaddr: 0, siaddr: 0, giaddr: 0, chaddr: 0, sname: '.', file: '.', options: nil)
|
13
13
|
if block_given?
|
14
14
|
yield self
|
15
15
|
else
|
@@ -50,7 +50,7 @@ module Lib
|
|
50
50
|
|
51
51
|
def self.unpack(packet)
|
52
52
|
res = super(packet)
|
53
|
-
raise TypeError, "No implicit conversion of #{res.class.name} into #{self.
|
53
|
+
raise TypeError, "No implicit conversion of #{res.class.name} into #{self.name}" unless res.is_a? self
|
54
54
|
res
|
55
55
|
end
|
56
56
|
|
@@ -9,7 +9,7 @@ module Lib
|
|
9
9
|
module DHCP
|
10
10
|
class Message
|
11
11
|
class Request < Message
|
12
|
-
def initialize(htype: 1, hlen: 6, hops: 0, xid: nil, secs: 0, flags: 0, ciaddr: 0, yiaddr: 0, siaddr: 0, giaddr: 0, chaddr: 0, sname: '.', file: '.', options: nil)
|
12
|
+
def initialize(op:BOOTREQUEST, htype: 1, hlen: 6, hops: 0, xid: nil, secs: 0, flags: 0, ciaddr: 0, yiaddr: 0, siaddr: 0, giaddr: 0, chaddr: 0, sname: '.', file: '.', options: nil)
|
13
13
|
if block_given?
|
14
14
|
yield self
|
15
15
|
else
|
@@ -50,7 +50,7 @@ module Lib
|
|
50
50
|
|
51
51
|
def self.unpack(packet)
|
52
52
|
res = super(packet)
|
53
|
-
raise TypeError, "No implicit conversion of #{res.class.name} into #{self.
|
53
|
+
raise TypeError, "No implicit conversion of #{res.class.name} into #{self.name}" unless res.is_a? self
|
54
54
|
res
|
55
55
|
end
|
56
56
|
|
data/lib/lib/dhcp/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lib-dhcp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Wojcieszonek
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-02-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -404,7 +404,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
404
404
|
- !ruby/object:Gem::Version
|
405
405
|
version: '0'
|
406
406
|
requirements: []
|
407
|
-
rubygems_version: 3.2.
|
407
|
+
rubygems_version: 3.2.22
|
408
408
|
signing_key:
|
409
409
|
specification_version: 4
|
410
410
|
summary: DHCP protocol library.
|