summaryrefslogtreecommitdiff
path: root/zebra/kernel_netlink.h
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/kernel_netlink.h')
-rw-r--r--zebra/kernel_netlink.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/zebra/kernel_netlink.h b/zebra/kernel_netlink.h
index a7b152b31b..cf8b8c785e 100644
--- a/zebra/kernel_netlink.h
+++ b/zebra/kernel_netlink.h
@@ -27,6 +27,10 @@ extern "C" {
#ifdef HAVE_NETLINK
+#define RTM_NHA(h) \
+ ((struct rtattr *)(((char *)(h)) + NLMSG_ALIGN(sizeof(struct nhmsg))))
+
+
#define NL_RCV_PKT_BUF_SIZE 32768
#define NL_PKT_BUF_SIZE 8192
@@ -38,6 +42,8 @@ extern "C" {
*/
extern bool nl_attr_put(struct nlmsghdr *n, unsigned int maxlen, int type,
const void *data, unsigned int alen);
+extern bool nl_attr_put8(struct nlmsghdr *n, unsigned int maxlen, int type,
+ uint8_t data);
extern bool nl_attr_put16(struct nlmsghdr *n, unsigned int maxlen, int type,
uint16_t data);
extern bool nl_attr_put32(struct nlmsghdr *n, unsigned int maxlen, int type,
@@ -92,11 +98,11 @@ extern const char *nl_rttype_to_str(uint8_t rttype);
extern int netlink_parse_info(int (*filter)(struct nlmsghdr *, ns_id_t, int),
const struct nlsock *nl,
const struct zebra_dplane_info *dp_info,
- int count, int startup);
+ int count, bool startup);
extern int netlink_talk_filter(struct nlmsghdr *h, ns_id_t ns, int startup);
extern int netlink_talk(int (*filter)(struct nlmsghdr *, ns_id_t, int startup),
struct nlmsghdr *n, struct nlsock *nl,
- struct zebra_ns *zns, int startup);
+ struct zebra_ns *zns, bool startup);
extern int netlink_request(struct nlsock *nl, void *req);
enum netlink_msg_status {