Blame include/libgenl.h

Packit Service 3880ab
/* SPDX-License-Identifier: GPL-2.0 */
Packit Service 3880ab
#ifndef __LIBGENL_H__
Packit Service 3880ab
#define __LIBGENL_H__
Packit Service 3880ab
Packit Service 3880ab
#include "libnetlink.h"
Packit Service 3880ab
Packit Service 3880ab
#define GENL_REQUEST(_req, _bufsiz, _family, _hdrsiz, _ver, _cmd, _flags) \
Packit Service 3880ab
struct {								\
Packit Service 3880ab
	struct nlmsghdr		n;					\
Packit Service 3880ab
	struct genlmsghdr	g;					\
Packit Service 3880ab
	char			buf[NLMSG_ALIGN(_hdrsiz) + (_bufsiz)];	\
Packit Service 3880ab
} _req = {								\
Packit Service 3880ab
	.n = {								\
Packit Service 3880ab
		.nlmsg_type = (_family),				\
Packit Service 3880ab
		.nlmsg_flags = (_flags),				\
Packit Service 3880ab
		.nlmsg_len = NLMSG_LENGTH(GENL_HDRLEN + (_hdrsiz)),	\
Packit Service 3880ab
	},								\
Packit Service 3880ab
	.g = {								\
Packit Service 3880ab
		.cmd = (_cmd),						\
Packit Service 3880ab
		.version = (_ver),					\
Packit Service 3880ab
	},								\
Packit Service 3880ab
}
Packit Service 3880ab
Packit Service 3880ab
int genl_resolve_family(struct rtnl_handle *grth, const char *family);
Packit Service 3880ab
int genl_init_handle(struct rtnl_handle *grth, const char *family,
Packit Service 3880ab
		     int *genl_family);
Packit Service 3880ab
Packit Service 3880ab
#endif /* __LIBGENL_H__ */