blob: db54c2d9b8bfb7bf45cdc7e4f5cff6429c6ff7d7 [file] [log] [blame]
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00001/* SPDX-License-Identifier: GPL-2.0 */
2/* Copyright (C) 2007-2018 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
26struct sk_buff;
27
28bool batadv_check_management_packet(struct sk_buff *skb,
29 struct batadv_hard_iface *hard_iface,
30 int header_len);
31void 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);
35int batadv_recv_icmp_packet(struct sk_buff *skb,
36 struct batadv_hard_iface *recv_if);
37int batadv_recv_unicast_packet(struct sk_buff *skb,
38 struct batadv_hard_iface *recv_if);
39int batadv_recv_frag_packet(struct sk_buff *skb,
40 struct batadv_hard_iface *iface);
41int batadv_recv_bcast_packet(struct sk_buff *skb,
42 struct batadv_hard_iface *recv_if);
43int batadv_recv_tt_query(struct sk_buff *skb,
44 struct batadv_hard_iface *recv_if);
45int batadv_recv_roam_adv(struct sk_buff *skb,
46 struct batadv_hard_iface *recv_if);
47int batadv_recv_unicast_tvlv(struct sk_buff *skb,
48 struct batadv_hard_iface *recv_if);
49int batadv_recv_unhandled_unicast_packet(struct sk_buff *skb,
50 struct batadv_hard_iface *recv_if);
51struct batadv_neigh_node *
52batadv_find_router(struct batadv_priv *bat_priv,
53 struct batadv_orig_node *orig_node,
54 struct batadv_hard_iface *recv_if);
55bool 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_ */