summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2013-06-21 21:38:07 +0400
committerDavid S. Miller <davem@davemloft.net>2013-06-25 03:39:05 +0400
commitbcbde0d449eda7afa8f63280b165c8300dbd00e2 (patch)
treedbe6689bfee850c54006291e939718c685de1158 /include/linux
parent77e2af0312b12dccd5043a7cc9cd49ab6a212996 (diff)
downloadlinux-bcbde0d449eda7afa8f63280b165c8300dbd00e2.tar.xz
net: netlink: virtual tap device management
Similarly to the networking receive path with ptype_all taps, we add the possibility to register netdevices that are for ARPHRD_NETLINK to the netlink subsystem, so that those can be used for netlink analyzers resp. debuggers. We do not offer a direct callback function as out-of-tree modules could do crap with it. Instead, a netdevice must be registered properly and only receives a clone, managed by the netlink layer. Symbols are exported as GPL-only. Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/netlink.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/netlink.h b/include/linux/netlink.h
index f78b430f4af5..86fde81ac2e6 100644
--- a/include/linux/netlink.h
+++ b/include/linux/netlink.h
@@ -145,4 +145,14 @@ static inline int netlink_dump_start(struct sock *ssk, struct sk_buff *skb,
return __netlink_dump_start(ssk, skb, nlh, control);
}
+struct netlink_tap {
+ struct net_device *dev;
+ struct module *module;
+ struct list_head list;
+};
+
+extern int netlink_add_tap(struct netlink_tap *nt);
+extern int __netlink_remove_tap(struct netlink_tap *nt);
+extern int netlink_remove_tap(struct netlink_tap *nt);
+
#endif /* __LINUX_NETLINK_H */