def get_capture_port_names(cfg):
    """
    Returns name of ports for which capture is enabled.
    """
    names = []
    for cap in cfg.captures:
        if cap._properties.get("port_names"):
            for name in cap.port_names:
                if name not in names:
                    names.append(name)

    return names