draios/sysdig — pull request #56 by kristopolous (2014-04-05 01:09:26+00:00)
Title: [9] resolve IP addresses into host names with asynch DNS lookups

This candidate branch has the following changes:

Inclusion of netdb.h in event.cpp for gethostname resolution

Introduction of char* sinsp_evt::get_binary_ipv4_as_host(void*
binary_address, char* buf) to do what it says on the tin.

A code split at PT_SOCKADDR to use the above parameter is a flag
is set at runtime (see below)

An introduction of a (currently unused) PF_DNS param_fmt (which loris
thinks is the way to go, but I can't see a reason for it, hence the
candidate status of the PR).

An introduction of a bool m_usedns (initialized to false in the
constructor) inside of sinsp with a getter and setter.

An addition of a -u short and --url long opt (the flag referred to
above) to turn on the feature of doing DNS resolution.

Currently, the code to enable it is in line 633:

inspector->use_dns(true);

Which utilizes the function referred to above.