Sven Eckelmann | 7db7d9f | 2017-11-19 15:05:11 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Sven Eckelmann | 68e039f | 2020-01-01 00:00:01 +0100 | [diff] [blame] | 2 | /* Copyright (C) 2016-2020 B.A.T.M.A.N. contributors: |
Matthias Schiffer | 09748a2 | 2016-05-09 18:41:08 +0200 | [diff] [blame] | 3 | * |
| 4 | * Matthias Schiffer |
Matthias Schiffer | 09748a2 | 2016-05-09 18:41:08 +0200 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #ifndef _NET_BATMAN_ADV_NETLINK_H_ |
| 8 | #define _NET_BATMAN_ADV_NETLINK_H_ |
| 9 | |
| 10 | #include "main.h" |
| 11 | |
Sven Eckelmann | 68a600d | 2019-05-24 20:11:17 +0200 | [diff] [blame] | 12 | #include <linux/netlink.h> |
Antonio Quartulli | 33a3bb4 | 2016-05-05 13:09:43 +0200 | [diff] [blame] | 13 | #include <linux/types.h> |
Matthias Schiffer | 07a3061 | 2016-07-03 13:31:35 +0200 | [diff] [blame] | 14 | #include <net/genetlink.h> |
Antonio Quartulli | 33a3bb4 | 2016-05-05 13:09:43 +0200 | [diff] [blame] | 15 | |
Matthias Schiffer | 09748a2 | 2016-05-09 18:41:08 +0200 | [diff] [blame] | 16 | void batadv_netlink_register(void); |
| 17 | void batadv_netlink_unregister(void); |
Matthias Schiffer | d34f055 | 2016-07-03 13:31:37 +0200 | [diff] [blame] | 18 | int batadv_netlink_get_ifindex(const struct nlmsghdr *nlh, int attrtype); |
Matthias Schiffer | 09748a2 | 2016-05-09 18:41:08 +0200 | [diff] [blame] | 19 | |
Antonio Quartulli | 33a3bb4 | 2016-05-05 13:09:43 +0200 | [diff] [blame] | 20 | int 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 Eckelmann | 7e6f461 | 2018-11-23 16:07:12 +0100 | [diff] [blame] | 24 | int batadv_netlink_notify_mesh(struct batadv_priv *bat_priv); |
| 25 | int batadv_netlink_notify_hardif(struct batadv_priv *bat_priv, |
| 26 | struct batadv_hard_iface *hard_iface); |
| 27 | int batadv_netlink_notify_vlan(struct batadv_priv *bat_priv, |
| 28 | struct batadv_softif_vlan *vlan); |
| 29 | |
Matthias Schiffer | 07a3061 | 2016-07-03 13:31:35 +0200 | [diff] [blame] | 30 | extern struct genl_family batadv_netlink_family; |
| 31 | |
Matthias Schiffer | 09748a2 | 2016-05-09 18:41:08 +0200 | [diff] [blame] | 32 | #endif /* _NET_BATMAN_ADV_NETLINK_H_ */ |