1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright (C) B.A.T.M.A.N. contributors:
4 * Marek Lindner, Simon Wunderlich
7 #ifndef _NET_BATMAN_ADV_TVLV_H_
8 #define _NET_BATMAN_ADV_TVLV_H_
12 #include <linux/skbuff.h>
13 #include <linux/types.h>
14 #include <uapi/linux/batadv_packet.h>
16 void batadv_tvlv_container_register(struct batadv_priv
*bat_priv
,
18 void *tvlv_value
, u16 tvlv_value_len
);
19 u16
batadv_tvlv_container_ogm_append(struct batadv_priv
*bat_priv
,
20 unsigned char **packet_buff
,
21 int *packet_buff_len
, int packet_min_len
);
22 void batadv_tvlv_ogm_receive(struct batadv_priv
*bat_priv
,
23 struct batadv_ogm_packet
*batadv_ogm_packet
,
24 struct batadv_orig_node
*orig_node
);
25 void batadv_tvlv_container_unregister(struct batadv_priv
*bat_priv
,
28 void batadv_tvlv_handler_register(struct batadv_priv
*bat_priv
,
29 void (*optr
)(struct batadv_priv
*bat_priv
,
30 struct batadv_orig_node
*orig
,
34 int (*uptr
)(struct batadv_priv
*bat_priv
,
38 int (*mptr
)(struct batadv_priv
*bat_priv
,
40 u8 type
, u8 version
, u8 flags
);
41 void batadv_tvlv_handler_unregister(struct batadv_priv
*bat_priv
,
43 int batadv_tvlv_containers_process(struct batadv_priv
*bat_priv
,
45 struct batadv_orig_node
*orig_node
,
46 struct sk_buff
*skb
, void *tvlv_buff
,
48 void batadv_tvlv_unicast_send(struct batadv_priv
*bat_priv
, const u8
*src
,
49 const u8
*dst
, u8 type
, u8 version
,
50 void *tvlv_value
, u16 tvlv_value_len
);
52 #endif /* _NET_BATMAN_ADV_TVLV_H_ */