pio 0.7.0 → 0.8.0

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: 9f5e9be92c12989ecc7bfe94c76a5db47bb5304e
4
- data.tar.gz: dc6414ddb0c09cc48489295b5d4c746cfda522e9
3
+ metadata.gz: ce75fa3db348633f7c767002243b3622afbad27f
4
+ data.tar.gz: 73ba0196a66d912c3b009e2aef354ef10c30bdbc
5
5
  SHA512:
6
- metadata.gz: a5b3da4c83662a1d20002dde48e926c71becb41f22c8efc4151a7966dcc75566333c17cb9d6f14805741d521914bc98caf97c940c7add564a7fb676aec876ed9
7
- data.tar.gz: 081cc576cb1481899bd8733462e914f7644ccd1e51138bece41ff93851f432c63c6c56f4872519d297366b9e8c1524d237d40eaeff06f3cd8ab27a92b4df1bac
6
+ metadata.gz: e84a310f0f938dab183fa099e027a50f9f0642454fd1ed2d260b9185b3222ff0e3b28e59b7123526cfbfa74e3fd2c9f9b54691be30a1574c4096015d485dd5d3
7
+ data.tar.gz: ceb22cf2e33db9a1dcc9183ccb73721a4052dc08d17a3191b3a000ed6ddfd1bf2a73567f4dc7f648db8c125236f2ca2f010b19caf8d277ff4f490e921ba3a80c
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.8.0 (5/26/2014)
4
+
5
+ ### Changes
6
+ * Renamed `version` => `ofp_version`
7
+
8
+
3
9
  ## 0.7.0 (4/22/2014)
4
10
 
5
11
  ### New features
@@ -9,7 +9,7 @@ module Pio
9
9
  class Message
10
10
  extend Forwardable
11
11
 
12
- def_delegators :@echo, :version
12
+ def_delegators :@echo, :ofp_version
13
13
  def_delegators :@echo, :message_type
14
14
  def_delegators :@echo, :message_length
15
15
  def_delegators :@echo, :transaction_id
@@ -24,7 +24,7 @@ module Pio
24
24
 
25
25
  extend Forwardable
26
26
 
27
- def_delegators :@features, :version
27
+ def_delegators :@features, :ofp_version
28
28
  def_delegators :@features, :message_type
29
29
  def_delegators :@features, :message_length
30
30
  def_delegators :@features, :transaction_id
@@ -10,7 +10,7 @@ module Pio
10
10
  class Request < Message
11
11
  extend Forwardable
12
12
 
13
- def_delegators :@features, :version
13
+ def_delegators :@features, :ofp_version
14
14
  def_delegators :@features, :message_type
15
15
  def_delegators :@features, :message_length
16
16
  def_delegators :@features, :transaction_id
@@ -9,7 +9,7 @@ module Pio
9
9
  class Hello
10
10
  extend Forwardable
11
11
 
12
- def_delegators :@data, :version
12
+ def_delegators :@data, :ofp_version
13
13
  def_delegators :@data, :message_type
14
14
  def_delegators :@data, :message_length
15
15
  def_delegators :@data, :transaction_id
@@ -8,7 +8,7 @@ module Pio
8
8
  class Format < BinData::Record
9
9
  endian :big
10
10
 
11
- uint8 :version, value: 1
11
+ uint8 :ofp_version, value: 1
12
12
  uint8 :message_type, initial_value: 0, assert: -> { value == 0 }
13
13
  uint16 :message_length, initial_value: 8
14
14
  uint32 :transaction_id
@@ -4,10 +4,11 @@ module Pio
4
4
  # User options utility.
5
5
  class Options
6
6
  def self.mandatory_option(name)
7
- unless const_defined?(:MANDATORY_OPTIONS)
8
- const_set(:MANDATORY_OPTIONS, [])
7
+ if const_defined?(:MANDATORY_OPTIONS)
8
+ const_get(:MANDATORY_OPTIONS) << name
9
+ else
10
+ const_set(:MANDATORY_OPTIONS, [name])
9
11
  end
10
- const_get(:MANDATORY_OPTIONS) << name
11
12
  end
12
13
 
13
14
  def self.option(name)
@@ -57,9 +58,8 @@ module Pio
57
58
  value = user_options.fetch(key) do |missing_key|
58
59
  fail ArgumentError, "The #{missing_key} option should be passed."
59
60
  end
60
- unless value
61
- fail(ArgumentError, "The #{key} option shouldn't be #{value.inspect}.")
62
- end
61
+ return if value
62
+ fail(ArgumentError, "The #{key} option shouldn't be #{value.inspect}.")
63
63
  end
64
64
  end
65
65
  end
@@ -8,7 +8,7 @@ module Pio
8
8
  module OpenFlow
9
9
  def openflow_header
10
10
  class_eval do
11
- uint8 :version, value: 1
11
+ uint8 :ofp_version, value: 1
12
12
  uint8 :message_type
13
13
  uint16 :message_length, initial_value: -> { 8 + body.length }
14
14
  uint32 :transaction_id, initial_value: 0
@@ -3,5 +3,5 @@
3
3
  # Base module.
4
4
  module Pio
5
5
  # gem version.
6
- VERSION = '0.7.0'.freeze
6
+ VERSION = '0.8.0'.freeze
7
7
  end
@@ -12,67 +12,67 @@ describe Pio::Dhcp, '.read' do
12
12
  context 'with DHCP Discover frame' do
13
13
  let(:data) do
14
14
  [
15
- # Destination MAC Address
15
+ # Destination MAC Address
16
16
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
17
- # Source MAC Address
17
+ # Source MAC Address
18
18
  0x24, 0xdb, 0xac, 0x41, 0xe5, 0x5b,
19
- # Ethernet Type
19
+ # Ethernet Type
20
20
  0x08, 0x00,
21
- # IP version and IP Header Length
21
+ # IP version and IP Header Length
22
22
  0x45,
23
- # DSCP
23
+ # DSCP
24
24
  0x00,
25
- # IP Total Length
25
+ # IP Total Length
26
26
  0x01, 0x48,
27
- # IP Identifier
27
+ # IP Identifier
28
28
  0x00, 0x00,
29
- # IP Flags and IP Fragmentation
29
+ # IP Flags and IP Fragmentation
30
30
  0x00, 0x00,
31
- # IP TTL
31
+ # IP TTL
32
32
  0x80,
33
- # IP Protocol
33
+ # IP Protocol
34
34
  0x11,
35
- # IP Header Checksum
35
+ # IP Header Checksum
36
36
  0x39, 0xa6,
37
- # IP Source Address
37
+ # IP Source Address
38
38
  0x00, 0x00, 0x00, 0x00,
39
- # IP Destination Address
39
+ # IP Destination Address
40
40
  0xff, 0xff, 0xff, 0xff,
41
- # UDP Source Port
41
+ # UDP Source Port
42
42
  0x00, 0x44,
43
- # UDP Destination Port
43
+ # UDP Destination Port
44
44
  0x00, 0x43,
45
- # UDP Total Length
45
+ # UDP Total Length
46
46
  0x01, 0x34,
47
- # UDP Header Checksum
47
+ # UDP Header Checksum
48
48
  0x88, 0x14,
49
- # Bootp Msg Type
49
+ # Bootp Msg Type
50
50
  0x01,
51
- # Hw Type
51
+ # Hw Type
52
52
  0x01,
53
- # Hw Address Length
53
+ # Hw Address Length
54
54
  0x06,
55
- # Hops
55
+ # Hops
56
56
  0x00,
57
- # Transaction ID
57
+ # Transaction ID
58
58
  0xde, 0xad, 0xbe, 0xef,
59
- # Seconds
59
+ # Seconds
60
60
  0x00, 0x00,
61
- # Bootp Flags
61
+ # Bootp Flags
62
62
  0x00, 0x00,
63
- # Client IP Address
63
+ # Client IP Address
64
64
  0x00, 0x00, 0x00, 0x00,
65
- # Your IP Address
65
+ # Your IP Address
66
66
  0x00, 0x00, 0x00, 0x00,
67
- # Next Server IP Address
67
+ # Next Server IP Address
68
68
  0x00, 0x00, 0x00, 0x00,
69
- # Relay Agent IP Address
69
+ # Relay Agent IP Address
70
70
  0x00, 0x00, 0x00, 0x00,
71
- # Client MAC Address
71
+ # Client MAC Address
72
72
  0x24, 0xdb, 0xac, 0x41, 0xe5, 0x5b,
73
- # Client Hw Address Padding
73
+ # Client Hw Address Padding
74
74
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
75
- # Server Host Name
75
+ # Server Host Name
76
76
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
77
77
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
78
78
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -81,7 +81,7 @@ describe Pio::Dhcp, '.read' do
81
81
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
82
82
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
83
83
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
84
- # Boot File Name
84
+ # Boot File Name
85
85
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
86
86
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
87
87
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -98,19 +98,19 @@ describe Pio::Dhcp, '.read' do
98
98
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
99
99
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
100
100
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
101
- # Magic Cookie
101
+ # Magic Cookie
102
102
  0x63, 0x82, 0x53, 0x63,
103
- # DHCP Msg Type
103
+ # DHCP Msg Type
104
104
  0x35, 0x01, 0x01,
105
- # Client Identifier
105
+ # Client Identifier
106
106
  0x3d, 0x07, 0x01, 0x24, 0xdb, 0xac, 0x41, 0xe5, 0x5b,
107
- # Requested IP Address
107
+ # Requested IP Address
108
108
  0x32, 0x04, 0x00, 0x00, 0x00, 0x00,
109
- # Parameter Lists
109
+ # Parameter Lists
110
110
  0x37, 0x04, 0x01, 0x03, 0x06, 0x2a,
111
- # End Option
111
+ # End Option
112
112
  0xff,
113
- # Padding Field
113
+ # Padding Field
114
114
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
115
115
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
116
116
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -158,67 +158,67 @@ describe Pio::Dhcp, '.read' do
158
158
  context 'with DHCP offer frame' do
159
159
  let(:data) do
160
160
  [
161
- # Destination MAC Address
161
+ # Destination MAC Address
162
162
  0x11, 0x22, 0x33, 0x44, 0x55, 0x66,
163
- # Source MAC Address
163
+ # Source MAC Address
164
164
  0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff,
165
- # Ethernet Type
165
+ # Ethernet Type
166
166
  0x08, 0x00,
167
- # IP version and IP Header Length
167
+ # IP version and IP Header Length
168
168
  0x45,
169
- # DSCP
169
+ # DSCP
170
170
  0x00,
171
- # IP Total Length
171
+ # IP Total Length
172
172
  0x01, 0x48,
173
- # IP Identifier
173
+ # IP Identifier
174
174
  0x00, 0x00,
175
- # IP Flags and IP Fragmentation
175
+ # IP Flags and IP Fragmentation
176
176
  0x00, 0x00,
177
- # IP TTL
177
+ # IP TTL
178
178
  0x80,
179
- # IP Protocol
179
+ # IP Protocol
180
180
  0x11,
181
- # IP Header Checksum
181
+ # IP Header Checksum
182
182
  0xb8, 0x49,
183
- # IP Source Address
183
+ # IP Source Address
184
184
  0xc0, 0xa8, 0x00, 0x0a,
185
- # IP Destination Address
185
+ # IP Destination Address
186
186
  0xc0, 0xa8, 0x00, 0x01,
187
- # UDP Source Port
187
+ # UDP Source Port
188
188
  0x00, 0x43,
189
- # UDP Destination Port
189
+ # UDP Destination Port
190
190
  0x00, 0x44,
191
- # UDP Total Length
191
+ # UDP Total Length
192
192
  0x01, 0x34,
193
- # UDP Header Checksum
193
+ # UDP Header Checksum
194
194
  0x1e, 0x64,
195
- # Bootp Msg Type
195
+ # Bootp Msg Type
196
196
  0x02,
197
- # Hw Type
197
+ # Hw Type
198
198
  0x01,
199
- # Hw Address Length
199
+ # Hw Address Length
200
200
  0x06,
201
- # Hops
201
+ # Hops
202
202
  0x00,
203
- # Transaction ID
203
+ # Transaction ID
204
204
  0xde, 0xad, 0xbe, 0xef,
205
- # Seconds
205
+ # Seconds
206
206
  0x00, 0x00,
207
- # Bootp Flags
207
+ # Bootp Flags
208
208
  0x00, 0x00,
209
- # Client IP Address
209
+ # Client IP Address
210
210
  0x00, 0x00, 0x00, 0x00,
211
- # Your IP Address
211
+ # Your IP Address
212
212
  0xc0, 0xa8, 0x00, 0x01,
213
- # Next Server IP Address
213
+ # Next Server IP Address
214
214
  0x00, 0x00, 0x00, 0x00,
215
- # Relay Agent IP Address
215
+ # Relay Agent IP Address
216
216
  0x00, 0x00, 0x00, 0x00,
217
- # Client MAC Address
217
+ # Client MAC Address
218
218
  0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff,
219
- # Client Hw Address Padding
219
+ # Client Hw Address Padding
220
220
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
221
- # Server Host Name
221
+ # Server Host Name
222
222
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
223
223
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
224
224
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -227,7 +227,7 @@ describe Pio::Dhcp, '.read' do
227
227
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
228
228
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
229
229
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
230
- # Boot File Name
230
+ # Boot File Name
231
231
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
232
232
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
233
233
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -244,23 +244,23 @@ describe Pio::Dhcp, '.read' do
244
244
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
245
245
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
246
246
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
247
- # Magic Cookie
247
+ # Magic Cookie
248
248
  0x63, 0x82, 0x53, 0x63,
249
- # DHCP Msg Type
249
+ # DHCP Msg Type
250
250
  0x35, 0x01, 0x02,
251
- # Renewal Time Value
251
+ # Renewal Time Value
252
252
  0x3a, 0x04, 0xde, 0xad, 0xbe, 0xef,
253
- # Rebinding Time Value
253
+ # Rebinding Time Value
254
254
  0x3b, 0x04, 0xde, 0xad, 0xbe, 0xef,
255
- # IP Address Lease Time Value
255
+ # IP Address Lease Time Value
256
256
  0x33, 0x04, 0xde, 0xad, 0xbe, 0xef,
257
- # DHCP Server Identifier
257
+ # DHCP Server Identifier
258
258
  0x36, 0x04, 0xc0, 0xa8, 0x00, 0x0a,
259
- # Subnet Mask
259
+ # Subnet Mask
260
260
  0x01, 0x04, 0xff, 0xff, 0xff, 0x00,
261
- # End Option
261
+ # End Option
262
262
  0xff,
263
- # Padding Field
263
+ # Padding Field
264
264
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
265
265
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
266
266
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -310,67 +310,67 @@ describe Pio::Dhcp, '.read' do
310
310
  context 'with DHCP Request frame' do
311
311
  let(:data) do
312
312
  [
313
- # Destination MAC Address
313
+ # Destination MAC Address
314
314
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
315
- # Source MAC Address
315
+ # Source MAC Address
316
316
  0x24, 0xdb, 0xac, 0x41, 0xe5, 0x5b,
317
- # Ethernet Type
317
+ # Ethernet Type
318
318
  0x08, 0x00,
319
- # IP version and IP Header Length
319
+ # IP version and IP Header Length
320
320
  0x45,
321
- # DSCP
321
+ # DSCP
322
322
  0x00,
323
- # IP Total Length
323
+ # IP Total Length
324
324
  0x01, 0x48,
325
- # IP Identifier
325
+ # IP Identifier
326
326
  0x00, 0x00,
327
- # IP Flags and IP Fragmentation
327
+ # IP Flags and IP Fragmentation
328
328
  0x00, 0x00,
329
- # IP TTL
329
+ # IP TTL
330
330
  0x80,
331
- # IP Protocol
331
+ # IP Protocol
332
332
  0x11,
333
- # IP Header Checksum
333
+ # IP Header Checksum
334
334
  0x39, 0xa6,
335
- # IP Source Address
335
+ # IP Source Address
336
336
  0x00, 0x00, 0x00, 0x00,
337
- # IP Destination Address
337
+ # IP Destination Address
338
338
  0xff, 0xff, 0xff, 0xff,
339
- # UDP Source Port
339
+ # UDP Source Port
340
340
  0x00, 0x44,
341
- # UDP Destination Port
341
+ # UDP Destination Port
342
342
  0x00, 0x43,
343
- # UDP Total Length
343
+ # UDP Total Length
344
344
  0x01, 0x34,
345
- # UDP Header Checksum
345
+ # UDP Header Checksum
346
346
  0xce, 0xb3,
347
- # Bootp Msg Type
347
+ # Bootp Msg Type
348
348
  0x01,
349
- # Hw Type
349
+ # Hw Type
350
350
  0x01,
351
- # Hw Address Length
351
+ # Hw Address Length
352
352
  0x06,
353
- # Hops
353
+ # Hops
354
354
  0x00,
355
- # Transaction ID
355
+ # Transaction ID
356
356
  0xde, 0xad, 0xbe, 0xef,
357
- # Seconds
357
+ # Seconds
358
358
  0x00, 0x00,
359
- # Bootp Flags
359
+ # Bootp Flags
360
360
  0x00, 0x00,
361
- # Client IP Address
361
+ # Client IP Address
362
362
  0x00, 0x00, 0x00, 0x00,
363
- # Your IP Address
363
+ # Your IP Address
364
364
  0x00, 0x00, 0x00, 0x00,
365
- # Next Server IP Address
365
+ # Next Server IP Address
366
366
  0x00, 0x00, 0x00, 0x00,
367
- # Relay Agent IP Address
367
+ # Relay Agent IP Address
368
368
  0x00, 0x00, 0x00, 0x00,
369
- # Client MAC Address
369
+ # Client MAC Address
370
370
  0x24, 0xdb, 0xac, 0x41, 0xe5, 0x5b,
371
- # Client Hw Address Padding
371
+ # Client Hw Address Padding
372
372
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
373
- # Server Host Name
373
+ # Server Host Name
374
374
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
375
375
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
376
376
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -379,7 +379,7 @@ describe Pio::Dhcp, '.read' do
379
379
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
380
380
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
381
381
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
382
- # Boot File Name
382
+ # Boot File Name
383
383
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
384
384
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
385
385
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -396,21 +396,21 @@ describe Pio::Dhcp, '.read' do
396
396
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
397
397
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
398
398
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
399
- # Magic Cookie
399
+ # Magic Cookie
400
400
  0x63, 0x82, 0x53, 0x63,
401
- # DHCP Msg Type
401
+ # DHCP Msg Type
402
402
  0x35, 0x01, 0x03,
403
- # Client Identifier
403
+ # Client Identifier
404
404
  0x3d, 0x07, 0x01, 0x24, 0xdb, 0xac, 0x41, 0xe5, 0x5b,
405
- # Requested IP Address
405
+ # Requested IP Address
406
406
  0x32, 0x04, 0xc0, 0xa8, 0x00, 0x0a,
407
- # Parameter Lists
407
+ # Parameter Lists
408
408
  0x37, 0x04, 0x01, 0x03, 0x06, 0x2a,
409
- # DHCP Server Identifier
409
+ # DHCP Server Identifier
410
410
  0x36, 0x04, 0xc0, 0xa8, 0x00, 0x01,
411
- # End Option
411
+ # End Option
412
412
  0xff,
413
- # Padding Field
413
+ # Padding Field
414
414
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
415
415
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
416
416
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -458,67 +458,67 @@ describe Pio::Dhcp, '.read' do
458
458
  context 'with DHCP ACK frame' do
459
459
  let(:data) do
460
460
  [
461
- # Destination MAC Address
461
+ # Destination MAC Address
462
462
  0x11, 0x22, 0x33, 0x44, 0x55, 0x66,
463
- # Source MAC Address
463
+ # Source MAC Address
464
464
  0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff,
465
- # Ethernet Type
465
+ # Ethernet Type
466
466
  0x08, 0x00,
467
- # IP version and IP Header Length
467
+ # IP version and IP Header Length
468
468
  0x45,
469
- # DSCP
469
+ # DSCP
470
470
  0x00,
471
- # IP Total Length
471
+ # IP Total Length
472
472
  0x01, 0x48,
473
- # IP Identifier
473
+ # IP Identifier
474
474
  0x00, 0x00,
475
- # IP Flags and IP Fragmentation
475
+ # IP Flags and IP Fragmentation
476
476
  0x00, 0x00,
477
- # IP TTL
477
+ # IP TTL
478
478
  0x80,
479
- # IP Protocol
479
+ # IP Protocol
480
480
  0x11,
481
- # IP Header Checksum
481
+ # IP Header Checksum
482
482
  0xb8, 0x49,
483
- # IP Source Address
483
+ # IP Source Address
484
484
  0xc0, 0xa8, 0x00, 0x0a,
485
- # IP Destination Address
485
+ # IP Destination Address
486
486
  0xc0, 0xa8, 0x00, 0x01,
487
- # UDP Source Port
487
+ # UDP Source Port
488
488
  0x00, 0x43,
489
- # UDP Destination Port
489
+ # UDP Destination Port
490
490
  0x00, 0x44,
491
- # UDP Total Length
491
+ # UDP Total Length
492
492
  0x01, 0x34,
493
- # UDP Header Checksum
493
+ # UDP Header Checksum
494
494
  0x1b, 0x64,
495
- # Bootp Msg Type
495
+ # Bootp Msg Type
496
496
  0x02,
497
- # Hw Type
497
+ # Hw Type
498
498
  0x01,
499
- # Hw Address Length
499
+ # Hw Address Length
500
500
  0x06,
501
- # Hops
501
+ # Hops
502
502
  0x00,
503
- # Transaction ID
503
+ # Transaction ID
504
504
  0xde, 0xad, 0xbe, 0xef,
505
- # Seconds
505
+ # Seconds
506
506
  0x00, 0x00,
507
- # Bootp Flags
507
+ # Bootp Flags
508
508
  0x00, 0x00,
509
- # Client IP Address
509
+ # Client IP Address
510
510
  0x00, 0x00, 0x00, 0x00,
511
- # Your IP Address
511
+ # Your IP Address
512
512
  0xc0, 0xa8, 0x00, 0x01,
513
- # Next Server IP Address
513
+ # Next Server IP Address
514
514
  0x00, 0x00, 0x00, 0x00,
515
- # Relay Agent IP Address
515
+ # Relay Agent IP Address
516
516
  0x00, 0x00, 0x00, 0x00,
517
- # Client MAC Address
517
+ # Client MAC Address
518
518
  0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff,
519
- # Client Hw Address Padding
519
+ # Client Hw Address Padding
520
520
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
521
- # Server Host Name
521
+ # Server Host Name
522
522
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
523
523
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
524
524
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -527,7 +527,7 @@ describe Pio::Dhcp, '.read' do
527
527
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
528
528
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
529
529
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
530
- # Boot File Name
530
+ # Boot File Name
531
531
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
532
532
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
533
533
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -544,23 +544,23 @@ describe Pio::Dhcp, '.read' do
544
544
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
545
545
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
546
546
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
547
- # Magic Cookie
547
+ # Magic Cookie
548
548
  0x63, 0x82, 0x53, 0x63,
549
- # DHCP Msg Type
549
+ # DHCP Msg Type
550
550
  0x35, 0x01, 0x05,
551
- # Renewal Time Value
551
+ # Renewal Time Value
552
552
  0x3a, 0x04, 0xde, 0xad, 0xbe, 0xef,
553
- # Rebinding Time Value
553
+ # Rebinding Time Value
554
554
  0x3b, 0x04, 0xde, 0xad, 0xbe, 0xef,
555
- # IP Address Lease Time Value
555
+ # IP Address Lease Time Value
556
556
  0x33, 0x04, 0xde, 0xad, 0xbe, 0xef,
557
- # DHCP Server Identifier
557
+ # DHCP Server Identifier
558
558
  0x36, 0x04, 0xc0, 0xa8, 0x00, 0x0a,
559
- # Subnet Mask
559
+ # Subnet Mask
560
560
  0x01, 0x04, 0xff, 0xff, 0xff, 0x00,
561
- # End Option
561
+ # End Option
562
562
  0xff,
563
- # Padding Field
563
+ # Padding Field
564
564
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
565
565
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
566
566
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,