(args)
return
Config the DVB interface(s) and the host
Config the DVB interface(s) and the host
Config the DVB interface ( s ) and the host
def usb_config(args):
    """Config the DVB interface(s) and the host"""
    common_params = _common(args)
    if (common_params is None):
        return
    user_info, adapter, frontend = common_params

    # Check if dependencies other than dvbnet are installed
    apps = ["ip"]
    if not args.skip_firewall:
        apps.append("iptables")
    if (not dependencies.check_apps(apps)):
        return

    # Configure the subprocess runner
    runner.set_dry(args.dry_run)

    if args.ip is None:
        ips = ip.compute_rx_ips(user_info['sat']['ip'], len(args.pid))
    else:
        ips = args.ip

    assert (all(["/" in x
                 for x in ips])), "Please provide IPs in CIDR notation"

    assert(len(args.pid) == len(ips)), \
        "Please define one IP address for each PID."

    # dvbnet interfaces of interest
    #
    # NOTE: there is one dvbnet interface per PID. Each interface will have a
    # different IP address.
    net_ifs = list()
    for i_device in range(0, len(args.pid)):
        # Define interface name that is going to be generated by dvbnet
        net_if = "dvb" + adapter + "_" + str(i_device)
        net_ifs.append(net_if)

    # Create the dvbnet interface(s)
    _dvbnet(adapter, net_ifs, args.pid, ule=args.ule)

    # Set RP filters
    if (not args.skip_rp):
        rp.set_filters(net_ifs, prompt=(not args.yes), dry=args.dry_run)

    # Set firewall rules
    if (not args.skip_firewall):
        firewall.configure(net_ifs,
                           defs.src_ports,
                           user_info['sat']['ip'],
                           prompt=(not args.yes),
                           dry=args.dry_run)

    # Set IP
    ip.set_ips(net_ifs, ips, dry=runner.dry)

    util.print_header("Next Step")
    print("Run:\n\nblocksat-cli usb launch\n")

    return
def usb_config ( args ) : common_params = _common ( args ) if ( common_params is None ) : return user_info , adapter , frontend = common_params # Check if dependencies other than dvbnet are installed apps = [ "ip" ] if not args . skip_firewall : apps . append ( "iptables" ) if ( not dependencies . check_apps ( apps ) ) : return # Configure the subprocess runner runner . set_dry ( args . dry_run ) if args . ip is None : ips = ip . compute_rx_ips ( user_info [ 'sat' ] [ 'ip' ] , len ( args . pid ) ) else : ips = args . ip assert ( all ( [ "/" in x for x in ips ] ) ) , "Please provide IPs in CIDR notation" assert ( len ( args . pid ) == len ( ips ) ) , "Please define one IP address for each PID." # dvbnet interfaces of interest # # NOTE: there is one dvbnet interface per PID. Each interface will have a # different IP address. net_ifs = list ( ) for i_device in range ( 0 , len ( args . pid ) ) : # Define interface name that is going to be generated by dvbnet net_if = "dvb" + adapter + "_" + str ( i_device ) net_ifs . append ( net_if ) # Create the dvbnet interface(s) _dvbnet ( adapter , net_ifs , args . pid , ule = args . ule ) # Set RP filters if ( not args . skip_rp ) : rp . set_filters ( net_ifs , prompt = ( not args . yes ) , dry = args . dry_run ) # Set firewall rules if ( not args . skip_firewall ) : firewall . configure ( net_ifs , defs . src_ports , user_info [ 'sat' ] [ 'ip' ] , prompt = ( not args . yes ) , dry = args . dry_run ) # Set IP ip . set_ips ( net_ifs , ips , dry = runner . dry ) util . print_header ( "Next Step" ) print ( "Run:\n\nblocksat-cli usb launch\n" ) return