11.8.  Post-dissection packet analysis

11.8.1. Listener

A Listener, is called once for every packet that matches a certain filter or has a certain tap. It can read the tree, the packet's Tvb eventually the tapped data but it cannot add elements to the tree.

11.8.1.1. Listener.new([tap], [filter])

Creates a new Listener listener

11.8.1.1.1. Arguments
tap (optional)

The name of this tap

filter (optional)

A filter that when matches the tap.packet function gets called (use nil to be called for every packet)

11.8.1.1.2. Returns

The newly created Listener listener object

11.8.1.1.3. Errors
  • tap registration error

11.8.1.2. listener:remove()

Removes a tap listener

11.8.1.3. listener:__tostring()

Generates a string of debug info for the tap listener

11.8.1.4. listener.packet

A function that will be called once every packet matches the Listener listener filter. function tap.packet(pinfo,tvb,tapinfo) ... end Note: tapinfo is a table of info based on the Listener's type, or nil.

11.8.1.5. listener.draw

A function that will be called once every few seconds to redraw the gui objects; in tshark this funtion is called only at the very end of the capture file. function tap.draw() ... end

11.8.1.6. listener.reset

A function that will be called at the end of the capture run. function tap.reset() ... end