From 370d67ba5678b222ccbdd19647ae81ccc3c97801 Mon Sep 17 00:00:00 2001 From: 5!tgraf <5!tgraf> Date: Tue, 18 Jan 2005 01:24:18 +0000 Subject: [PATCH] Add NLMSG_TAIL macro pointing to the tail of a netlink message (Logical change 1.127) --- include/libnetlink.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/libnetlink.h b/include/libnetlink.h index 08be752e..40587a0e 100644 --- a/include/libnetlink.h +++ b/include/libnetlink.h @@ -46,5 +46,8 @@ extern int rtnl_listen(struct rtnl_handle *, rtnl_filter_t handler, extern int rtnl_from_file(FILE *, rtnl_filter_t handler, void *jarg); +#define NLMSG_TAIL(nmsg) \ + ((struct rtattr *) (((void *) (nmsg)) + NLMSG_ALIGN((nmsg)->nlmsg_len))) + #endif /* __LIBNETLINK_H__ */