]> err.no Git - linux-2.6/blobdiff - include/net/rtnetlink.h
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
[linux-2.6] / include / net / rtnetlink.h
index dce7072bd28cfd830cab114ba147ba9592497605..3b3d4745618ddac7c07ba1afa2826b798917be83 100644 (file)
@@ -13,6 +13,13 @@ 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);
+
+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