mirror of
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git
synced 2024-11-15 22:15:13 +08:00
6054c1ebf7
For all files in iproute2 which do not have an obvious license identification, mark them with SPDK GPL-2 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
29 lines
767 B
C
29 lines
767 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#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);
|
|
extern int genl_init_handle(struct rtnl_handle *grth, const char *family,
|
|
int *genl_family);
|
|
|
|
#endif /* __LIBGENL_H__ */
|