def inet_ntoa(addr):
    """
        Do the reverse of inet_aton, return the quad notation of 'addr'
        which is a long containing the network address
    """
    quad = [0,0,0,0]
    
    for i in (0,1,2,3):
        quad[i] = (addr >> (8*(3-i))) & 0xFF
    return "%u.%u.%u.%u" % tuple(quad)