Lines Matching refs:optarg

591 static void parse_addr(int family, void *addr, const char *optarg)  in parse_addr()  argument
595 ret = inet_pton(family, optarg, addr); in parse_addr()
602 static void parse_addr4(struct sockaddr_in *addr, const char *optarg) in parse_addr4() argument
604 parse_addr(AF_INET, &addr->sin_addr, optarg); in parse_addr4()
607 static void parse_addr6(struct sockaddr_in6 *addr, const char *optarg) in parse_addr6() argument
609 parse_addr(AF_INET6, &addr->sin6_addr, optarg); in parse_addr6()
612 static int parse_protocol_family(const char *filepath, const char *optarg) in parse_protocol_family() argument
614 if (!strcmp(optarg, "4")) in parse_protocol_family()
616 if (!strcmp(optarg, "6")) in parse_protocol_family()
632 parse_addr4(&out_daddr4, optarg); in parse_opts()
634 parse_addr6(&out_daddr6, optarg); in parse_opts()
640 parse_addr4(&in_daddr4, optarg); in parse_opts()
642 parse_addr6(&in_daddr6, optarg); in parse_opts()
645 if (!strcmp(optarg, "gre")) in parse_opts()
647 else if (!strcmp(optarg, "gue")) in parse_opts()
649 else if (!strcmp(optarg, "bare")) in parse_opts()
651 else if (!strcmp(optarg, "none")) in parse_opts()
657 cfg_src_port = strtol(optarg, NULL, 0); in parse_opts()
666 if (!strcmp(optarg, "4")) in parse_opts()
668 else if (!strcmp(optarg, "6")) in parse_opts()
674 cfg_payload_len = strtol(optarg, NULL, 0); in parse_opts()
677 cfg_num_pkt = strtol(optarg, NULL, 0); in parse_opts()
680 cfg_l3_outer = parse_protocol_family(argv[0], optarg); in parse_opts()
683 cfg_l3_extra = parse_protocol_family(argv[0], optarg); in parse_opts()
690 parse_addr4(&out_saddr4, optarg); in parse_opts()
692 parse_addr6(&out_saddr6, optarg); in parse_opts()
696 parse_addr4(&in_saddr4, optarg); in parse_opts()
698 parse_addr6(&in_saddr6, optarg); in parse_opts()
701 cfg_num_secs = strtol(optarg, NULL, 0); in parse_opts()
707 cfg_dsfield_outer = strtol(optarg, NULL, 0); in parse_opts()
710 cfg_dsfield_inner = strtol(optarg, NULL, 0); in parse_opts()