Class: OFMatch
- Inherits:
-
BinData::Record
- Object
- BinData::Record
- OFMatch
- Defined in:
- lib/structs/match.rb
Defined Under Namespace
Classes: Wildcards
Class Method Summary collapse
Class Method Details
.create(options = {}) ⇒ Object
64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/structs/match.rb', line 64 def self.create( = {}) unless [:wildcards] [:wildcards] = {} %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| wild_flag = flag wild_flag = "#{flag}_all".to_sym if %i(ip_source ip_destination).include? flag [:wildcards][wild_flag] = true unless [flag] end end self.new end |