18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* Copyright (C) 2007-2020 B.A.T.M.A.N. contributors: 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * Marek Lindner, Simon Wunderlich 58c2ecf20Sopenharmony_ci */ 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci#ifndef _NET_BATMAN_ADV_TVLV_H_ 88c2ecf20Sopenharmony_ci#define _NET_BATMAN_ADV_TVLV_H_ 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci#include "main.h" 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci#include <linux/types.h> 138c2ecf20Sopenharmony_ci#include <uapi/linux/batadv_packet.h> 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_civoid batadv_tvlv_container_register(struct batadv_priv *bat_priv, 168c2ecf20Sopenharmony_ci u8 type, u8 version, 178c2ecf20Sopenharmony_ci void *tvlv_value, u16 tvlv_value_len); 188c2ecf20Sopenharmony_ciu16 batadv_tvlv_container_ogm_append(struct batadv_priv *bat_priv, 198c2ecf20Sopenharmony_ci unsigned char **packet_buff, 208c2ecf20Sopenharmony_ci int *packet_buff_len, int packet_min_len); 218c2ecf20Sopenharmony_civoid batadv_tvlv_ogm_receive(struct batadv_priv *bat_priv, 228c2ecf20Sopenharmony_ci struct batadv_ogm_packet *batadv_ogm_packet, 238c2ecf20Sopenharmony_ci struct batadv_orig_node *orig_node); 248c2ecf20Sopenharmony_civoid batadv_tvlv_container_unregister(struct batadv_priv *bat_priv, 258c2ecf20Sopenharmony_ci u8 type, u8 version); 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_civoid batadv_tvlv_handler_register(struct batadv_priv *bat_priv, 288c2ecf20Sopenharmony_ci void (*optr)(struct batadv_priv *bat_priv, 298c2ecf20Sopenharmony_ci struct batadv_orig_node *orig, 308c2ecf20Sopenharmony_ci u8 flags, 318c2ecf20Sopenharmony_ci void *tvlv_value, 328c2ecf20Sopenharmony_ci u16 tvlv_value_len), 338c2ecf20Sopenharmony_ci int (*uptr)(struct batadv_priv *bat_priv, 348c2ecf20Sopenharmony_ci u8 *src, u8 *dst, 358c2ecf20Sopenharmony_ci void *tvlv_value, 368c2ecf20Sopenharmony_ci u16 tvlv_value_len), 378c2ecf20Sopenharmony_ci u8 type, u8 version, u8 flags); 388c2ecf20Sopenharmony_civoid batadv_tvlv_handler_unregister(struct batadv_priv *bat_priv, 398c2ecf20Sopenharmony_ci u8 type, u8 version); 408c2ecf20Sopenharmony_ciint batadv_tvlv_containers_process(struct batadv_priv *bat_priv, 418c2ecf20Sopenharmony_ci bool ogm_source, 428c2ecf20Sopenharmony_ci struct batadv_orig_node *orig_node, 438c2ecf20Sopenharmony_ci u8 *src, u8 *dst, 448c2ecf20Sopenharmony_ci void *tvlv_buff, u16 tvlv_buff_len); 458c2ecf20Sopenharmony_civoid batadv_tvlv_unicast_send(struct batadv_priv *bat_priv, u8 *src, 468c2ecf20Sopenharmony_ci u8 *dst, u8 type, u8 version, 478c2ecf20Sopenharmony_ci void *tvlv_value, u16 tvlv_value_len); 488c2ecf20Sopenharmony_ci 498c2ecf20Sopenharmony_ci#endif /* _NET_BATMAN_ADV_TVLV_H_ */ 50