Function ndpi_get_host_domain_suffix

Function Documentation

const char *ndpi_get_host_domain_suffix(struct ndpi_detection_module_struct *ndpi_str, const char *hostname, u_int16_t *suffix_id)

Returns the domain suffix out of the specified hostname. The returned pointer is an offset of the original hostname. Note that you need to call ndpi_load_domain_suffixes() before calling this function.

ndpi_str = the struct created for the protocol detection
hostname = the hostname from which the domain name has to be extracted
suffix_id = the id of the returned domain
Return
The host domain name suffic or the host itself if not found.