2 * lib/route/cls/ematch/container.c Container Ematch
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation version 2.1
9 * Copyright (c) 2008-2009 Thomas Graf <tgraf@suug.ch>
12 #include <netlink-local.h>
13 #include <netlink-tc.h>
14 #include <netlink/netlink.h>
15 #include <netlink/route/cls/ematch.h>
17 static int container_parse(struct rtnl_ematch *m, void *data, size_t len)
19 memcpy(m->e_data, data, sizeof(uint32_t));
24 static struct rtnl_ematch_ops container_ops = {
25 .eo_kind = TCF_EM_CONTAINER,
26 .eo_name = "container",
27 .eo_datalen = sizeof(uint32_t),
28 .eo_parse = container_parse,
31 static void __init container_init(void)
33 rtnl_ematch_register(&container_ops);
36 static void __exit container_exit(void)
38 rtnl_ematch_unregister(&container_ops);