예제 #1
0
            dest = "do_dad", action="store_true", default= False,
            help="perform a Duplicate Address Detection on the newly build address")
            


    opt, args = parser.parse_args(sys.argv[1:])

    if len(args) != 0:
        print "too much arguments given"
        print parser.print_help()
        sys.exit(-1)

    # parse the extensions
    exec ( "extensions =" +  opt.extensions )
 
    NDprotector.assign_addresses = opt.do_dad
    addr = Address(prefix = opt.prefix,
                   address = opt.address,
                   modifier = opt.modifier,
                   sec = opt.sec,
                   collcount = opt.collcount,
                   key = opt.key,
                   ext = extensions, 
                   dad = opt.do_dad,
                   interface = opt.interface)
           

    print addr.config_dump()
    if opt.do_dad:
        addr.remove()
예제 #2
0
        dest="do_dad",
        action="store_true",
        default=False,
        help="perform a Duplicate Address Detection on the newly build address"
    )

    opt, args = parser.parse_args(sys.argv[1:])

    if len(args) != 0:
        print "too much arguments given"
        print parser.print_help()
        sys.exit(-1)

    # parse the extensions
    exec("extensions =" + opt.extensions)

    NDprotector.assign_addresses = opt.do_dad
    addr = Address(prefix=opt.prefix,
                   address=opt.address,
                   modifier=opt.modifier,
                   sec=opt.sec,
                   collcount=opt.collcount,
                   key=opt.key,
                   ext=extensions,
                   dad=opt.do_dad,
                   interface=opt.interface)

    print addr.config_dump()
    if opt.do_dad:
        addr.remove()