]> git.proxmox.com Git - mirror_iproute2.git/blame - include/libgenl.h
ll_map: Add function to remove link cache entry by index
[mirror_iproute2.git] / include / libgenl.h
CommitLineData
6054c1eb 1/* SPDX-License-Identifier: GPL-2.0 */
8afcc288
JA
2#ifndef __LIBGENL_H__
3#define __LIBGENL_H__
4
5#include "libnetlink.h"
6
328d482c 7#define GENL_REQUEST(_req, _bufsiz, _family, _hdrsiz, _ver, _cmd, _flags) \
8afcc288
JA
8struct { \
9 struct nlmsghdr n; \
10 struct genlmsghdr g; \
11 char buf[NLMSG_ALIGN(_hdrsiz) + (_bufsiz)]; \
328d482c
JA
12} _req = { \
13 .n = { \
14 .nlmsg_type = (_family), \
15 .nlmsg_flags = (_flags), \
16 .nlmsg_len = NLMSG_LENGTH(GENL_HDRLEN + (_hdrsiz)), \
17 }, \
18 .g = { \
19 .cmd = (_cmd), \
20 .version = (_ver), \
21 }, \
22}
8afcc288 23
ae775666
SH
24int genl_resolve_family(struct rtnl_handle *grth, const char *family);
25int genl_init_handle(struct rtnl_handle *grth, const char *family,
26 int *genl_family);
8afcc288
JA
27
28#endif /* __LIBGENL_H__ */