Module: PacketFu::ICMPHeaderMixin
- Included in:
- ICMPPacket
- Defined in:
- lib/packetfu/protos/icmp/mixin.rb
Overview
This Mixin simplifies access to the ICMPHeaders. Mix this in with your packet interface, and it will add methods that essentially delegate to the ‘icmp_header’ method (assuming that it is a ICMPHeader object)
Instance Method Summary collapse
- #icmp_calc_sum ⇒ Object
- #icmp_code ⇒ Object
- #icmp_code=(v) ⇒ Object
- #icmp_recalc(*v) ⇒ Object
- #icmp_sum ⇒ Object
- #icmp_sum=(v) ⇒ Object
- #icmp_sum_readable ⇒ Object
- #icmp_type ⇒ Object
- #icmp_type=(v) ⇒ Object
Instance Method Details
#icmp_calc_sum ⇒ Object
13 |
# File 'lib/packetfu/protos/icmp/mixin.rb', line 13 def icmp_calc_sum; self.icmp_header.icmp_calc_sum; end |
#icmp_code ⇒ Object
10 |
# File 'lib/packetfu/protos/icmp/mixin.rb', line 10 def icmp_code; self.icmp_header.icmp_code; end |
#icmp_code=(v) ⇒ Object
9 |
# File 'lib/packetfu/protos/icmp/mixin.rb', line 9 def icmp_code=(v); self.icmp_header.icmp_code= v; end |
#icmp_recalc(*v) ⇒ Object
14 |
# File 'lib/packetfu/protos/icmp/mixin.rb', line 14 def icmp_recalc(*v); self.icmp_header.icmp_recalc(*v); end |
#icmp_sum ⇒ Object
12 |
# File 'lib/packetfu/protos/icmp/mixin.rb', line 12 def icmp_sum; self.icmp_header.icmp_sum; end |
#icmp_sum=(v) ⇒ Object
11 |
# File 'lib/packetfu/protos/icmp/mixin.rb', line 11 def icmp_sum=(v); self.icmp_header.icmp_sum= v; end |
#icmp_sum_readable ⇒ Object
15 |
# File 'lib/packetfu/protos/icmp/mixin.rb', line 15 def icmp_sum_readable; self.icmp_header.icmp_sum_readable; end |
#icmp_type ⇒ Object
8 |
# File 'lib/packetfu/protos/icmp/mixin.rb', line 8 def icmp_type; self.icmp_header.icmp_type; end |
#icmp_type=(v) ⇒ Object
7 |
# File 'lib/packetfu/protos/icmp/mixin.rb', line 7 def icmp_type=(v); self.icmp_header.icmp_type= v; end |