class PacketFu::ICMPPacket

ICMPPacket is used to construct ICMP Packets. They contain an EthHeader, an IPHeader, and a ICMPHeader.

Example

icmp_pkt.new
icmp_pkt.icmp_type = 8
icmp_pkt.icmp_code = 0
icmp_pkt.payload = "ABC, easy as 123. As simple as do-re-mi. ABC, 123, baby, you and me!"

icmp_pkt.ip_saddr="1.2.3.4"
icmp_pkt.ip_daddr="5.6.7.8"

icmp_pkt.recalc    
icmp_pkt.to_f('/tmp/icmp.pcap')

Parameters

:eth
 A pre-generated EthHeader object.
:ip
 A pre-generated IPHeader object.
:flavor
 TODO: Sets the "flavor" of the ICMP packet. Pings, in particular, often betray their true
 OS.
:config
 A hash of return address details, often the output of Utils.whoami?