Function ndpi_match_string_protocol_id

Function Documentation

int ndpi_match_string_protocol_id(void *_automa, char *string_to_match, u_int match_len, u_int16_t *protocol_id, ndpi_protocol_category_t *category, ndpi_protocol_breed_t *breed)

Find a protocol id associated with a string automata

The automata initialized with ndpi_init_automa();

The (sub)string to search

The (sub)string length

The protocol id associated with the matched string or 0 id not found.

Returns:

0 in case of match, or -1 if no match, or -2 if an error occurred.