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