diff options
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 | |||
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 |
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. |