diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2006-12-09 02:05:13 +0100 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-09 02:19:33 +0100 |
commit | d3dcc077bf88806201093f86325ec656e4dbfbce (patch) | |
tree | e0b98255bb4f2161928c9864d917219dfe46b87a /include | |
parent | [NET_SCHED] sch_htb: turn intermediate classes into leaves (diff) | |
download | linux-d3dcc077bf88806201093f86325ec656e4dbfbce.tar.xz linux-d3dcc077bf88806201093f86325ec656e4dbfbce.zip |
[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>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/if_addr.h | 6 | ||||
-rw-r--r-- | include/linux/if_link.h | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/if_addr.h b/include/linux/if_addr.h index dbe8f6120a40..d557e4ce9b6b 100644 --- a/include/linux/if_addr.h +++ b/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/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. |