diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2006-12-08 20:05:13 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-08 20:19:33 -0500 |
commit | d3dcc077bf88806201093f86325ec656e4dbfbce (patch) | |
tree | e0b98255bb4f2161928c9864d917219dfe46b87a /include/linux/if_addr.h | |
parent | 160d5e10f87b1dc88fd9b84b31b1718e0fd76398 (diff) |
[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/linux/if_addr.h')
-rw-r--r-- | include/linux/if_addr.h | 6 |
1 files changed, 6 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 | |||
52 | __u32 tstamp; /* updated timestamp, hundredths of seconds */ | 52 | __u32 tstamp; /* updated timestamp, hundredths of seconds */ |
53 | }; | 53 | }; |
54 | 54 | ||
55 | /* backwards compatibility for userspace */ | ||
56 | #ifndef __KERNEL__ | ||
57 | #define IFA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifaddrmsg)))) | ||
58 | #define IFA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifaddrmsg)) | ||
59 | #endif | ||
60 | |||
55 | #endif | 61 | #endif |