import struct
import socket


def inet_ntoa(n):
    """Convert an int into an IP addr in IPv4 dot notation.

    n       IP address

    returns string
    """
    b = struct.pack('!I', n)
    return socket.inet_ntoa(b)