xref: /openbmc/linux/net/batman-adv/netlink.h (revision bb3982b4)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright (C) 2016-2019  B.A.T.M.A.N. contributors:
3  *
4  * Matthias Schiffer
5  */
6 
7 #ifndef _NET_BATMAN_ADV_NETLINK_H_
8 #define _NET_BATMAN_ADV_NETLINK_H_
9 
10 #include "main.h"
11 
12 #include <linux/types.h>
13 #include <net/genetlink.h>
14 
15 struct nlmsghdr;
16 
17 void batadv_netlink_register(void);
18 void batadv_netlink_unregister(void);
19 int batadv_netlink_get_ifindex(const struct nlmsghdr *nlh, int attrtype);
20 
21 int batadv_netlink_tpmeter_notify(struct batadv_priv *bat_priv, const u8 *dst,
22 				  u8 result, u32 test_time, u64 total_bytes,
23 				  u32 cookie);
24 
25 int batadv_netlink_notify_mesh(struct batadv_priv *bat_priv);
26 int batadv_netlink_notify_hardif(struct batadv_priv *bat_priv,
27 				 struct batadv_hard_iface *hard_iface);
28 int batadv_netlink_notify_vlan(struct batadv_priv *bat_priv,
29 			       struct batadv_softif_vlan *vlan);
30 
31 extern struct genl_family batadv_netlink_family;
32 
33 #endif /* _NET_BATMAN_ADV_NETLINK_H_ */
34