summaryrefslogtreecommitdiffstats
path: root/include/net/rtnetlink.h
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2007-04-30 04:38:01 +0200
committerPaul Mackerras <paulus@samba.org>2007-04-30 04:38:01 +0200
commit49e1900d4cc2e7bcecb681fe60f0990bec2dcce8 (patch)
tree253801ebf57e0a23856a2c7be129c2c178f62fdf /include/net/rtnetlink.h
parent[POWERPC] remove kernel module option for booke wdt (diff)
parentMerge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/... (diff)
downloadlinux-49e1900d4cc2e7bcecb681fe60f0990bec2dcce8.tar.xz
linux-49e1900d4cc2e7bcecb681fe60f0990bec2dcce8.zip
Merge branch 'linux-2.6' into for-2.6.22
Diffstat (limited to 'include/net/rtnetlink.h')
-rw-r--r--include/net/rtnetlink.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/include/net/rtnetlink.h b/include/net/rtnetlink.h
new file mode 100644
index 000000000000..3b3d4745618d
--- /dev/null
+++ b/include/net/rtnetlink.h
@@ -0,0 +1,25 @@
+#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);
+
+static inline int rtnl_msg_family(struct nlmsghdr *nlh)
+{
+ if (nlmsg_len(nlh) >= sizeof(struct rtgenmsg))
+ return ((struct rtgenmsg *) nlmsg_data(nlh))->rtgen_family;
+ else
+ return AF_UNSPEC;
+}
+
+#endif