Function ndpi_detection_process_packet

Function Documentation

ndpi_protocol ndpi_detection_process_packet(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow, const unsigned char *packet, const unsigned short packetlen, const u_int64_t packet_time_ms, const struct ndpi_flow_input_info *input_info)

Processes one packet and returns the ID of the detected protocol. This is the MAIN PACKET PROCESSING FUNCTION.

ndpi_struct = the detection module
flow = pointer to the connection state machine
packet = unsigned char pointer to the Layer 3 (IP header)
packetlen = the length of the packet
packet_time_ms = the current timestamp for the packet (expressed in msec)
input_info = (optional) flow information provided by the (external) flow manager
Return
the detected ID of the protocol