blob: 5f387786e9a734fd7958f74dd94125964bcafa4d [file] [log] [blame]
Sven Eckelmann7db7d9f2017-11-19 15:05:11 +01001/* SPDX-License-Identifier: GPL-2.0 */
Sven Eckelmanncfa55c62021-01-01 00:00:01 +01002/* Copyright (C) B.A.T.M.A.N. contributors:
Sven Eckelmannc6c8fea2010-12-13 11:19:28 +00003 *
4 * Marek Lindner, Simon Wunderlich
Sven Eckelmannc6c8fea2010-12-13 11:19:28 +00005 */
6
7#ifndef _NET_BATMAN_ADV_ROUTING_H_
8#define _NET_BATMAN_ADV_ROUTING_H_
9
Sven Eckelmann1e2c2a42015-04-17 19:40:28 +020010#include "main.h"
11
Sven Eckelmann68a600d2019-05-24 20:11:17 +020012#include <linux/skbuff.h>
Sven Eckelmann1e2c2a42015-04-17 19:40:28 +020013#include <linux/types.h>
14
Sven Eckelmann30d3c512012-05-12 02:09:36 +020015bool batadv_check_management_packet(struct sk_buff *skb,
Sven Eckelmann56303d32012-06-05 22:31:31 +020016 struct batadv_hard_iface *hard_iface,
Sven Eckelmann30d3c512012-05-12 02:09:36 +020017 int header_len);
Sven Eckelmann56303d32012-06-05 22:31:31 +020018void batadv_update_route(struct batadv_priv *bat_priv,
19 struct batadv_orig_node *orig_node,
Simon Wunderlich7351a4822013-11-13 19:14:47 +010020 struct batadv_hard_iface *recv_if,
Sven Eckelmann56303d32012-06-05 22:31:31 +020021 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);
Martin Hundebøll610bfc6bc2013-05-23 16:53:02 +020026int batadv_recv_frag_packet(struct sk_buff *skb,
27 struct batadv_hard_iface *iface);
Sven Eckelmann56303d32012-06-05 22:31:31 +020028int batadv_recv_bcast_packet(struct sk_buff *skb,
29 struct batadv_hard_iface *recv_if);
Sven Eckelmann56303d32012-06-05 22:31:31 +020030int 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);
Marek Lindneref261572013-04-23 21:39:57 +080034int batadv_recv_unicast_tvlv(struct sk_buff *skb,
35 struct batadv_hard_iface *recv_if);
Simon Wunderlicha1f1ac52013-04-25 10:37:23 +020036int batadv_recv_unhandled_unicast_packet(struct sk_buff *skb,
37 struct batadv_hard_iface *recv_if);
Sven Eckelmann56303d32012-06-05 22:31:31 +020038struct batadv_neigh_node *
39batadv_find_router(struct batadv_priv *bat_priv,
40 struct batadv_orig_node *orig_node,
Simon Wunderlichf3b3d902013-11-13 19:14:50 +010041 struct batadv_hard_iface *recv_if);
Sven Eckelmann4b426b12016-02-22 21:02:39 +010042bool 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);
Sven Eckelmannc6c8fea2010-12-13 11:19:28 +000045
46#endif /* _NET_BATMAN_ADV_ROUTING_H_ */