blob: 7ee48f91699712b4361d2613de5ef004171848ba [file] [log] [blame]
Sven Eckelmann7db7d9f2017-11-19 15:05:11 +01001/* SPDX-License-Identifier: GPL-2.0 */
Sven Eckelmann68e039f2020-01-01 00:00:01 +01002/* Copyright (C) 2016-2020 B.A.T.M.A.N. contributors:
Matthias Schiffer09748a22016-05-09 18:41:08 +02003 *
4 * Matthias Schiffer
Matthias Schiffer09748a22016-05-09 18:41:08 +02005 */
6
7#ifndef _NET_BATMAN_ADV_NETLINK_H_
8#define _NET_BATMAN_ADV_NETLINK_H_
9
10#include "main.h"
11
Sven Eckelmann68a600d2019-05-24 20:11:17 +020012#include <linux/netlink.h>
Antonio Quartulli33a3bb42016-05-05 13:09:43 +020013#include <linux/types.h>
Matthias Schiffer07a30612016-07-03 13:31:35 +020014#include <net/genetlink.h>
Antonio Quartulli33a3bb42016-05-05 13:09:43 +020015
Matthias Schiffer09748a22016-05-09 18:41:08 +020016void batadv_netlink_register(void);
17void batadv_netlink_unregister(void);
Matthias Schifferd34f0552016-07-03 13:31:37 +020018int batadv_netlink_get_ifindex(const struct nlmsghdr *nlh, int attrtype);
Matthias Schiffer09748a22016-05-09 18:41:08 +020019
Antonio Quartulli33a3bb42016-05-05 13:09:43 +020020int batadv_netlink_tpmeter_notify(struct batadv_priv *bat_priv, const u8 *dst,
21 u8 result, u32 test_time, u64 total_bytes,
22 u32 cookie);
23
Sven Eckelmann7e6f4612018-11-23 16:07:12 +010024int batadv_netlink_notify_mesh(struct batadv_priv *bat_priv);
25int batadv_netlink_notify_hardif(struct batadv_priv *bat_priv,
26 struct batadv_hard_iface *hard_iface);
27int batadv_netlink_notify_vlan(struct batadv_priv *bat_priv,
28 struct batadv_softif_vlan *vlan);
29
Matthias Schiffer07a30612016-07-03 13:31:35 +020030extern struct genl_family batadv_netlink_family;
31
Matthias Schiffer09748a22016-05-09 18:41:08 +020032#endif /* _NET_BATMAN_ADV_NETLINK_H_ */