libnl 3.7.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
16static struct rtnl_tc_ops blackhole_ops = {
17 .to_kind = "blackhole",
18 .to_type = RTNL_TC_TYPE_QDISC,
19};
20
21static void __init blackhole_init(void)
22{
23 rtnl_tc_register(&blackhole_ops);
24}
25
26static 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:1015
void rtnl_tc_unregister(struct rtnl_tc_ops *ops)
Unregister a traffic control module.
Definition: tc.c:1049