From f40817b41af1b30fc0e635e05d8f82d06aabe776 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Fri, 8 Dec 2006 17:05:13 -0800 Subject: [PATCH] --- yaml --- r: 43895 b: refs/heads/master c: d3dcc077bf88806201093f86325ec656e4dbfbce h: refs/heads/master i: 43893: d11feebcfa0eea2e96d9a761a47e5e8b86b00869 43891: d3455fa04419424886bd829dc0a6248bb8d8fb2b 43887: 1497bf9289af13fe8fb6a148a6cb2af48b6b7102 v: v3 --- [refs] | 2 +- trunk/include/linux/if_addr.h | 6 ++++++ trunk/include/linux/if_link.h | 6 ++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index e27c019bb590..a1f1446a4027 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 160d5e10f87b1dc88fd9b84b31b1718e0fd76398 +refs/heads/master: d3dcc077bf88806201093f86325ec656e4dbfbce diff --git a/trunk/include/linux/if_addr.h b/trunk/include/linux/if_addr.h index dbe8f6120a40..d557e4ce9b6b 100644 --- a/trunk/include/linux/if_addr.h +++ b/trunk/include/linux/if_addr.h @@ -52,4 +52,10 @@ struct ifa_cacheinfo __u32 tstamp; /* updated timestamp, hundredths of seconds */ }; +/* backwards compatibility for userspace */ +#ifndef __KERNEL__ +#define IFA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifaddrmsg)))) +#define IFA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifaddrmsg)) +#endif + #endif diff --git a/trunk/include/linux/if_link.h b/trunk/include/linux/if_link.h index e963a077e6f5..35ed3b5467f3 100644 --- a/trunk/include/linux/if_link.h +++ b/trunk/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.