1 /* Copyright (C) 2007-2017 B.A.T.M.A.N. contributors:
3 * Marek Lindner, Simon Wunderlich
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of version 2 of the GNU General Public
7 * License as published by the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, see <http://www.gnu.org/licenses/>.
18 #ifndef _NET_BATMAN_ADV_TVLV_H_
19 #define _NET_BATMAN_ADV_TVLV_H_
23 #include <linux/types.h>
25 struct batadv_ogm_packet;
27 void batadv_tvlv_container_register(struct batadv_priv *bat_priv,
29 void *tvlv_value, u16 tvlv_value_len);
30 u16 batadv_tvlv_container_ogm_append(struct batadv_priv *bat_priv,
31 unsigned char **packet_buff,
32 int *packet_buff_len, int packet_min_len);
33 void batadv_tvlv_ogm_receive(struct batadv_priv *bat_priv,
34 struct batadv_ogm_packet *batadv_ogm_packet,
35 struct batadv_orig_node *orig_node);
36 void batadv_tvlv_container_unregister(struct batadv_priv *bat_priv,
39 void batadv_tvlv_handler_register(struct batadv_priv *bat_priv,
40 void (*optr)(struct batadv_priv *bat_priv,
41 struct batadv_orig_node *orig,
45 int (*uptr)(struct batadv_priv *bat_priv,
49 u8 type, u8 version, u8 flags);
50 void batadv_tvlv_handler_unregister(struct batadv_priv *bat_priv,
52 int batadv_tvlv_containers_process(struct batadv_priv *bat_priv,
54 struct batadv_orig_node *orig_node,
56 void *tvlv_buff, u16 tvlv_buff_len);
57 void batadv_tvlv_unicast_send(struct batadv_priv *bat_priv, u8 *src,
58 u8 *dst, u8 type, u8 version,
59 void *tvlv_value, u16 tvlv_value_len);
61 #endif /* _NET_BATMAN_ADV_TVLV_H_ */