def in6_addrtovendor(addr):
    """
    Extract the MAC address from a modified EUI-64 constructed IPv6
    address provided and use the IANA oui.txt file to get the vendor.
    The database used for the conversion is the one loaded by Scapy
    from a Wireshark installation if discovered in a well-known
    location. None is returned on error, "UNKNOWN" if the vendor is
    unknown.
    """
    mac = in6_addrtomac(addr)
    if mac is None or conf.manufdb is None:
        return None

    res = conf.manufdb._get_manuf(mac)
    if len(res) == 17 and res.count(':') != 5:  # Mac address, i.e. unknown
        res = "UNKNOWN"

    return res
Extract the MAC address from a modified EUI-64 constructed IPv6
    address provided and use the IANA oui.txt file to get the vendor.
    The database used for the conversion is the one loaded by Scapy
    from a Wireshark installation if discovered in a well-known
    location. None is returned on error, "UNKNOWN" if the vendor is
    unknown.