1 /* SPDX-License-Identifier: LGPL-2.1-only */
2 /*
3 * Copyright (c) 2013 Cong Wang <xiyou.wangcong@gmail.com>
4 */
5
6 /**
7 * @ingroup qdisc
8 * @defgroup qdisc_ingress Ingress qdisc
9 *
10 * @{
11 */
12
13 #include <netlink-private/netlink.h>
14 #include <netlink-private/tc.h>
15 #include <netlink/netlink.h>
16 #include <netlink-private/route/tc-api.h>
17 #include <netlink/route/qdisc.h>
18 #include <netlink/utils.h>
19
20 struct dumb {
21 uint32_t foo;
22 };
23
dumb_msg_parser(struct rtnl_tc * tc,void * data)24 static int dumb_msg_parser(struct rtnl_tc *tc, void *data)
25 {
26 return 0;
27 }
28
dumb_dump_line(struct rtnl_tc * tc,void * data,struct nl_dump_params * p)29 static void dumb_dump_line(struct rtnl_tc *tc, void *data,
30 struct nl_dump_params *p)
31 {
32 }
33
dumb_msg_fill(struct rtnl_tc * tc,void * data,struct nl_msg * msg)34 static int dumb_msg_fill(struct rtnl_tc *tc, void *data, struct nl_msg *msg)
35 {
36 return 0;
37 }
38
39 static struct rtnl_tc_ops ingress_ops = {
40 .to_kind = "ingress",
41 .to_type = RTNL_TC_TYPE_QDISC,
42 .to_size = sizeof(struct dumb),
43 .to_msg_parser = dumb_msg_parser,
44 .to_dump[NL_DUMP_LINE] = dumb_dump_line,
45 .to_msg_fill = dumb_msg_fill,
46 };
47
ingress_init(void)48 static void __init ingress_init(void)
49 {
50 rtnl_tc_register(&ingress_ops);
51 }
52
ingress_exit(void)53 static void __exit ingress_exit(void)
54 {
55 rtnl_tc_unregister(&ingress_ops);
56 }
57
58 /** @} */
59