Class: Infrataster::Plugin::Firewall::Transfer
- Inherits:
-
Object
- Object
- Infrataster::Plugin::Firewall::Transfer
- Defined in:
- lib/infrataster/plugin/firewall/transfer.rb
Overview
Represent transfer
Instance Method Summary collapse
-
#initialize(src_node, dest_node, options = {}) ⇒ Transfer
constructor
A new instance of Transfer.
- #reachable? ⇒ Boolean
Constructor Details
#initialize(src_node, dest_node, options = {}) ⇒ Transfer
Returns a new instance of Transfer.
7 8 9 10 11 12 13 14 |
# File 'lib/infrataster/plugin/firewall/transfer.rb', line 7 def initialize(src_node, dest_node, = {}) @src_node = src_node @dest_node = dest_node @protocol = [:protocol] ? [:protocol] : :icmp @dest_port = [:dest_port] ? [:dest_port] : 80 @source_port = [:source_port] ? [:source_port] : nil @ack = [:ack] ? [:ack] : nil end |
Instance Method Details
#reachable? ⇒ Boolean
16 17 18 19 20 21 22 23 |
# File 'lib/infrataster/plugin/firewall/transfer.rb', line 16 def reachable? case @protocol when :icmp icmp_reachable? when :tcp, :udp transport_reachable? end end |