19 #include <netlink/cli/utils.h> 20 #include <netlink/cli/rule.h> 22 struct rtnl_rule *nl_cli_rule_alloc(
void)
24 struct rtnl_rule *rule;
26 rule = rtnl_rule_alloc();
33 struct nl_cache *nl_cli_rule_alloc_cache(
struct nl_sock *sk)
35 struct nl_cache *cache;
39 nl_cli_fatal(err,
"Unable to allocate routing rule cache: %s\n",
47 void nl_cli_rule_parse_family(
struct rtnl_rule *rule,
char *arg)
51 if ((family = nl_str2af(arg)) != AF_UNSPEC)
52 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.