]>
git.proxmox.com Git - mirror_frr.git/blob - nhrpd/znl.h
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /* Netlink helpers for zbuf
3 * Copyright (c) 2014-2015 Timo Teräs
8 #define ZNL_BUFFER_SIZE 8192
10 void *znl_push(struct zbuf
*zb
, size_t n
);
11 void *znl_pull(struct zbuf
*zb
, size_t n
);
13 struct nlmsghdr
*znl_nlmsg_push(struct zbuf
*zb
, uint16_t type
, uint16_t flags
);
14 void znl_nlmsg_complete(struct zbuf
*zb
, struct nlmsghdr
*n
);
15 struct nlmsghdr
*znl_nlmsg_pull(struct zbuf
*zb
, struct zbuf
*payload
);
17 struct rtattr
*znl_rta_push(struct zbuf
*zb
, uint16_t type
, const void *val
,
19 struct rtattr
*znl_rta_push_u32(struct zbuf
*zb
, uint16_t type
, uint32_t val
);
20 struct rtattr
*znl_rta_nested_push(struct zbuf
*zb
, uint16_t type
);
21 void znl_rta_nested_complete(struct zbuf
*zb
, struct rtattr
*rta
);
23 struct rtattr
*znl_rta_pull(struct zbuf
*zb
, struct zbuf
*payload
);
25 int znl_open(int protocol
, int groups
);