From e284986385b6420a5f30f2dcd743512bbe1a3202 Mon Sep 17 00:00:00 2001 From: Thomas Graf Date: Thu, 22 Mar 2007 11:48:11 -0700 Subject: [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 Signed-off-by: David S. Miller --- include/net/rtnetlink.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 include/net/rtnetlink.h (limited to 'include/net/rtnetlink.h') diff --git a/include/net/rtnetlink.h b/include/net/rtnetlink.h new file mode 100644 index 000000000000..dce7072bd28c --- /dev/null +++ b/include/net/rtnetlink.h @@ -0,0 +1,18 @@ +#ifndef __NET_RTNETLINK_H +#define __NET_RTNETLINK_H + +#include +#include + +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 -- cgit v1.2.3-59-g8ed1b