'Returns a reverse dns name if available.
:param addr: IP Address
:type addr: ~.common.Addr
:returns: name or empty string if name cannot be determined
:rtype: str'

def get_name_from_ip(self, addr):

    if (not common.private_ips_regex.match(addr.get_addr())):
        try:
            socket.inet_aton(addr.get_addr())
            return socket.gethostbyaddr(addr.get_addr())[0]
        except (socket.error, socket.herror, socket.timeout):
            pass
    return ''
