net-dhcp 1.3.2 → 1.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +4 -0
- data/lib/net-dhcp/version.rb +1 -1
- data/lib/net/dhcp/constants.rb +9 -9
- data/lib/net/dhcp/options.rb +28 -1
- data/net-dhcp.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b1ec4a4fafeff40ab5f44304c9aa8e784d86b15
|
4
|
+
data.tar.gz: 55e281d428786a2378a97f696234db7f5ade4e88
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e2de9ff05a904b8370c11f6007dd44fc5ae1c844b44888a98314ffb2b93cb115102bbf934c7fa586126b4efaffc57fbe28b9e96d565907bb20ec8f55223bac0
|
7
|
+
data.tar.gz: a548e3fca4140f97654ec0a8f5e51ad484177ac917e54ce4ec01f0726a6ac1686bfa4c686f03178f660113753939be4c4374306a0247d10d202596e1179779d0
|
data/CHANGELOG
CHANGED
data/lib/net-dhcp/version.rb
CHANGED
data/lib/net/dhcp/constants.rb
CHANGED
@@ -148,8 +148,8 @@ $DHCP_END= 0xff
|
|
148
148
|
$DHCP_CLIENTFQDN= 0x51 #rfc4702
|
149
149
|
|
150
150
|
|
151
|
-
$DHCP_CLIENTARCH=
|
152
|
-
$DHCP_CLIENTARCH_I386=
|
151
|
+
$DHCP_CLIENTARCH= 0x5d #rfc4578
|
152
|
+
$DHCP_CLIENTARCH_I386= 0x0000
|
153
153
|
$DHCP_CLIENTARCH_PC98= 0x0001
|
154
154
|
$DHCP_CLIENTARCH_ITANIUM= 0x0002
|
155
155
|
$DHCP_CLIENTARCH_ALPHA= 0x0003
|
@@ -172,11 +172,11 @@ $DHCP_CLIENTARCH_NAMES = [
|
|
172
172
|
'EFI x86-64',
|
173
173
|
]
|
174
174
|
|
175
|
-
$DHCP_CLIENTNDI=
|
176
|
-
#$DHCP_LDAP=
|
177
|
-
$DHCP_UUIDGUID=
|
178
|
-
|
179
|
-
$DHCP_AUTOCONF= 0x74 #rfc2563
|
180
|
-
$DHCP_AUTOCONF_NO= 0x00 #rfc2563
|
181
|
-
$DHCP_AUTOCONF_YES= 0x01 #rfc2563
|
175
|
+
$DHCP_CLIENTNDI= 0x5e #rfc4578
|
176
|
+
#$DHCP_LDAP= 0x5f
|
177
|
+
$DHCP_UUIDGUID= 0x61 #rfc4578
|
182
178
|
|
179
|
+
$DHCP_AUTOCONF= 0x74 #rfc2563
|
180
|
+
$DHCP_SUBNET_SELECTION= 0x76 #rfc3011
|
181
|
+
$DHCP_AUTOCONF_NO= 0x00 #rfc2563
|
182
|
+
$DHCP_AUTOCONF_YES= 0x01 #rfc2563
|
data/lib/net/dhcp/options.rb
CHANGED
@@ -555,6 +555,33 @@ module DHCP
|
|
555
555
|
end
|
556
556
|
end
|
557
557
|
|
558
|
+
# The subnet selection option is a DHCP option. The option contains a
|
559
|
+
# single IPv4 address that is the address of a subnet. The value for
|
560
|
+
# the subnet address is determined by taking any IPv4 address on the
|
561
|
+
# subnet and ANDing that address with the subnet mask (i.e.: the
|
562
|
+
# network and subnet bits are left alone and the remaining (address)
|
563
|
+
# bits are set to zero). When the DHCP server is configured to respond
|
564
|
+
# to this option, is allocating an address, and this option is present
|
565
|
+
# then the DHCP server MUST allocate the address on either:
|
566
|
+
# - the subnet specified in the subnet selection option, or;
|
567
|
+
#
|
568
|
+
# - a subnet on the same network segment as the subnet specified in the
|
569
|
+
# subnet selection option.
|
570
|
+
#
|
571
|
+
# The code for this option is 118, and its length is 4.
|
572
|
+
#
|
573
|
+
class SubnetSelectionOption < Option
|
574
|
+
def initialize(params={})
|
575
|
+
params[:type] = $DHCP_SUBNET_SELECTION
|
576
|
+
params[:payload] = params.fetch(:payload)
|
577
|
+
super(params)
|
578
|
+
end
|
579
|
+
|
580
|
+
def to_s()
|
581
|
+
"Subnet Selection = #{self.payload.join('.')}"
|
582
|
+
end
|
583
|
+
end
|
584
|
+
|
558
585
|
$DHCP_MSG_OPTIONS = {
|
559
586
|
$DHCP_SUBNETMASK => SubnetMaskOption,
|
560
587
|
$DHCP_TIMEOFFSET => Option,
|
@@ -638,7 +665,7 @@ module DHCP
|
|
638
665
|
$DHCP_LDAP => Option,
|
639
666
|
$DHCP_UUIDGUID => UUIDGUIDOption,
|
640
667
|
$DHCP_AUTOCONF => AutoConfigurationOption,
|
641
|
-
|
668
|
+
$DHCP_SUBNET_SELECTION => SubnetSelectionOption,
|
642
669
|
}
|
643
670
|
|
644
671
|
end
|
data/net-dhcp.gemspec
CHANGED
@@ -5,7 +5,7 @@ Gem::Specification.new do |s|
|
|
5
5
|
s.name = 'net-dhcp'
|
6
6
|
s.version = Net::Dhcp::VERSION
|
7
7
|
s.platform = Gem::Platform::RUBY
|
8
|
-
s.date = "
|
8
|
+
s.date = "2016-06-21"
|
9
9
|
s.authors = ['daniel martin gomez (etd)', 'syonbori', 'Mark J. Titorenko']
|
10
10
|
s.email = 'mark.titorenko@alces-software.com'
|
11
11
|
s.homepage = 'http://github.com/mjtko/net-dhcp-ruby'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: net-dhcp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- daniel martin gomez (etd)
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2016-06-21 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rspec
|
@@ -147,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
147
147
|
version: 1.3.7
|
148
148
|
requirements: []
|
149
149
|
rubyforge_project:
|
150
|
-
rubygems_version: 2.4.
|
150
|
+
rubygems_version: 2.4.5.1
|
151
151
|
signing_key:
|
152
152
|
specification_version: 3
|
153
153
|
summary: set of classes to low level handle the DHCP protocol
|