Function ndpi_get_host_domain

Function Documentation

const char *ndpi_get_host_domain(struct ndpi_detection_module_struct *ndpi_str, const char *hostname)

Returns the domain (including the TLS) 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
Return
The host domain name or the hosti tself if not found.