]> git.proxmox.com Git - mirror_frr.git/blame - nhrpd/znl.h
zebra: Allow ns delete to happen after under/over flow checks
[mirror_frr.git] / nhrpd / znl.h
CommitLineData
2fb975da
TT
1/* Netlink helpers for zbuf
2 * Copyright (c) 2014-2015 Timo Teräs
3 *
4 * This file is free software: you may copy, redistribute and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 2 of the License, or
7 * (at your option) any later version.
8 */
9
10#include "zbuf.h"
11
12#define ZNL_BUFFER_SIZE 8192
13
14void *znl_push(struct zbuf *zb, size_t n);
15void *znl_pull(struct zbuf *zb, size_t n);
16
17struct nlmsghdr *znl_nlmsg_push(struct zbuf *zb, uint16_t type, uint16_t flags);
18void znl_nlmsg_complete(struct zbuf *zb, struct nlmsghdr *n);
19struct nlmsghdr *znl_nlmsg_pull(struct zbuf *zb, struct zbuf *payload);
20
996c9314
LB
21struct rtattr *znl_rta_push(struct zbuf *zb, uint16_t type, const void *val,
22 size_t len);
2fb975da
TT
23struct rtattr *znl_rta_push_u32(struct zbuf *zb, uint16_t type, uint32_t val);
24struct rtattr *znl_rta_nested_push(struct zbuf *zb, uint16_t type);
25void znl_rta_nested_complete(struct zbuf *zb, struct rtattr *rta);
26
27struct rtattr *znl_rta_pull(struct zbuf *zb, struct zbuf *payload);
28
29int znl_open(int protocol, int groups);