summaryrefslogtreecommitdiffstats
path: root/lib/route/qdisc/blackhole.c
diff options
context:
space:
mode:
authorThomas Graf <tgraf@suug.ch>2011-03-21 15:47:42 (GMT)
committerThomas Graf <tgraf@suug.ch>2011-03-21 15:47:42 (GMT)
commit45941f9d5f5f141e67cf2b6688c287aa5b52a4fd (patch)
tree21d321ab818f6ae46deeff949ae3613733deb39f /lib/route/qdisc/blackhole.c
parent8eb5b5532eae985a5f0911dccf2db8cb4e0a5de4 (diff)
downloadlibnl-45941f9d5f5f141e67cf2b6688c287aa5b52a4fd.zip
libnl-45941f9d5f5f141e67cf2b6688c287aa5b52a4fd.tar.gz
libnl-45941f9d5f5f141e67cf2b6688c287aa5b52a4fd.tar.bz2
rename sch -> qdisc
Diffstat (limited to 'lib/route/qdisc/blackhole.c')
-rw-r--r--lib/route/qdisc/blackhole.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/lib/route/qdisc/blackhole.c b/lib/route/qdisc/blackhole.c
new file mode 100644
index 0000000..06f5380
--- /dev/null
+++ b/lib/route/qdisc/blackhole.c
@@ -0,0 +1,37 @@
+/*
+ * lib/route/qdisc/blackhole.c Blackhole Qdisc
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * Copyright (c) 2003-2011 Thomas Graf <tgraf@suug.ch>
+ */
+
+/**
+ * @ingroup qdisc
+ * @defgroup qdisc_blackhole Blackhole
+ * @{
+ */
+
+#include <netlink-local.h>
+#include <netlink/netlink.h>
+#include <netlink/route/tc-api.h>
+
+static struct rtnl_tc_ops blackhole_ops = {
+ .to_kind = "blackhole",
+ .to_type = RTNL_TC_TYPE_QDISC,
+};
+
+static void __init blackhole_init(void)
+{
+ rtnl_tc_register(&blackhole_ops);
+}
+
+static void __exit blackhole_exit(void)
+{
+ rtnl_tc_unregister(&blackhole_ops);
+}
+
+/** @} */