mirror of
https://git.proxmox.com/git/mirror_iproute2
synced 2025-10-10 12:56:21 +00:00

Both macros are used together, so better to have single define. Update all requests in ipl2tp.c to use the new macro. Signed-off-by: Julian Anastasov <ja@ssi.bg>
26 lines
628 B
C
26 lines
628 B
C
#ifndef __LIBGENL_H__
|
|
#define __LIBGENL_H__
|
|
|
|
#include "libnetlink.h"
|
|
|
|
#define GENL_REQUEST(_req, _bufsiz, _family, _hdrsiz, _ver, _cmd, _flags) \
|
|
struct { \
|
|
struct nlmsghdr n; \
|
|
struct genlmsghdr g; \
|
|
char buf[NLMSG_ALIGN(_hdrsiz) + (_bufsiz)]; \
|
|
} _req = { \
|
|
.n = { \
|
|
.nlmsg_type = (_family), \
|
|
.nlmsg_flags = (_flags), \
|
|
.nlmsg_len = NLMSG_LENGTH(GENL_HDRLEN + (_hdrsiz)), \
|
|
}, \
|
|
.g = { \
|
|
.cmd = (_cmd), \
|
|
.version = (_ver), \
|
|
}, \
|
|
}
|
|
|
|
extern int genl_resolve_family(struct rtnl_handle *grth, const char *family);
|
|
|
|
#endif /* __LIBGENL_H__ */
|