Lines Matching refs:arg
47 void nl_cli_route_parse_family(struct rtnl_route *route, char *arg) in nl_cli_route_parse_family() argument
51 if ((family = nl_str2af(arg)) != AF_UNSPEC) in nl_cli_route_parse_family()
55 void nl_cli_route_parse_dst(struct rtnl_route *route, char *arg) in nl_cli_route_parse_dst() argument
60 addr = nl_cli_addr_parse(arg, rtnl_route_get_family(route)); in nl_cli_route_parse_dst()
68 void nl_cli_route_parse_src(struct rtnl_route *route, char *arg) in nl_cli_route_parse_src() argument
73 addr = nl_cli_addr_parse(arg, rtnl_route_get_family(route)); in nl_cli_route_parse_src()
81 void nl_cli_route_parse_pref_src(struct rtnl_route *route, char *arg) in nl_cli_route_parse_pref_src() argument
86 addr = nl_cli_addr_parse(arg, rtnl_route_get_family(route)); in nl_cli_route_parse_pref_src()
114 char *arg, *endptr; in nl_cli_route_parse_metric() local
117 int ret = getsubopt(&subopts, tokens, &arg); in nl_cli_route_parse_metric()
119 nl_cli_fatal(EINVAL, "Unknown metric token \"%s\"", arg); in nl_cli_route_parse_metric()
124 if (arg == NULL) in nl_cli_route_parse_metric()
127 lval = strtoul(arg, &endptr, 0); in nl_cli_route_parse_metric()
128 if (endptr == arg) in nl_cli_route_parse_metric()
155 char *arg, *endptr; in nl_cli_route_parse_nexthop() local
161 int ret = getsubopt(&subopts, tokens, &arg); in nl_cli_route_parse_nexthop()
163 nl_cli_fatal(EINVAL, "Unknown nexthop token \"%s\"", arg); in nl_cli_route_parse_nexthop()
165 if (arg == NULL) in nl_cli_route_parse_nexthop()
171 if (!(ival = rtnl_link_name2i(link_cache, arg))) in nl_cli_route_parse_nexthop()
172 nl_cli_fatal(ENOENT,"Link \"%s\" does not exist", arg); in nl_cli_route_parse_nexthop()
178 addr = nl_cli_addr_parse(arg,rtnl_route_get_family(route)); in nl_cli_route_parse_nexthop()
184 lval = strtoul(arg, &endptr, 0); in nl_cli_route_parse_nexthop()
185 if (endptr == arg) in nl_cli_route_parse_nexthop()
188 arg); in nl_cli_route_parse_nexthop()
197 void nl_cli_route_parse_table(struct rtnl_route *route, char *arg) in nl_cli_route_parse_table() argument
202 lval = strtoul(arg, &endptr, 0); in nl_cli_route_parse_table()
203 if (endptr == arg) { in nl_cli_route_parse_table()
204 if ((lval = rtnl_route_str2table(arg)) < 0) in nl_cli_route_parse_table()
205 nl_cli_fatal(EINVAL, "Unknown table name \"%s\"", arg); in nl_cli_route_parse_table()
211 void nl_cli_route_parse_prio(struct rtnl_route *route, char *arg) in nl_cli_route_parse_prio() argument
216 lval = strtoul(arg, &endptr, 0); in nl_cli_route_parse_prio()
217 if (endptr == arg) in nl_cli_route_parse_prio()
222 void nl_cli_route_parse_scope(struct rtnl_route *route, char *arg) in nl_cli_route_parse_scope() argument
226 if ((ival = rtnl_str2scope(arg)) < 0) in nl_cli_route_parse_scope()
227 nl_cli_fatal(EINVAL, "Unknown routing scope \"%s\"", arg); in nl_cli_route_parse_scope()
232 void nl_cli_route_parse_protocol(struct rtnl_route *route, char *arg) in nl_cli_route_parse_protocol() argument
237 lval = strtoul(arg, &endptr, 0); in nl_cli_route_parse_protocol()
238 if (endptr == arg) { in nl_cli_route_parse_protocol()
239 if ((lval = rtnl_route_str2proto(arg)) < 0) in nl_cli_route_parse_protocol()
242 arg); in nl_cli_route_parse_protocol()
248 void nl_cli_route_parse_type(struct rtnl_route *route, char *arg) in nl_cli_route_parse_type() argument
252 if ((ival = nl_str2rtntype(arg)) < 0) in nl_cli_route_parse_type()
253 nl_cli_fatal(EINVAL, "Unknown routing type \"%s\"", arg); in nl_cli_route_parse_type()
260 void nl_cli_route_parse_iif(struct rtnl_route *route, char *arg, struct nl_cache *link_cache) in nl_cli_route_parse_iif() argument
264 if (!(ival = rtnl_link_name2i(link_cache, arg))) in nl_cli_route_parse_iif()
265 nl_cli_fatal(ENOENT, "Link \"%s\" does not exist", arg); in nl_cli_route_parse_iif()