From 5a6610190a56c9788b2ba982ae60c93022c6cde1 Mon Sep 17 00:00:00 2001 From: Thomas Graf Date: Fri, 15 Apr 2011 15:31:22 +0200 Subject: dummy interface support --- lib/Makefile.am | 2 +- lib/route/link/dummy.c | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 lib/route/link/dummy.c diff --git a/lib/Makefile.am b/lib/Makefile.am index e8045b7..b7f2e31 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -56,7 +56,7 @@ libnl_route_la_SOURCES = \ route/cls/ematch/nbyte.c route/cls/ematch/text.c \ route/cls/ematch/meta.c \ \ - route/link/api.c route/link/vlan.c \ + route/link/api.c route/link/vlan.c route/link/dummy.c \ route/link/bridge.c route/link/inet6.c route/link/inet.c \ \ route/qdisc/blackhole.c route/qdisc/cbq.c route/qdisc/dsmark.c \ diff --git a/lib/route/link/dummy.c b/lib/route/link/dummy.c new file mode 100644 index 0000000..b837f48 --- /dev/null +++ b/lib/route/link/dummy.c @@ -0,0 +1,38 @@ +/* + * lib/route/link/dummy.c Dummy Interfaces + * + * 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) 2011 Thomas Graf + */ + +/** + * @ingroup link + * @defgroup dummy Dummy + * @brief + * + * @{ + */ + +#include +#include +#include + +static struct rtnl_link_info_ops dummy_info_ops = { + .io_name = "dummy", +}; + +static void __init dummy_init(void) +{ + rtnl_link_register_info(&dummy_info_ops); +} + +static void __exit dummy_exit(void) +{ + rtnl_link_unregister_info(&dummy_info_ops); +} + +/** @} */ -- cgit v1.2.1