def lldp_caps_to_bits(caps, caps_map):
    """
    Convert list of LLDP capabilities names to integer,
    suitable to IGetLLDPNeighbors remote_capabilities

    :param caps: List of LLDP capabilities names
    :param caps_map: name -> LLDP_CAP_* mapping. Name in lowercase
    :return: IGetLLDPNeighbors.remote_capabilities
    """
    r = 0
    for cap in caps:
        cv = caps_map.get(cap.lower())
        if cv is not None:
            r += cv
    return r