openflow-protocol 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/structs/match.rb +12 -0
- 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: 28435d32c26d648a016d60341a62edf94bf8f8ec
|
4
|
+
data.tar.gz: 0429c85f80b866858be757db79de732cd6782106
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3161c4bbdd5a4d19838636d169bc71f79e28ab414bbbfdb324c45bda0099939806cf140a2a677cb2f33b67fea34b8e0404f54c8cb76f3623b48973cf19988da
|
7
|
+
data.tar.gz: d4a109d1b849be78cc8f076d1f2b683cd79e2389992add739ac76198add198a6372390e212e70554611e211f38ce20d5712b72b4fb3c3e76565fc8cd923a806b
|
data/lib/structs/match.rb
CHANGED
@@ -61,6 +61,18 @@ class OFMatch < BinData::Record
|
|
61
61
|
end
|
62
62
|
end
|
63
63
|
|
64
|
+
def self.create(options = {})
|
65
|
+
unless options[:wildcards]
|
66
|
+
options[:wildcards] = {}
|
67
|
+
%i(in_port vlan_id mac_source mac_destination mac_protocol ip_protocol source_port destination_port ip_source ip_destination vlan_pcp ip_tos).each do |flag|
|
68
|
+
wild_flag = flag
|
69
|
+
wild_flag = "#{flag}_all".to_sym if %i(ip_source ip_destination).include? flag
|
70
|
+
options[:wildcards][wild_flag] = true unless options[flag]
|
71
|
+
end
|
72
|
+
end
|
73
|
+
self.new options
|
74
|
+
end
|
75
|
+
|
64
76
|
endian :big
|
65
77
|
wildcards :wildcards
|
66
78
|
of_port_number :in_port, initial_value: 0
|