summaryrefslogtreecommitdiffstats
path: root/include/linux/if_addr.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/if_addr.h')
-rw-r--r--include/linux/if_addr.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/if_addr.h b/include/linux/if_addr.h
index dbe8f6120a4..d557e4ce9b6 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