7.3. Icmp

Icmp dissector module.

Usage:

local icmp = require('protocol/icmp')

7.3.1. Dissector

dissector IcmpDissector
Name :'icmp'
Extend :haka.helper.PacketDissector 

ICMP packet dissector.

icmp.create(ip[, init]) → icmp
Parameters:
  • ip (Ipv4Dissector) – IPv4 packet.
  • init (table) – Optional initialization data.
Returns:

Create a new ICMP packet on top of the given IP packet.

<IcmpDissector>.type
<IcmpDissector>.code
<IcmpDissector>.checksum
Type:number

ICMP fields.

<IcmpDissector>.payload
Type:vbuffer 

Payload of the packet.

7.3.2. Events

event tcp.events.receive_packet(pkt)
Parameters:

Event that is triggered whenever a new packet is received.

event tcp.events.send_packet(pkt)
Parameters:

Event that is triggered just before sending a packet on the network.