import ipaddress


def is_valid_ipv4(address):
    """Check an IPv4 address for validity"""
    try:
        ip = ipaddress.ip_address(address)
    except ValueError:
        return False
    if not isinstance(ip, ipaddress.IPv4Address):
        return False
    warning = None
    if ip.is_loopback:
        warning = "loopback address"
    elif ip.is_multicast:
        warning = "multicast address"
    elif ip.is_reserved:
        warning = "reserved address"
    elif ip.is_link_local:
        warning = "link-local address"
    elif ip.is_unspecified:
        warning = "unspecified address"
    elif ip.is_private:
        warning = "private address"
    elif address.endswith(".0") or address.endswith(".255"):
        warning = "potential broadcast address"

    if warning:
        print("*** Warning: {} is a {}".format(address, warning))

    return True