• Home
  • Raw
  • Download

Lines Matching refs:arg

48 void nl_cli_route_parse_family(struct rtnl_route *route, char *arg)  in nl_cli_route_parse_family()  argument
52 if ((family = nl_str2af(arg)) != AF_UNSPEC) in nl_cli_route_parse_family()
56 void nl_cli_route_parse_dst(struct rtnl_route *route, char *arg) in nl_cli_route_parse_dst() argument
61 addr = nl_cli_addr_parse(arg, rtnl_route_get_family(route)); in nl_cli_route_parse_dst()
69 void nl_cli_route_parse_src(struct rtnl_route *route, char *arg) in nl_cli_route_parse_src() argument
74 addr = nl_cli_addr_parse(arg, rtnl_route_get_family(route)); in nl_cli_route_parse_src()
82 void nl_cli_route_parse_pref_src(struct rtnl_route *route, char *arg) in nl_cli_route_parse_pref_src() argument
87 addr = nl_cli_addr_parse(arg, rtnl_route_get_family(route)); in nl_cli_route_parse_pref_src()
115 char *arg, *endptr; in nl_cli_route_parse_metric() local
118 int ret = getsubopt(&subopts, tokens, &arg); in nl_cli_route_parse_metric()
120 nl_cli_fatal(EINVAL, "Unknown metric token \"%s\"", arg); in nl_cli_route_parse_metric()
125 if (arg == NULL) in nl_cli_route_parse_metric()
128 lval = strtoul(arg, &endptr, 0); in nl_cli_route_parse_metric()
129 if (endptr == arg) in nl_cli_route_parse_metric()
158 char *arg, *endptr; in nl_cli_route_parse_nexthop() local
164 int ret = getsubopt(&subopts, tokens, &arg); in nl_cli_route_parse_nexthop()
166 nl_cli_fatal(EINVAL, "Unknown nexthop token \"%s\"", arg); in nl_cli_route_parse_nexthop()
168 if (arg == NULL) in nl_cli_route_parse_nexthop()
174 if (!(ival = rtnl_link_name2i(link_cache, arg))) in nl_cli_route_parse_nexthop()
175 nl_cli_fatal(ENOENT,"Link \"%s\" does not exist", arg); in nl_cli_route_parse_nexthop()
182 addr = nl_cli_addr_parse(arg, 0); in nl_cli_route_parse_nexthop()
185 addr = nl_cli_addr_parse(arg,rtnl_route_get_family(route)); in nl_cli_route_parse_nexthop()
192 addr = nl_cli_addr_parse(arg, in nl_cli_route_parse_nexthop()
199 lval = strtoul(arg, &endptr, 0); in nl_cli_route_parse_nexthop()
200 if (endptr == arg) in nl_cli_route_parse_nexthop()
203 arg); in nl_cli_route_parse_nexthop()
212 void nl_cli_route_parse_table(struct rtnl_route *route, char *arg) in nl_cli_route_parse_table() argument
218 lval = strtoul(arg, &endptr, 0); in nl_cli_route_parse_table()
219 if (endptr == arg) { in nl_cli_route_parse_table()
220 if ((table = rtnl_route_str2table(arg)) < 0) in nl_cli_route_parse_table()
221 nl_cli_fatal(EINVAL, "Unknown table name \"%s\"", arg); in nl_cli_route_parse_table()
230 void nl_cli_route_parse_prio(struct rtnl_route *route, char *arg) in nl_cli_route_parse_prio() argument
235 lval = strtoul(arg, &endptr, 0); in nl_cli_route_parse_prio()
236 if (endptr == arg) in nl_cli_route_parse_prio()
241 void nl_cli_route_parse_scope(struct rtnl_route *route, char *arg) in nl_cli_route_parse_scope() argument
245 if ((ival = rtnl_str2scope(arg)) < 0) in nl_cli_route_parse_scope()
246 nl_cli_fatal(EINVAL, "Unknown routing scope \"%s\"", arg); in nl_cli_route_parse_scope()
251 void nl_cli_route_parse_protocol(struct rtnl_route *route, char *arg) in nl_cli_route_parse_protocol() argument
257 lval = strtoul(arg, &endptr, 0); in nl_cli_route_parse_protocol()
258 if (endptr == arg) { in nl_cli_route_parse_protocol()
259 if ((proto = rtnl_route_str2proto(arg)) < 0) in nl_cli_route_parse_protocol()
262 arg); in nl_cli_route_parse_protocol()
271 void nl_cli_route_parse_type(struct rtnl_route *route, char *arg) in nl_cli_route_parse_type() argument
275 if ((ival = nl_str2rtntype(arg)) < 0) in nl_cli_route_parse_type()
276 nl_cli_fatal(EINVAL, "Unknown routing type \"%s\"", arg); in nl_cli_route_parse_type()
283 void nl_cli_route_parse_iif(struct rtnl_route *route, char *arg, struct nl_cache *link_cache) in nl_cli_route_parse_iif() argument
287 if (!(ival = rtnl_link_name2i(link_cache, arg))) in nl_cli_route_parse_iif()
288 nl_cli_fatal(ENOENT, "Link \"%s\" does not exist", arg); in nl_cli_route_parse_iif()