Home | History | Annotate | Download | only in lib

Lines Matching defs:arg

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