aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/if_link.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2006-12-08 20:05:13 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-08 20:19:33 -0500
commitd3dcc077bf88806201093f86325ec656e4dbfbce (patch)
treee0b98255bb4f2161928c9864d917219dfe46b87a /include/linux/if_link.h
parent160d5e10f87b1dc88fd9b84b31b1718e0fd76398 (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_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
82 82
83#define IFLA_MAX (__IFLA_MAX - 1) 83#define IFLA_MAX (__IFLA_MAX - 1)
84 84
85/* backwards compatibility for userspace */
86#ifndef __KERNEL__
87#define IFLA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifinfomsg))))
88#define IFLA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifinfomsg))
89#endif
90
85/* ifi_flags. 91/* ifi_flags.
86 92
87 IFF_* flags. 93 IFF_* flags.