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)
-
- (FilterAction) action
Gets the actions of what to do if the ingress traffic matches the filter rules.
-
- (PacketFilterStatistics) all_statistics
Gets the statistics for all the packet filter rules.
-
- (Object) create(opts)
Creates this packet filter rules.
-
- (Object) delete_all_packet_filters
Deletes all packet filter.
-
- (Object) delete_packet_filter
Deletes this packet filter rules.
-
- (String) expression
Gets the expressions used to match ingress traffic.
-
- (String) list
Gets a list of all packet filter rules.
-
- (EnabledState) log_state
Gets the states that specify whether an entry will be created in the system log each time the rule is matched.
-
- (String) rate_class
Gets the rate classes that will be used to rate limit the traffic.
-
- (Object) reset_statistics
Resets the statistics for this pools.
-
- (Object) set_action(opts)
Sets the actions of what to do if the ingress traffic matches the filter rules.
-
- (Object) set_expression(opts)
Sets the expressions used to match ingress traffic.
-
- (Object) set_log_state(opts)
Sets the states that specify whether an entry will be created in the system log each time the rule is matched.
-
- (Object) set_rate_class(opts)
Sets the rate classes that will be used to rate limit the traffic.
-
- (Object) set_sort_order(opts)
Sets the sort orders of this filter rules.
-
- (Object) set_vlan(opts)
Sets the optional ingress VLANs to match on.
-
- (long) sort_order
Gets the sort orders of this filter rules.
-
- (PacketFilterStatistics) statistics
Gets the statistics for this packet filter.
-
- (String) version
Gets the version information for this interface.
-
- (String) vlan
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
- (FilterAction) action
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 |
- (PacketFilterStatistics) all_statistics
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 |
- (Object) create(opts)
Creates this packet filter rules.
23 24 25 26 |
# File 'lib/icontrol/networking/packet_filter.rb', line 23 def create(opts) check_params(opts,[:sort_orders,:actions,:expressions]) super end |
- (Object) delete_all_packet_filters
Deletes all packet filter.
34 35 36 |
# File 'lib/icontrol/networking/packet_filter.rb', line 34 def delete_all_packet_filters super end |
- (Object) delete_packet_filter
Deletes this packet filter rules.
44 45 46 |
# File 'lib/icontrol/networking/packet_filter.rb', line 44 def delete_packet_filter super end |
- (String) expression
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 |
- (String) list
Gets a list of all packet filter rules.
91 92 93 |
# File 'lib/icontrol/networking/packet_filter.rb', line 91 def list super end |
- (EnabledState) log_state
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 |
- (String) rate_class
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 |
- (Object) reset_statistics
Resets the statistics for this pools.
170 171 172 |
# File 'lib/icontrol/networking/packet_filter.rb', line 170 def reset_statistics super end |
- (Object) set_action(opts)
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) check_params(opts,[:actions]) super end |
- (Object) set_expression(opts)
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) check_params(opts,[:expressions]) super end |
- (Object) set_log_state(opts)
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) check_params(opts,[:states]) super end |
- (Object) set_rate_class(opts)
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) check_params(opts,[:rate_classes]) super end |
- (Object) set_sort_order(opts)
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) check_params(opts,[:orders]) super end |
- (Object) set_vlan(opts)
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) check_params(opts,[:vlan_names]) super end |
- (long) sort_order
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 |
- (PacketFilterStatistics) statistics
Gets the statistics for this packet filter.
141 142 143 |
# File 'lib/icontrol/networking/packet_filter.rb', line 141 def statistics super end |
- (String) version
Gets the version information for this interface.
149 150 151 |
# File 'lib/icontrol/networking/packet_filter.rb', line 149 def version super end |
- (String) vlan
Gets the optional ingress VLANs to match on.
160 161 162 |
# File 'lib/icontrol/networking/packet_filter.rb', line 160 def vlan super end |