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: - flow (UdpConnectionDissector) – UDP flow.
- udp (UdpDissector) – UDP packet.
Event triggered whenever a new UDP connection is about to be created.
- event udp_connection.events.end_connection(flow)¶
Parameters: - flow (UdpConnectionDissector) – UDP flow.
Event triggered whenever a new UDP connection is being closed.
- event udp_connection.events.receive_data(flow, payload, direction)¶
Parameters: - flow (UdpConnectionDissector) – UDP flow.
- payload (vbuffer) – Payload data.
- direction (string) – Data direction ('up' or 'down').
Event triggered when some data are available on a UDP connection.
- event udp_connection.events.receive_packet(flow, packet, direction)¶
Parameters: - flow (UdpConnectionDissector) – UDP flow.
- packet (UdpDissector) – Current receive UDP packet.
- direction (string) – Data direction ('up' or 'down').
Event triggered when a packet associated with the stream is received.
7.7.3. Helper¶
- dissector udp_connection.helper.UdpFlowDissector¶
- UdpFlowDissector.dissect(cls, flow)¶
Parameters: - cls – Current dissector class.
- flow (UdpConnectionDissector) – Parent Udp flow.
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.