'Retrieves information for an IP4 address.'

def RetrieveIP4Info(self, ip):

    if ip.is_private:
        return (IPInfo.INTERNAL, 'Internal    IP    address.')
    try:
        res = socket.getnameinfo((str(ip), 0), socket.NI_NAMEREQD)
        return (IPInfo.EXTERNAL, res[0])
    except (socket.error, socket.herror, socket.gaierror):
        return (IPInfo.EXTERNAL, 'Unknown    IP    address.')
