20 #include <netlink/cli/utils.h> 21 #include <netlink/cli/rule.h> 23 struct rtnl_rule *nl_cli_rule_alloc(
void)
25 struct rtnl_rule *rule;
27 rule = rtnl_rule_alloc();
34 struct nl_cache *nl_cli_rule_alloc_cache(
struct nl_sock *sk)
36 struct nl_cache *cache;
40 nl_cli_fatal(err,
"Unable to allocate routing rule cache: %s\n",
48 void nl_cli_rule_parse_family(
struct rtnl_rule *rule,
char *arg)
52 if ((family = nl_str2af(arg)) != AF_UNSPEC)
53 rtnl_rule_set_family(rule, family);
int rtnl_rule_alloc_cache(struct nl_sock *sock, int family, struct nl_cache **result)
Build a rule cache including all rules currently configured in the kernel.
void nl_cache_mngt_provide(struct nl_cache *cache)
Provide a cache for global use.
void nl_cli_fatal(int err, const char *fmt,...)
Print error message and quit application.