Class: IControl::Networking::PacketFilter
- Inherits:
-
Base
- Object
- Base
- IControl::Networking::PacketFilter
- Defined in:
- lib/icontrol/networking/packet_filter.rb,
lib/icontrol/networking.rb
Overview
The PacketFilter interface enables you to work with the definitions and attributes of packet filter rules. The goal of the packet filter is to provide a flexible and integrated perimeter security mechanism to explicitly block as well as accept traffic using complex expressions similar to those used by libpcap (e.g. tcpdump).
Defined Under Namespace
Classes: PacketFilterStatisticEntry, PacketFilterStatisticEntrySequence, PacketFilterStatistics
Instance Method Summary collapse
-
#action ⇒ FilterAction
Gets the actions of what to do if the ingress traffic matches the filter rules.
-
#all_statistics ⇒ PacketFilterStatistics
Gets the statistics for all the packet filter rules.
-
#create(opts) ⇒ Object
Creates this packet filter rules.
-
#delete_all_packet_filters ⇒ Object
Deletes all packet filter.
-
#delete_packet_filter ⇒ Object
Deletes this packet filter rules.
-
#expression ⇒ String
Gets the expressions used to match ingress traffic.
-
#list ⇒ String
Gets a list of all packet filter rules.
-
#log_state ⇒ EnabledState
Gets the states that specify whether an entry will be created in the system log each time the rule is matched.
-
#rate_class ⇒ String
Gets the rate classes that will be used to rate limit the traffic.
-
#reset_statistics ⇒ Object
Resets the statistics for this pools.
-
#set_action(opts) ⇒ Object
Sets the actions of what to do if the ingress traffic matches the filter rules.
-
#set_expression(opts) ⇒ Object
Sets the expressions used to match ingress traffic.
-
#set_log_state(opts) ⇒ Object
Sets the states that specify whether an entry will be created in the system log each time the rule is matched.
-
#set_rate_class(opts) ⇒ Object
Sets the rate classes that will be used to rate limit the traffic.
-
#set_sort_order(opts) ⇒ Object
Sets the sort orders of this filter rules.
-
#set_vlan(opts) ⇒ Object
Sets the optional ingress VLANs to match on.
-
#sort_order ⇒ long
Gets the sort orders of this filter rules.
-
#statistics ⇒ PacketFilterStatistics
Gets the statistics for this packet filter.
-
#version ⇒ String
Gets the version information for this interface.
-
#vlan ⇒ String
Gets the optional ingress VLANs to match on.
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class IControl::Base
Instance Method Details
#action ⇒ FilterAction
Gets the actions of what to do if the ingress traffic matches the filter rules.
55 56 57 |
# File 'lib/icontrol/networking/packet_filter.rb', line 55 def action super end |
#all_statistics ⇒ PacketFilterStatistics
Gets the statistics for all the packet filter rules.
66 67 68 |
# File 'lib/icontrol/networking/packet_filter.rb', line 66 def all_statistics super end |
#create(opts) ⇒ Object
Creates this packet filter rules.
23 24 25 26 |
# File 'lib/icontrol/networking/packet_filter.rb', line 23 def create(opts) opts = check_params(opts,[:sort_orders,:actions,:expressions]) super(opts) end |
#delete_all_packet_filters ⇒ Object
Deletes all packet filter.
34 35 36 |
# File 'lib/icontrol/networking/packet_filter.rb', line 34 def delete_all_packet_filters super end |
#delete_packet_filter ⇒ Object
Deletes this packet filter rules.
44 45 46 |
# File 'lib/icontrol/networking/packet_filter.rb', line 44 def delete_packet_filter super end |
#expression ⇒ String
Gets the expressions used to match ingress traffic. Each expression is defined by the pcap library, which is used to implement tcpdump, and is compiled into a Berkeley Packet Filter program. The man page for tcpdump describes the format and valid syntax of the filter rule expression.
80 81 82 |
# File 'lib/icontrol/networking/packet_filter.rb', line 80 def expression super end |
#list ⇒ String
Gets a list of all packet filter rules.
91 92 93 |
# File 'lib/icontrol/networking/packet_filter.rb', line 91 def list super end |
#log_state ⇒ EnabledState
Gets the states that specify whether an entry will be created in the system log each time the rule is matched.
103 104 105 |
# File 'lib/icontrol/networking/packet_filter.rb', line 103 def log_state super end |
#rate_class ⇒ String
Gets the rate classes that will be used to rate limit the traffic. If the rule has an associated Rate Class name, then any traffic allowed by the rule will also be rate limited according to the behavior of this rate class. It is meaningless to associate a rate class with a rule that has a discard or reject action. Likewise, the rate class will only take effect when the traffic actually leaves the system. If the traffic does not leave the system, the rate class has no effect.
119 120 121 |
# File 'lib/icontrol/networking/packet_filter.rb', line 119 def rate_class super end |
#reset_statistics ⇒ Object
Resets the statistics for this pools.
170 171 172 |
# File 'lib/icontrol/networking/packet_filter.rb', line 170 def reset_statistics super end |
#set_action(opts) ⇒ Object
Sets the actions of what to do if the ingress traffic matches the filter rules.
182 183 184 185 |
# File 'lib/icontrol/networking/packet_filter.rb', line 182 def set_action(opts) opts = check_params(opts,[:actions]) super(opts) end |
#set_expression(opts) ⇒ Object
Sets the expressions used to match ingress traffic. Each expression is defined by the pcap library, which is used to implement tcpdump, and is compiled into a Berkeley Packet Filter program. The man page for tcpdump describes the format and valid syntax of the filter rule expression.
198 199 200 201 |
# File 'lib/icontrol/networking/packet_filter.rb', line 198 def set_expression(opts) opts = check_params(opts,[:expressions]) super(opts) end |
#set_log_state(opts) ⇒ Object
Sets the states that specify whether an entry will be created in the system log each time the rule is matched.
212 213 214 215 |
# File 'lib/icontrol/networking/packet_filter.rb', line 212 def set_log_state(opts) opts = check_params(opts,[:states]) super(opts) end |
#set_rate_class(opts) ⇒ Object
Sets the rate classes that will be used to rate limit the traffic. If the rule has an associated Rate Class name, then any traffic allowed by the rule will also be rate limited according to the behavior of this rate class. It is meaningless to associate a rate class with a rule that has a discard or reject action. Likewise, the rate class will only take effect when the traffic actually leaves the system. If the traffic does not leave the system, the rate class has no effect.
230 231 232 233 |
# File 'lib/icontrol/networking/packet_filter.rb', line 230 def set_rate_class(opts) opts = check_params(opts,[:rate_classes]) super(opts) end |
#set_sort_order(opts) ⇒ Object
Sets the sort orders of this filter rules.
243 244 245 246 |
# File 'lib/icontrol/networking/packet_filter.rb', line 243 def set_sort_order(opts) opts = check_params(opts,[:orders]) super(opts) end |
#set_vlan(opts) ⇒ Object
Sets the optional ingress VLANs to match on.
256 257 258 259 |
# File 'lib/icontrol/networking/packet_filter.rb', line 256 def set_vlan(opts) opts = check_params(opts,[:vlan_names]) super(opts) end |
#sort_order ⇒ long
Gets the sort orders of this filter rules.
130 131 132 |
# File 'lib/icontrol/networking/packet_filter.rb', line 130 def sort_order super end |
#statistics ⇒ PacketFilterStatistics
Gets the statistics for this packet filter.
141 142 143 |
# File 'lib/icontrol/networking/packet_filter.rb', line 141 def statistics super end |
#version ⇒ String
Gets the version information for this interface.
149 150 151 |
# File 'lib/icontrol/networking/packet_filter.rb', line 149 def version super end |
#vlan ⇒ String
Gets the optional ingress VLANs to match on.
160 161 162 |
# File 'lib/icontrol/networking/packet_filter.rb', line 160 def vlan super end |