Lines Matching defs:route
2 * src/lib/route.c CLI Route Helpers
20 #include <netlink/cli/route.h>
24 struct rtnl_route *route;
26 route = rtnl_route_alloc();
27 if (!route)
28 nl_cli_fatal(ENOMEM, "Unable to allocate route object");
30 return route;
39 nl_cli_fatal(err, "Unable to allocate route cache: %s\n",
47 void nl_cli_route_parse_family(struct rtnl_route *route, char *arg)
52 rtnl_route_set_family(route, family);
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));
61 if ((err = rtnl_route_set_dst(route, addr)) < 0)
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));
74 if ((err = rtnl_route_set_src(route, addr)) < 0)
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));
87 if ((err = rtnl_route_set_pref_src(route, addr)) < 0)
94 void nl_cli_route_parse_metric(struct rtnl_route *route, char *subopts)
131 if ((ret = rtnl_route_set_metric(route, ret, lval)) < 0)
137 void nl_cli_route_parse_nexthop(struct rtnl_route *route, char *subopts,
178 addr = nl_cli_addr_parse(arg,rtnl_route_get_family(route));
194 rtnl_route_add_nexthop(route, nh);
197 void nl_cli_route_parse_table(struct rtnl_route *route, char *arg)
212 rtnl_route_set_table(route, table);
215 void nl_cli_route_parse_prio(struct rtnl_route *route, char *arg)
223 rtnl_route_set_priority(route, lval);
226 void nl_cli_route_parse_scope(struct rtnl_route *route, char *arg)
233 rtnl_route_set_scope(route, ival);
236 void nl_cli_route_parse_protocol(struct rtnl_route *route, char *arg)
253 rtnl_route_set_protocol(route, proto);
256 void nl_cli_route_parse_type(struct rtnl_route *route, char *arg)
263 if ((ival = rtnl_route_set_type(route, ival)) < 0)
268 void nl_cli_route_parse_iif(struct rtnl_route *route, char *arg, struct nl_cache *link_cache)
275 rtnl_route_set_iif(route, ival);