7.7. Udp Connection

Udp state-full dissector module.

Usage:

local udp_connection = require('protocol/udp_connection')

7.7.1. Dissector

dissector UdpConnectionDissector
Name :'udp_connection'
Extend :haka.helper.FlowDissector 

State-full dissector for UDP. It will associate each UDP packet with its matching connection.

<UdpConnectionDissector>.srcip
<UdpConnectionDissector>.dstip
Type:ipv4.addr 

Connection IP informations.

<UdpConnectionDissector>.srcport
<UdpConnectionDissector>.dstport
Type:number

Connection port informations.

<UdpConnectionDissector>:drop()

Drop the UDP connection. All future packets that belong to this connection will be silently dropped for a few seconds.

7.7.2. Events

event udp_connection.events.new_connection(flow, udp)
Parameters:

Event triggered whenever a new UDP connection is about to be created.

event udp_connection.events.end_connection(flow)
Parameters:

Event triggered whenever a new UDP connection is being closed.

event udp_connection.events.receive_data(flow, payload, direction)
Parameters:

Event triggered when some data are available on a UDP connection.

7.7.3. Helper

dissector udp_connection.helper.UdpFlowDissector
UdpFlowDissector.dissect(cls, flow)
Parameters:

Enable the dissector on a given flow.

UdpFlowDissector.install_udp_rule(cls, port)
Parameters:
  • cls – Current dissector class.
  • port (number) – Udp port to select.

Create a security rule to enable the dissector on a given flow.

<UdpFlowDissector>.__init(flow)
Param flow:Parent Udp flow.
Ptype flow:UdpConnectionDissector
<UdpFlowDissector>.flow
Type:UdpConnectionDissector 

Underlying Udp stream.