blackhole.c 790 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * lib/route/qdisc/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-2011 Thomas Graf <tgraf@suug.ch>
  10. */
  11. /**
  12. * @ingroup qdisc
  13. * @defgroup qdisc_blackhole Blackhole
  14. * @{
  15. */
  16. #include <netlink-private/netlink.h>
  17. #include <netlink/netlink.h>
  18. #include <netlink-private/route/tc-api.h>
  19. static struct rtnl_tc_ops blackhole_ops = {
  20. .to_kind = "blackhole",
  21. .to_type = RTNL_TC_TYPE_QDISC,
  22. };
  23. static void __init blackhole_init(void)
  24. {
  25. rtnl_tc_register(&blackhole_ops);
  26. }
  27. static void __exit blackhole_exit(void)
  28. {
  29. rtnl_tc_unregister(&blackhole_ops);
  30. }
  31. /** @} */