13#include <netlink/cli/utils.h>
14#include <netlink/cli/rule.h>
16struct rtnl_rule *nl_cli_rule_alloc(
void)
18 struct rtnl_rule *rule;
20 rule = rtnl_rule_alloc();
27struct nl_cache *nl_cli_rule_alloc_cache(
struct nl_sock *sk)
29 struct nl_cache *cache;
33 nl_cli_fatal(err,
"Unable to allocate routing rule cache: %s\n",
41void nl_cli_rule_parse_family(
struct rtnl_rule *rule,
char *arg)
45 if ((family = nl_str2af(arg)) != AF_UNSPEC)
46 rtnl_rule_set_family(rule, family);
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.
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.