Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d3dcc077 authored by David S. Miller's avatar David S. Miller
Browse files

[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: default avatarDavid S. Miller <davem@davemloft.net>
parent 160d5e10
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -52,4 +52,10 @@ struct ifa_cacheinfo
	__u32	tstamp; /* updated timestamp, hundredths of seconds */
	__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
#endif
+6 −0
Original line number Original line Diff line number Diff line
@@ -82,6 +82,12 @@ enum


#define IFLA_MAX (__IFLA_MAX - 1)
#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.
/* ifi_flags.


   IFF_* flags.
   IFF_* flags.