1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19#ifndef _NET_BATMAN_ADV_TVLV_H_
20#define _NET_BATMAN_ADV_TVLV_H_
21
22#include "main.h"
23
24#include <linux/types.h>
25
26struct batadv_ogm_packet;
27
28void batadv_tvlv_container_register(struct batadv_priv *bat_priv,
29 u8 type, u8 version,
30 void *tvlv_value, u16 tvlv_value_len);
31u16 batadv_tvlv_container_ogm_append(struct batadv_priv *bat_priv,
32 unsigned char **packet_buff,
33 int *packet_buff_len, int packet_min_len);
34void batadv_tvlv_ogm_receive(struct batadv_priv *bat_priv,
35 struct batadv_ogm_packet *batadv_ogm_packet,
36 struct batadv_orig_node *orig_node);
37void batadv_tvlv_container_unregister(struct batadv_priv *bat_priv,
38 u8 type, u8 version);
39
40void batadv_tvlv_handler_register(struct batadv_priv *bat_priv,
41 void (*optr)(struct batadv_priv *bat_priv,
42 struct batadv_orig_node *orig,
43 u8 flags,
44 void *tvlv_value,
45 u16 tvlv_value_len),
46 int (*uptr)(struct batadv_priv *bat_priv,
47 u8 *src, u8 *dst,
48 void *tvlv_value,
49 u16 tvlv_value_len),
50 u8 type, u8 version, u8 flags);
51void batadv_tvlv_handler_unregister(struct batadv_priv *bat_priv,
52 u8 type, u8 version);
53int batadv_tvlv_containers_process(struct batadv_priv *bat_priv,
54 bool ogm_source,
55 struct batadv_orig_node *orig_node,
56 u8 *src, u8 *dst,
57 void *tvlv_buff, u16 tvlv_buff_len);
58void batadv_tvlv_unicast_send(struct batadv_priv *bat_priv, u8 *src,
59 u8 *dst, u8 type, u8 version,
60 void *tvlv_value, u16 tvlv_value_len);
61
62#endif
63