Home
last modified time | relevance | path

Searched refs:av (Results 1 – 25 of 234) sorted by relevance

12345678910

/freebsd/crypto/openssh/regress/unittests/misc/
H A Dtest_argv.c28 char **av = NULL; in test_argv() local
33 argv_free(av, ac); \ in test_argv()
34 av = NULL; \ in test_argv()
39 ASSERT_INT_EQ(argv_split("", &ac, &av, 0), 0); in test_argv()
41 ASSERT_PTR_NE(av, NULL); in test_argv()
42 ASSERT_PTR_EQ(av[0], NULL); in test_argv()
44 ASSERT_INT_EQ(argv_split(" ", &ac, &av, 0), 0); in test_argv()
46 ASSERT_PTR_NE(av, NULL); in test_argv()
47 ASSERT_PTR_EQ(av[0], NULL); in test_argv()
52 ASSERT_INT_EQ(argv_split("leamas", &ac, &av, 0), 0); in test_argv()
[all …]
/freebsd/sbin/ipfw/
H A Dmain.c110 char **av, **save_av; in ipfw_main() local
167 av = safe_calloc(av_size, 1); in ipfw_main()
174 av_p = (char *)&av[ac+1]; in ipfw_main()
180 av[ac] = av_p; in ipfw_main()
205 av = safe_calloc(av_size, 1); in ipfw_main()
211 av_p = (char *)&av[oldac+1]; in ipfw_main()
219 av[ac] = av_p; in ipfw_main()
236 av[0] = oldav[0]; in ipfw_main()
237 av[ac] = NULL; in ipfw_main()
245 !strcmp(av[1], "sysctl")) { in ipfw_main()
[all …]
H A Dipfw2.c94 if (!av[0]) \
96 if (_substrcmp(*av, "tablearg") == 0) { \
105 _xval = strtol(*av, &end, 10); \
107 if (!isdigit(**av) || *end != '\0' || (_xval == 0 && errno == EINVAL)) \
109 match_value(s_x, tok), *av); \
113 match_value(s_x, tok), min, max, *av); \
117 match_value(s_x, tok), *av); \
414 ipfw_cfg_lheader *cfg, size_t sz, int ac, char **av);
1055 fill_newports(ipfw_insn_u16 *cmd, char *av, int proto, int cblen) in fill_newports() argument
1059 char *s = av; in fill_newports()
1104 fill_dscp(ipfw_insn * cmd,char * av,int cblen) fill_dscp() argument
1149 fill_mark(ipfw_insn * cmd,char * av,int cblen) fill_mark() argument
1438 fill_icmptypes(ipfw_insn_u32 * cmd,char * av) fill_icmptypes() argument
2522 ipfw_sets_handler(char * av[]) ipfw_sets_handler() argument
2634 ipfw_sysctl_handler(char * av[],int which) ipfw_sysctl_handler() argument
2852 ipfw_list(int ac,char * av[],int show_counters) ipfw_list() argument
2913 ipfw_show_config(struct cmdline_opts * co,struct format_opts * fo,ipfw_cfg_lheader * cfg,size_t sz,int ac,char * av[]) ipfw_show_config() argument
3209 fill_table(struct _ipfw_insn * cmd,char * av,uint8_t opcode,struct tidx * tstate) fill_table() argument
3248 fill_ip(ipfw_insn_ip * cmd,char * av,int cblen,struct tidx * tstate) fill_ip() argument
3462 ipfw_delete(char * av[]) ipfw_delete() argument
3645 fill_comment(ipfw_insn * cmd,char ** av,int cblen) fill_comment() argument
3690 add_mac(ipfw_insn * cmd,char * av[],int cblen) add_mac() argument
3709 add_mactype(ipfw_insn * cmd,char * av,int cblen) add_mactype() argument
3723 add_proto0(ipfw_insn * cmd,char * av,u_char * protop) add_proto0() argument
3742 add_proto(ipfw_insn * cmd,char * av,u_char * protop) add_proto() argument
3763 add_proto_compat(ipfw_insn * cmd,char * av,u_char * protop) add_proto_compat() argument
3784 add_srcip(ipfw_insn * cmd,char * av,int cblen,struct tidx * tstate) add_srcip() argument
3801 add_dstip(ipfw_insn * cmd,char * av,int cblen,struct tidx * tstate) add_dstip() argument
3818 add_srcmac(ipfw_insn * cmd,char * av,struct tidx * tstate) add_srcmac() argument
3829 add_dstmac(ipfw_insn * cmd,char * av,struct tidx * tstate) add_dstmac() argument
3861 add_ports(ipfw_insn * cmd,char * av,u_char proto,int opcode,int cblen) add_ports() argument
3876 add_src(ipfw_insn * cmd,char * av,u_char proto,int cblen,struct tidx * tstate) add_src() argument
3907 add_dst(ipfw_insn * cmd,char * av,u_char proto,int cblen,struct tidx * tstate) add_dst() argument
3994 compile_rule(char * av[],uint32_t * rbuf,int * rbufsize,struct tidx * tstate) compile_rule() argument
5536 ipfw_add(char * av[]) ipfw_add() argument
5626 ipfw_zero(int ac,char * av[],int optname) ipfw_zero() argument
5802 ipfw_internal_handler(int ac,char * av[]) ipfw_internal_handler() argument
[all...]
H A Dipv6.c139 fill_icmp6types(ipfw_insn_icmp6 *cmd, char *av, int cblen) in fill_icmp6types() argument
145 while (*av) { in fill_icmp6types()
146 if (*av == ',') in fill_icmp6types()
147 av++; in fill_icmp6types()
148 type = strtoul(av, &av, 0); in fill_icmp6types()
149 if (*av != ',' && *av != '\0') in fill_icmp6types()
210 fill_ext6hdr( ipfw_insn *cmd, char *av) in fill_ext6hdr() argument
213 char *s = av; in fill_ext6hdr()
217 av = strsep( &s, ",") ; in fill_ext6hdr()
218 tok = match_token(ext6hdrcodes, av); in fill_ext6hdr()
[all …]
H A Dnat64lsn.c58 static void nat64lsn_create(const char *name, uint8_t set, int ac, char **av);
59 static void nat64lsn_config(const char *name, uint8_t set, int ac, char **av);
202 ipfw_nat64lsn_stats_handler(const char *name, uint8_t set, int ac, char *av[]) in ipfw_nat64lsn_stats_handler() argument
211 tcmd = get_token(nat64statscmds, *av, "nat64lsn stats command"); in ipfw_nat64lsn_stats_handler()
225 ipfw_nat64lsn_list_handler(const char *name, uint8_t set, int ac, char *av[]) in ipfw_nat64lsn_list_handler() argument
234 tcmd = get_token(nat64listcmds, *av, "nat64lsn list command"); in ipfw_nat64lsn_list_handler()
253 ipfw_nat64lsn_handler(int ac, char *av[]) in ipfw_nat64lsn_handler() argument
263 ac--; av++; in ipfw_nat64lsn_handler()
266 name = *av; in ipfw_nat64lsn_handler()
274 ac--; av++; in ipfw_nat64lsn_handler()
[all …]
H A Ddummynet.c1025 process_extra_parms(int *ac, char **av, struct dn_extra_parms *ep, in process_extra_parms() argument
1048 int tok = match_token(aqm_params, *av); in process_extra_parms()
1049 (*ac)--; av++; in process_extra_parms()
1052 if (*ac <= 0 || time_to_us(av[0]) < 0) in process_extra_parms()
1055 ep->par[0] = time_to_us(av[0]); in process_extra_parms()
1056 (*ac)--; av++; in process_extra_parms()
1060 if (*ac <= 0 || time_to_us(av[0]) < 0) in process_extra_parms()
1063 ep->par[1] = time_to_us(av[0]); in process_extra_parms()
1064 (*ac)--; av++; in process_extra_parms()
1077 if (*ac <= 0 || !is_valid_number(av[ in process_extra_parms()
1277 ipfw_config_pipe(int ac,char ** av) ipfw_config_pipe() argument
1882 parse_range(int ac,char * av[],uint32_t * v,int len) parse_range() argument
1936 dummynet_list(int ac,char * av[],int show_counters) dummynet_list() argument
[all...]
H A Dnat.c321 estimate_redir_addr(int *ac, char ***av) in estimate_redir_addr() argument
324 char *sep = **av; in estimate_redir_addr()
342 setup_redir_addr(char *buf, int *ac, char ***av) in setup_redir_addr() argument
355 if (strchr(**av, ',') != NULL) { in setup_redir_addr()
360 sep = strtok(**av, ","); in setup_redir_addr()
372 StrToAddr(**av, &r->laddr); in setup_redir_addr()
373 (*av)++; (*ac)--; in setup_redir_addr()
376 StrToAddr(**av, &r->paddr); in setup_redir_addr()
377 (*av)++; (*ac)--; in setup_redir_addr()
383 estimate_redir_port(int *ac, char ***av) in estimate_redir_port() argument
[all …]
H A Dnat64stl.c55 static void nat64stl_create(const char *name, uint8_t set, int ac, char **av);
56 static void nat64stl_config(const char *name, uint8_t set, int ac, char **av);
122 ipfw_nat64stl_handler(int ac, char *av[]) in ipfw_nat64stl_handler() argument
132 ac--; av++; in ipfw_nat64stl_handler()
135 name = *av; in ipfw_nat64stl_handler()
143 ac--; av++; in ipfw_nat64stl_handler()
146 tcmd = get_token(nat64cmds, *av, "nat64stl command"); in ipfw_nat64stl_handler()
151 ac--; av++; in ipfw_nat64stl_handler()
152 nat64stl_create(name, set, ac, av); in ipfw_nat64stl_handler()
155 ac--; av++; in ipfw_nat64stl_handler()
[all …]
H A Dipfw2.h334 #define NEED1(msg) {if (!(*av)) errx(EX_USAGE, msg);}
401 void ipfw_add(char *av[]);
402 void ipfw_show_nat(int ac, char **av);
404 void ipfw_config_pipe(int ac, char **av);
405 void ipfw_config_nat(int ac, char **av);
406 void ipfw_sets_handler(char *av[]);
407 void ipfw_table_handler(int ac, char *av[]);
408 void ipfw_sysctl_handler(char *av[], int which);
409 void ipfw_delete(char *av[]);
411 void ipfw_zero(int ac, char *av[], int optname);
[all …]
H A Dnat64clat.c56 static void nat64clat_create(const char *name, uint8_t set, int ac, char **av);
57 static void nat64clat_config(const char *name, uint8_t set, int ac, char **av);
90 ipfw_nat64clat_handler(int ac, char *av[]) in ipfw_nat64clat_handler() argument
100 ac--; av++; in ipfw_nat64clat_handler()
103 name = *av; in ipfw_nat64clat_handler()
111 ac--; av++; in ipfw_nat64clat_handler()
114 tcmd = get_token(nat64cmds, *av, "nat64clat command"); in ipfw_nat64clat_handler()
119 ac--; av++; in ipfw_nat64clat_handler()
120 nat64clat_create(name, set, ac, av); in ipfw_nat64clat_handler()
123 ac--; av++; in ipfw_nat64clat_handler()
[all …]
H A Dnptv6.c53 static void nptv6_create(const char *name, uint8_t set, int ac, char **av);
83 ipfw_nptv6_handler(int ac, char *av[]) in ipfw_nptv6_handler() argument
93 ac--; av++; in ipfw_nptv6_handler()
96 name = *av; in ipfw_nptv6_handler()
104 ac--; av++; in ipfw_nptv6_handler()
107 tcmd = get_token(nptv6cmds, *av, "nptv6 command"); in ipfw_nptv6_handler()
112 ac--; av++; in ipfw_nptv6_handler()
113 nptv6_create(name, set, ac, av); in ipfw_nptv6_handler()
125 ac--; av++; in ipfw_nptv6_handler()
130 tcmd = get_token(nptv6statscmds, *av, "stats command"); in ipfw_nptv6_handler()
[all …]
/freebsd/usr.sbin/devctl/
H A Ddevctl.c39 int (*handler)(int ac, char **av);
53 devctl_ ## name ## _table_handler(int ac, char **av) \
56 SET_LIMIT(DEVCTL_DATASET(name)), ac, av)); \
61 struct devctl_command **end, int ac, char **av);
92 struct devctl_command **end, int ac, char **av) in devctl_table_handler() argument
97 warnx("The %s command requires a sub-command.", av[0]); in devctl_table_handler()
101 if (strcmp((*cmd)->name, av[1]) == 0) in devctl_table_handler()
102 return ((*cmd)->handler(ac - 1, av + 1)); in devctl_table_handler()
105 warnx("%s is not a valid sub-command of %s.", av[1], av[0]); in devctl_table_handler()
110 help(int ac __unused, char **av __unused) in help()
[all …]
/freebsd/sbin/devfs/
H A Drule.c52 static void rulespec_intok(struct devfs_rule *dr, int ac, char **av,
81 rule_main(int ac, char **av) in rule_main() argument
88 while ((ch = getopt(ac, av, "s:")) != -1) in rule_main()
97 av += optind; in rule_main()
102 if (strcmp(c->name, av[0]) == 0) in rule_main()
103 exit((*c->handler)(ac, av)); in rule_main()
104 errx(1, "unknown command: %s", av[0]); in rule_main()
108 rule_add(int ac, char **av) in rule_add() argument
115 if (strcmp(av[1], "-") == 0) in rule_add()
118 rulespec_intok(&dr, ac - 1, av + 1, in_rsnum); in rule_add()
[all …]
/freebsd/sys/dev/mthca/
H A Dmthca_av.c159 struct mthca_av *av = NULL; in mthca_create_ah() local
164 ah->av = kmalloc(sizeof *ah->av, GFP_ATOMIC); in mthca_create_ah()
165 if (!ah->av) in mthca_create_ah()
169 av = ah->av; in mthca_create_ah()
178 av = kmalloc(sizeof *av, GFP_ATOMIC); in mthca_create_ah()
179 if (!av) in mthca_create_ah()
189 ah->av = pci_pool_alloc(dev->av_table.pool, in mthca_create_ah()
191 if (!ah->av) in mthca_create_ah()
194 av = ah->av; in mthca_create_ah()
199 memset(av, 0, MTHCA_AV_SIZE); in mthca_create_ah()
[all …]
/freebsd/sys/dev/mlx4/mlx4_ib/
H A Dmlx4_ib_ah.c51 ah->av.ib.port_pd = cpu_to_be32(to_mpd(pd)->pdn | (ah_attr->port_num << 24)); in create_ib_ah()
52 ah->av.ib.g_slid = ah_attr->src_path_bits; in create_ib_ah()
53 ah->av.ib.sl_tclass_flowlabel = cpu_to_be32(ah_attr->sl << 28); in create_ib_ah()
55 ah->av.ib.g_slid |= 0x80; in create_ib_ah()
56 ah->av.ib.gid_index = ah_attr->grh.sgid_index; in create_ib_ah()
57 ah->av.ib.hop_limit = ah_attr->grh.hop_limit; in create_ib_ah()
58 ah->av.ib.sl_tclass_flowlabel |= in create_ib_ah()
61 memcpy(ah->av.ib.dgid, ah_attr->grh.dgid.raw, 16); in create_ib_ah()
64 ah->av.ib.dlid = cpu_to_be16(ah_attr->dlid); in create_ib_ah()
66 ah->av.ib.stat_rate = ah_attr->static_rate + MLX4_STAT_RATE_OFFSET; in create_ib_ah()
[all …]
/freebsd/usr.bin/killall/
H A Dkillall.c91 main(int ac, char **av) in main() argument
135 av++; in main()
139 if (strcmp(*av, "-l") == 0) { in main()
143 if (strcmp(*av, "-help") == 0) in main()
145 if (**av == '-') { in main()
146 ++*av; in main()
147 switch (**av) { in main()
149 ++*av; in main()
150 if (**av == '\0') { in main()
151 ++av; in main()
[all …]
/freebsd/contrib/dialog/
H A Ddialog.c40 #define PASSARGS t, av, offset_add
41 #define CALLARGS const char *t, char *av[], int *offset_add
762 numeric_arg(char **av, int n) in numeric_arg() argument
766 if (n < dlg_count_argv(av)) { in numeric_arg()
768 result = (int) strtol(av[n], &last, 10); in numeric_arg()
773 sprintf(msg, "Expected a number for token %d of %.20s", n, av[0]); in numeric_arg()
781 optional_str(char **av, int n, char *dft) in optional_str() argument
784 if (arg_rest(av) > n) in optional_str()
785 ret = av[n]; in optional_str()
791 optional_num(char **av, int n, int dft) in optional_num() argument
[all …]
/freebsd/usr.sbin/mfiutil/
H A Dmfi_volume.c183 process_cache_command(int ac, char **av, struct mfi_ld_props *props) in process_cache_command() argument
188 if (strcmp(av[0], "all") == 0 || strcmp(av[0], "enable") == 0) { in process_cache_command()
195 if (strcmp(av[0], "none") == 0 || strcmp(av[0], "disable") == 0) { in process_cache_command()
200 if (strcmp(av[0], "reads") == 0) { in process_cache_command()
206 if (strcmp(av[0], "writes") == 0) { in process_cache_command()
214 if (strcmp(av[0], "write-back") == 0) { in process_cache_command()
219 if (strcmp(av[0], "write-through") == 0) { in process_cache_command()
223 if (strcmp(av[0], "bad-bbu-write-cache") == 0) { in process_cache_command()
228 if (strcmp(av[1], "enable") == 0) in process_cache_command()
230 else if (strcmp(av[1], "disable") == 0) in process_cache_command()
[all …]
H A Dmfi_bbu.c122 start_bbu_learn(int ac, char **av __unused) in start_bbu_learn()
156 update_bbu_props(int ac, char **av) in update_bbu_props() argument
189 if (strcmp(av[1], "learn-delay") == 0) { in update_bbu_props()
190 delay = strtoul(av[2], &endptr, 10); in update_bbu_props()
191 if (strlen(av[2]) == 0 || *endptr != '\0' || delay > 255) { in update_bbu_props()
192 warnx("Invalid learn delay '%s'", av[2]); in update_bbu_props()
198 } else if (strcmp(av[1], "autolearn-mode") == 0) { in update_bbu_props()
199 mode = av[2]; in update_bbu_props()
201 if (strcmp(av[2], "enable") == 0) in update_bbu_props()
203 else if (strcmp(av[2], "disable") == 0) in update_bbu_props()
[all …]
/freebsd/sys/dev/mlx5/mlx5_ib/
H A Dmlx5_ib_ah.c37 memcpy(ah->av.rgid, &ah_attr->grh.dgid, 16); in create_ib_ah()
38 ah->av.grh_gid_fl = cpu_to_be32(ah_attr->grh.flow_label | in create_ib_ah()
41 ah->av.hop_limit = ah_attr->grh.hop_limit; in create_ib_ah()
42 ah->av.tclass = ah_attr->grh.traffic_class; in create_ib_ah()
45 ah->av.stat_rate_sl = (ah_attr->static_rate << 4); in create_ib_ah()
48 memcpy(ah->av.rmac, ah_attr->dmac, sizeof(ah_attr->dmac)); in create_ib_ah()
49 ah->av.udp_sport = in create_ib_ah()
53 ah->av.stat_rate_sl |= (ah_attr->sl & 0x7) << 1; in create_ib_ah()
55 ah->av.rlid = cpu_to_be16(ah_attr->dlid); in create_ib_ah()
56 ah->av.fl_mlid = ah_attr->src_path_bits & 0x7f; in create_ib_ah()
[all …]
/freebsd/usr.sbin/mptutil/
H A Dmpt_volume.c67 volume_name(int ac, char **av) in volume_name() argument
78 if (strlen(av[2]) >= sizeof(vnames->Name)) { in volume_name()
90 error = mpt_lookup_volume(fd, av[1], &VolumeBus, &VolumeID); in volume_name()
92 warnc(error, "Invalid volume: %s", av[1]); in volume_name()
112 av[2]); in volume_name()
114 strcpy(vnames->Name, av[2]); in volume_name()
132 volume_status(int ac, char **av) in volume_status() argument
154 error = mpt_lookup_volume(fd, av[1], &VolumeBus, &VolumeID); in volume_status()
156 warnc(error, "Invalid volume: %s", av[1]); in volume_status()
201 volume_cache(int ac, char **av) in volume_cache() argument
[all …]
/freebsd/usr.sbin/ngctl/
H A Dwrite.c48 static int WriteCmd(int ac, char **av);
60 WriteCmd(int ac, char **av) in WriteCmd() argument
74 hook = av[1]; in WriteCmd()
77 if (strcmp(av[2], "-f") == 0) { in WriteCmd()
80 if ((fp = fopen(av[3], "r")) == NULL) { in WriteCmd()
81 warn("can't read file \"%s\"", av[3]); in WriteCmd()
86 warn("can't read file \"%s\"", av[3]); in WriteCmd()
88 warnx("file \"%s\" is empty", av[3]); in WriteCmd()
95 if (sscanf(av[i], "%i", &byte) != 1 in WriteCmd()
97 warnx("invalid byte \"%s\"", av[i]); in WriteCmd()
/freebsd/contrib/libedit/TEST/
H A Dtc1.c180 const char **av; in main() local
201 ncontinuation = tok_line(tok, li, &ac, &av, &cc, &co); in main()
237 (void) fprintf(stderr, "`%s'\n", av[i]); in main()
240 co, av[i], av[i] + co); in main()
244 if (strcmp(av[0], "history") == 0) { in main()
256 if (strcmp(av[1], "clear") == 0) in main()
263 if (strcmp(av[1], "load") == 0) in main()
264 history(hist, &ev, H_LOAD, av[2]); in main()
265 else if (strcmp(av[1], "save") == 0) in main()
266 history(hist, &ev, H_SAVE, av[2]); in main()
[all …]
/freebsd/usr.sbin/mpsutil/
H A Dmpsutil.c76 version(int ac, char **av) in version() argument
90 main(int ac, char **av) in main() argument
99 while ((ch = getopt(ac, av, "u:h?")) != -1) { in main()
121 av += optind; in main()
131 if (strcmp((*cmd)->name, av[0]) == 0) { in main()
132 if ((*cmd)->handler(ac, av)) in main()
138 warnx("Unknown command %s.", av[0]); in main()
144 int ac, char **av) in mps_table_handler() argument
149 warnx("The %s command requires a sub-command.", av[0]); in mps_table_handler()
153 if (strcmp((*cmd)->name, av[1]) == 0) in mps_table_handler()
[all …]
/freebsd/sys/netpfil/ipfw/test/
H A Dmain.c17 char * const *av; member
437 char * const *av = c->av; in init() local
450 ac--; av++; in init()
452 if (!strcmp(*av, "-n")) { in init()
453 c->loops = getnum(av[1], NULL, av[0]); in init()
454 } else if (!strcmp(*av, "-d")) { in init()
455 debug = atoi(av[1]); in init()
456 } else if (!strcmp(*av, "-alg")) { in init()
457 if (!strcmp(av[1], "rr")) in init()
459 else if (!strcmp(av[1], "wf2qp")) in init()
[all …]

12345678910