libnl  3.2.3
/build/buildd/libnl3-3.2.3/lib/route/qdisc/blackhole.c
00001 /*
00002  * lib/route/qdisc/blackhole.c  Blackhole Qdisc
00003  *
00004  *      This library is free software; you can redistribute it and/or
00005  *      modify it under the terms of the GNU Lesser General Public
00006  *      License as published by the Free Software Foundation version 2.1
00007  *      of the License.
00008  *
00009  * Copyright (c) 2003-2011 Thomas Graf <tgraf@suug.ch>
00010  */
00011 
00012 /**
00013  * @ingroup qdisc
00014  * @defgroup qdisc_blackhole Blackhole
00015  * @{
00016  */
00017 
00018 #include <netlink-local.h>
00019 #include <netlink/netlink.h>
00020 #include <netlink/route/tc-api.h>
00021 
00022 static struct rtnl_tc_ops blackhole_ops = {
00023         .to_kind                = "blackhole",
00024         .to_type                = RTNL_TC_TYPE_QDISC,
00025 };
00026 
00027 static void __init blackhole_init(void)
00028 {
00029         rtnl_tc_register(&blackhole_ops);
00030 }
00031 
00032 static void __exit blackhole_exit(void)
00033 {
00034         rtnl_tc_unregister(&blackhole_ops);
00035 }
00036 
00037 /** @} */