diff options
author | Daniel Borkmann <dborkman@redhat.com> | 2013-06-21 13:38:07 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-06-24 19:39:05 -0400 |
commit | bcbde0d449eda7afa8f63280b165c8300dbd00e2 (patch) | |
tree | dbe6689bfee850c54006291e939718c685de1158 /include/linux/netlink.h | |
parent | 77e2af0312b12dccd5043a7cc9cd49ab6a212996 (diff) |
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/netlink.h')
-rw-r--r-- | include/linux/netlink.h | 10 |
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, | |||
145 | return __netlink_dump_start(ssk, skb, nlh, control); | 145 | return __netlink_dump_start(ssk, skb, nlh, control); |
146 | } | 146 | } |
147 | 147 | ||
148 | struct netlink_tap { | ||
149 | struct net_device *dev; | ||
150 | struct module *module; | ||
151 | struct list_head list; | ||
152 | }; | ||
153 | |||
154 | extern int netlink_add_tap(struct netlink_tap *nt); | ||
155 | extern int __netlink_remove_tap(struct netlink_tap *nt); | ||
156 | extern int netlink_remove_tap(struct netlink_tap *nt); | ||
157 | |||
148 | #endif /* __LINUX_NETLINK_H */ | 158 | #endif /* __LINUX_NETLINK_H */ |