pio 0.10.0 → 0.10.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/CHANGELOG.md +6 -0
- data/lib/pio/packet_out.rb +1 -1
- data/lib/pio/strip_vlan_header.rb +23 -9
- data/lib/pio/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83d7de827392e1205ebc738b0f64a580896c1dfe
|
4
|
+
data.tar.gz: be008400a4a153f01e08359f6f678e37768b0c5e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 130670982b983d7766bcdbc0aa6ed5a414c34b0f104a4e1d4ee0cb7bdef7cd3410a51a65669e29e7db79667c69dd155d881b35c63f2cf610d25df924dceb7253
|
7
|
+
data.tar.gz: 280c8072f117262fa5a6865a96f42ce1437cddef488e157d8ab6ea7fe1972591774844b0a9f12d873d11be2611a835f13244fd980b07266055fde676896d3ceb
|
data/CHANGELOG.md
CHANGED
data/lib/pio/packet_out.rb
CHANGED
@@ -1,19 +1,33 @@
|
|
1
1
|
require 'bindata'
|
2
|
+
require 'forwardable'
|
2
3
|
|
3
4
|
module Pio
|
4
5
|
# An action to strip the 802.1q header.
|
5
|
-
class StripVlanHeader
|
6
|
-
|
6
|
+
class StripVlanHeader
|
7
|
+
# OpenFlow 1.0 OFPAT_STRIP_VLAN action format.
|
8
|
+
class Format < BinData::Record
|
9
|
+
endian :big
|
7
10
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
11
|
+
uint16 :type, value: 3
|
12
|
+
uint16 :message_length, value: 8
|
13
|
+
uint32 :padding
|
14
|
+
hide :padding
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.read(raw_data)
|
18
|
+
strip_vlan = allocate
|
19
|
+
strip_vlan.instance_variable_set :@format, Format.read(raw_data)
|
20
|
+
strip_vlan
|
21
|
+
end
|
22
|
+
|
23
|
+
extend Forwardable
|
12
24
|
|
13
|
-
|
25
|
+
def_delegators :@format, :type
|
26
|
+
def_delegators :@format, :message_length
|
27
|
+
def_delegator :@format, :to_binary_s, :to_binary
|
14
28
|
|
15
|
-
def
|
16
|
-
|
29
|
+
def initialize
|
30
|
+
@format = Format.new
|
17
31
|
end
|
18
32
|
end
|
19
33
|
end
|
data/lib/pio/version.rb
CHANGED