summaryrefslogtreecommitdiff
path: root/include/linux/if_link.h
diff options
context:
space:
mode:
authorDavid Miller <davem@davemloft.net>2006-12-08 17:14:38 -0800
committerChris Wright <chrisw@sous-sol.org>2006-12-11 11:32:41 -0800
commitf558fdfaa8d62e33ef47a819d1ca659a8f9e1f1a (patch)
tree310bc872e7f6c72da0b31a7c8401138e39989110 /include/linux/if_link.h
parent39a173632d043082157b4b002e956b3131556eea (diff)
[PATCH] NETLINK: Put {IFA,IFLA}_{RTA,PAYLOAD} macros back for userspace.
GLIBC uses them etc. They are guarded by ifndef __KERNEL__ so nobody will start accidently using them in the kernel again, it's just for userspace. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Diffstat (limited to 'include/linux/if_link.h')
-rw-r--r--include/linux/if_link.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/if_link.h b/include/linux/if_link.h
index e963a077e6f5..35ed3b5467f3 100644
--- a/include/linux/if_link.h
+++ b/include/linux/if_link.h
@@ -82,6 +82,12 @@ enum
#define IFLA_MAX (__IFLA_MAX - 1)
+/* backwards compatibility for userspace */
+#ifndef __KERNEL__
+#define IFLA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifinfomsg))))
+#define IFLA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifinfomsg))
+#endif
+
/* ifi_flags.
IFF_* flags.