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
203 lval = strtoul(arg, &endptr, 0); in nl_cli_route_parse_table()
204 if (endptr == arg) { in nl_cli_route_parse_table()
205 if ((table = rtnl_route_str2table(arg)) < 0) in nl_cli_route_parse_table()
206 nl_cli_fatal(EINVAL, "Unknown table name \"%s\"", arg); in nl_cli_route_parse_table()
215 void nl_cli_route_parse_prio(struct rtnl_route *route, char *arg) in nl_cli_route_parse_prio() argument
220 lval = strtoul(arg, &endptr, 0); in nl_cli_route_parse_prio()
221 if (endptr == arg) in nl_cli_route_parse_prio()
226 void nl_cli_route_parse_scope(struct rtnl_route *route, char *arg) in nl_cli_route_parse_scope() argument
230 if ((ival = rtnl_str2scope(arg)) < 0) in nl_cli_route_parse_scope()
231 nl_cli_fatal(EINVAL, "Unknown routing scope \"%s\"", arg); in nl_cli_route_parse_scope()
236 void nl_cli_route_parse_protocol(struct rtnl_route *route, char *arg) in nl_cli_route_parse_protocol() argument
242 lval = strtoul(arg, &endptr, 0); in nl_cli_route_parse_protocol()
243 if (endptr == arg) { in nl_cli_route_parse_protocol()
244 if ((proto = rtnl_route_str2proto(arg)) < 0) in nl_cli_route_parse_protocol()
247 arg); in nl_cli_route_parse_protocol()
256 void nl_cli_route_parse_type(struct rtnl_route *route, char *arg) in nl_cli_route_parse_type() argument
260 if ((ival = nl_str2rtntype(arg)) < 0) in nl_cli_route_parse_type()
261 nl_cli_fatal(EINVAL, "Unknown routing type \"%s\"", arg); in nl_cli_route_parse_type()
268 void nl_cli_route_parse_iif(struct rtnl_route *route, char *arg, struct nl_cache *link_cache) in nl_cli_route_parse_iif() argument
272 if (!(ival = rtnl_link_name2i(link_cache, arg))) in nl_cli_route_parse_iif()
273 nl_cli_fatal(ENOENT, "Link \"%s\" does not exist", arg); in nl_cli_route_parse_iif()