blob: c20feac951078bf95620261e9f1bbfd313b8c0f1 [file] [log] [blame]
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00001/* SPDX-License-Identifier: GPL-2.0 */
David Brazdil0f672f62019-12-10 10:32:29 +00002/* Copyright (C) 2007-2019 B.A.T.M.A.N. contributors:
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00003 *
4 * Marek Lindner, Simon Wunderlich
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00005 */
6
7#ifndef _NET_BATMAN_ADV_ROUTING_H_
8#define _NET_BATMAN_ADV_ROUTING_H_
9
10#include "main.h"
11
David Brazdil0f672f62019-12-10 10:32:29 +000012#include <linux/skbuff.h>
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000013#include <linux/types.h>
14
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000015bool batadv_check_management_packet(struct sk_buff *skb,
16 struct batadv_hard_iface *hard_iface,
17 int header_len);
18void batadv_update_route(struct batadv_priv *bat_priv,
19 struct batadv_orig_node *orig_node,
20 struct batadv_hard_iface *recv_if,
21 struct batadv_neigh_node *neigh_node);
22int batadv_recv_icmp_packet(struct sk_buff *skb,
23 struct batadv_hard_iface *recv_if);
24int batadv_recv_unicast_packet(struct sk_buff *skb,
25 struct batadv_hard_iface *recv_if);
26int batadv_recv_frag_packet(struct sk_buff *skb,
27 struct batadv_hard_iface *iface);
28int batadv_recv_bcast_packet(struct sk_buff *skb,
29 struct batadv_hard_iface *recv_if);
30int batadv_recv_tt_query(struct sk_buff *skb,
31 struct batadv_hard_iface *recv_if);
32int batadv_recv_roam_adv(struct sk_buff *skb,
33 struct batadv_hard_iface *recv_if);
34int batadv_recv_unicast_tvlv(struct sk_buff *skb,
35 struct batadv_hard_iface *recv_if);
36int batadv_recv_unhandled_unicast_packet(struct sk_buff *skb,
37 struct batadv_hard_iface *recv_if);
38struct batadv_neigh_node *
39batadv_find_router(struct batadv_priv *bat_priv,
40 struct batadv_orig_node *orig_node,
41 struct batadv_hard_iface *recv_if);
42bool batadv_window_protected(struct batadv_priv *bat_priv, s32 seq_num_diff,
43 s32 seq_old_max_diff, unsigned long *last_reset,
44 bool *protection_started);
45
46#endif /* _NET_BATMAN_ADV_ROUTING_H_ */