mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-12 01:22:11 +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
|
@ -574,13 +574,6 @@ extern int rtattr_parse(struct rtattr *tb[], int maxattr, struct rtattr *rta, in
|
|||
#define rtattr_parse_nested(tb, max, rta) \
|
||||
rtattr_parse((tb), (max), RTA_DATA((rta)), RTA_PAYLOAD((rta)))
|
||||
|
||||
struct rtnetlink_link
|
||||
{
|
||||
int (*doit)(struct sk_buff *, struct nlmsghdr*, void *attr);
|
||||
int (*dumpit)(struct sk_buff *, struct netlink_callback *cb);
|
||||
};
|
||||
|
||||
extern struct rtnetlink_link * rtnetlink_links[NPROTO];
|
||||
extern int rtnetlink_send(struct sk_buff *skb, u32 pid, u32 group, int echo);
|
||||
extern int rtnl_unicast(struct sk_buff *skb, u32 pid);
|
||||
extern int rtnl_notify(struct sk_buff *skb, u32 pid, u32 group,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue