mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
[RTNL]: Message handler registration interface
This patch adds a new interface to register rtnetlink message handlers replacing the exported rtnl_links[] array which required many message handlers to be exported unnecessarly. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
30833ffead
commit
e284986385
3 changed files with 184 additions and 29 deletions
18
include/net/rtnetlink.h
Normal file
18
include/net/rtnetlink.h
Normal file
|
@ -0,0 +1,18 @@
|
|||
#ifndef __NET_RTNETLINK_H
|
||||
#define __NET_RTNETLINK_H
|
||||
|
||||
#include <linux/rtnetlink.h>
|
||||
#include <net/netlink.h>
|
||||
|
||||
typedef int (*rtnl_doit_func)(struct sk_buff *, struct nlmsghdr *, void *);
|
||||
typedef int (*rtnl_dumpit_func)(struct sk_buff *, struct netlink_callback *);
|
||||
|
||||
extern int __rtnl_register(int protocol, int msgtype,
|
||||
rtnl_doit_func, rtnl_dumpit_func);
|
||||
extern void rtnl_register(int protocol, int msgtype,
|
||||
rtnl_doit_func, rtnl_dumpit_func);
|
||||
extern int rtnl_unregister(int protocol, int msgtype);
|
||||
extern void rtnl_unregister_all(int protocol);
|
||||
extern int rtnl_dump_all(struct sk_buff *skb, struct netlink_callback *cb);
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue