blackhole.c 808 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * lib/route/sch/blackhole.c Blackhole Qdisc
  3. *
  4. * This library is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU Lesser General Public
  6. * License as published by the Free Software Foundation version 2.1
  7. * of the License.
  8. *
  9. * Copyright (c) 2003-2006 Thomas Graf <tgraf@suug.ch>
  10. */
  11. /**
  12. * @ingroup qdisc_api
  13. * @defgroup blackhole Blackhole
  14. * @{
  15. */
  16. #include <netlink-local.h>
  17. #include <netlink-tc.h>
  18. #include <netlink/netlink.h>
  19. #include <netlink/route/qdisc.h>
  20. #include <netlink/route/qdisc-modules.h>
  21. static struct rtnl_qdisc_ops blackhole_ops = {
  22. .qo_kind = "blackhole",
  23. };
  24. static void __init blackhole_init(void)
  25. {
  26. rtnl_qdisc_register(&blackhole_ops);
  27. }
  28. static void __exit blackhole_exit(void)
  29. {
  30. rtnl_qdisc_unregister(&blackhole_ops);
  31. }
  32. /** @} */