6#include <netlink-private/netlink.h>
7#include <netlink-private/tc.h>
8#include <netlink/netlink.h>
9#include <netlink/route/cls/ematch.h>
11static int container_parse(
struct rtnl_ematch *e,
void *data,
size_t len __attribute__((unused)))
19 memcpy(e->e_data, data,
sizeof(uint32_t));
24static int container_fill(
struct rtnl_ematch *e,
struct nl_msg *msg)
26 return nlmsg_append(msg, e->e_data,
sizeof(uint32_t), 0);
30 .eo_kind = TCF_EM_CONTAINER,
31 .eo_name =
"container",
32 .eo_minlen =
sizeof(uint32_t),
33 .eo_datalen =
sizeof(uint32_t),
34 .eo_parse = container_parse,
35 .eo_fill = container_fill,
38static void __init container_init(
void)
int rtnl_ematch_register(struct rtnl_ematch_ops *ops)
Register ematch module.
int nlmsg_append(struct nl_msg *n, void *data, size_t len, int pad)
Append data to tail of a netlink message.
Extended Match Operations.