mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
77e2af0312
commit
bcbde0d449
2 changed files with 117 additions and 0 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue