Example #1
0
static void __delete_link(int ifindex, struct rtnl_cls *filter)
{
	struct nl_cache *cache;
	uint32_t parent = rtnl_tc_get_parent((struct rtnl_tc *) filter);

	cache = nl_cli_cls_alloc_cache(sock, ifindex, parent);
	nl_cache_foreach_filter(cache, OBJ_CAST(filter), delete_cb, NULL);
	nl_cache_free(cache);
}
Example #2
0
static void __dump_link(int ifindex, struct rtnl_cls *filter)
{
	struct nl_cache *cache;
	uint32_t parent = rtnl_tc_get_parent((struct rtnl_tc *) filter);

	cache = nl_cli_cls_alloc_cache(sock, ifindex, parent);
	nl_cache_dump_filter(cache, &params, OBJ_CAST(filter));
	nl_cache_free(cache);
}
Example #3
0
static void list_cls(int ifindex, uint32_t parent)
{
	struct nl_cache *cls_cache;

	cls_cache = nl_cli_cls_alloc_cache(sock, ifindex, parent);

	params.dp_prefix += NUM_INDENT;
	nl_cache_dump(cls_cache, &params);
	params.dp_prefix -= NUM_INDENT;

	nl_cache_free(cls_cache);
}