1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* Copyright (C) 2007-2017 B.A.T.M.A.N. contributors: 3 * 4 * Marek Lindner, Simon Wunderlich 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of version 2 of the GNU General Public 8 * License as published by the Free Software Foundation. 9 * 10 * This program is distributed in the hope that it will be useful, but 11 * WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program; if not, see <http://www.gnu.org/licenses/>. 17 */ 18 19 #ifndef _NET_BATMAN_ADV_ROUTING_H_ 20 #define _NET_BATMAN_ADV_ROUTING_H_ 21 22 #include "main.h" 23 24 #include <linux/types.h> 25 26 struct sk_buff; 27 28 bool batadv_check_management_packet(struct sk_buff *skb, 29 struct batadv_hard_iface *hard_iface, 30 int header_len); 31 void batadv_update_route(struct batadv_priv *bat_priv, 32 struct batadv_orig_node *orig_node, 33 struct batadv_hard_iface *recv_if, 34 struct batadv_neigh_node *neigh_node); 35 int batadv_recv_icmp_packet(struct sk_buff *skb, 36 struct batadv_hard_iface *recv_if); 37 int batadv_recv_unicast_packet(struct sk_buff *skb, 38 struct batadv_hard_iface *recv_if); 39 int batadv_recv_frag_packet(struct sk_buff *skb, 40 struct batadv_hard_iface *iface); 41 int batadv_recv_bcast_packet(struct sk_buff *skb, 42 struct batadv_hard_iface *recv_if); 43 int batadv_recv_tt_query(struct sk_buff *skb, 44 struct batadv_hard_iface *recv_if); 45 int batadv_recv_roam_adv(struct sk_buff *skb, 46 struct batadv_hard_iface *recv_if); 47 int batadv_recv_unicast_tvlv(struct sk_buff *skb, 48 struct batadv_hard_iface *recv_if); 49 int batadv_recv_unhandled_unicast_packet(struct sk_buff *skb, 50 struct batadv_hard_iface *recv_if); 51 struct batadv_neigh_node * 52 batadv_find_router(struct batadv_priv *bat_priv, 53 struct batadv_orig_node *orig_node, 54 struct batadv_hard_iface *recv_if); 55 bool batadv_window_protected(struct batadv_priv *bat_priv, s32 seq_num_diff, 56 s32 seq_old_max_diff, unsigned long *last_reset, 57 bool *protection_started); 58 59 #endif /* _NET_BATMAN_ADV_ROUTING_H_ */ 60