]> git.proxmox.com Git - mirror_frr.git/blame - nhrpd/znl.h
Merge pull request #13649 from donaldsharp/unlock_the_node_or_else
[mirror_frr.git] / nhrpd / znl.h
CommitLineData
acddc0ed 1// SPDX-License-Identifier: GPL-2.0-or-later
2fb975da
TT
2/* Netlink helpers for zbuf
3 * Copyright (c) 2014-2015 Timo Teräs
2fb975da
TT
4 */
5
6#include "zbuf.h"
7
8#define ZNL_BUFFER_SIZE 8192
9
10void *znl_push(struct zbuf *zb, size_t n);
11void *znl_pull(struct zbuf *zb, size_t n);
12
13struct nlmsghdr *znl_nlmsg_push(struct zbuf *zb, uint16_t type, uint16_t flags);
14void znl_nlmsg_complete(struct zbuf *zb, struct nlmsghdr *n);
15struct nlmsghdr *znl_nlmsg_pull(struct zbuf *zb, struct zbuf *payload);
16
996c9314
LB
17struct rtattr *znl_rta_push(struct zbuf *zb, uint16_t type, const void *val,
18 size_t len);
2fb975da
TT
19struct rtattr *znl_rta_push_u32(struct zbuf *zb, uint16_t type, uint32_t val);
20struct rtattr *znl_rta_nested_push(struct zbuf *zb, uint16_t type);
21void znl_rta_nested_complete(struct zbuf *zb, struct rtattr *rta);
22
23struct rtattr *znl_rta_pull(struct zbuf *zb, struct zbuf *payload);
24
25int znl_open(int protocol, int groups);