def get_ipv4_string(ipv4):
    """ takes 32-bit integer and returns dotted ipv4 """
    return "%s.%s.%s.%s" % (
        (ipv4 & 0xff000000) >> 24,
        (ipv4 & 0xff0000) >> 16,
        (ipv4 & 0xff00) >> 8 ,
        ipv4 & 0xff
    )