libnl  3.6.0
blackhole.c
1 /* SPDX-License-Identifier: LGPL-2.1-only */
2 /*
3  * Copyright (c) 2003-2011 Thomas Graf <tgraf@suug.ch>
4  */
5 
6 /**
7  * @ingroup qdisc
8  * @defgroup qdisc_blackhole Blackhole
9  * @{
10  */
11 
12 #include <netlink-private/netlink.h>
13 #include <netlink/netlink.h>
14 #include <netlink-private/route/tc-api.h>
15 
16 static struct rtnl_tc_ops blackhole_ops = {
17  .to_kind = "blackhole",
18  .to_type = RTNL_TC_TYPE_QDISC,
19 };
20 
21 static void __init blackhole_init(void)
22 {
23  rtnl_tc_register(&blackhole_ops);
24 }
25 
26 static void __exit blackhole_exit(void)
27 {
28  rtnl_tc_unregister(&blackhole_ops);
29 }
30 
31 /** @} */
int rtnl_tc_register(struct rtnl_tc_ops *ops)
Register a traffic control module.
Definition: tc.c:1018
void rtnl_tc_unregister(struct rtnl_tc_ops *ops)
Unregister a traffic control module.
Definition: tc.c:1052