Sven Eckelmann | 7db7d9f | 2017-11-19 15:05:11 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Sven Eckelmann | cfa55c6 | 2021-01-01 00:00:01 +0100 | [diff] [blame] | 2 | /* Copyright (C) B.A.T.M.A.N. contributors: |
Sven Eckelmann | c6c8fea | 2010-12-13 11:19:28 +0000 | [diff] [blame] | 3 | * |
| 4 | * Marek Lindner, Simon Wunderlich |
Sven Eckelmann | c6c8fea | 2010-12-13 11:19:28 +0000 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #ifndef _NET_BATMAN_ADV_ROUTING_H_ |
| 8 | #define _NET_BATMAN_ADV_ROUTING_H_ |
| 9 | |
Sven Eckelmann | 1e2c2a4 | 2015-04-17 19:40:28 +0200 | [diff] [blame] | 10 | #include "main.h" |
| 11 | |
Sven Eckelmann | 68a600d | 2019-05-24 20:11:17 +0200 | [diff] [blame] | 12 | #include <linux/skbuff.h> |
Sven Eckelmann | 1e2c2a4 | 2015-04-17 19:40:28 +0200 | [diff] [blame] | 13 | #include <linux/types.h> |
| 14 | |
Sven Eckelmann | 30d3c51 | 2012-05-12 02:09:36 +0200 | [diff] [blame] | 15 | bool batadv_check_management_packet(struct sk_buff *skb, |
Sven Eckelmann | 56303d3 | 2012-06-05 22:31:31 +0200 | [diff] [blame] | 16 | struct batadv_hard_iface *hard_iface, |
Sven Eckelmann | 30d3c51 | 2012-05-12 02:09:36 +0200 | [diff] [blame] | 17 | int header_len); |
Sven Eckelmann | 56303d3 | 2012-06-05 22:31:31 +0200 | [diff] [blame] | 18 | void batadv_update_route(struct batadv_priv *bat_priv, |
| 19 | struct batadv_orig_node *orig_node, |
Simon Wunderlich | 7351a482 | 2013-11-13 19:14:47 +0100 | [diff] [blame] | 20 | struct batadv_hard_iface *recv_if, |
Sven Eckelmann | 56303d3 | 2012-06-05 22:31:31 +0200 | [diff] [blame] | 21 | struct batadv_neigh_node *neigh_node); |
| 22 | int batadv_recv_icmp_packet(struct sk_buff *skb, |
| 23 | struct batadv_hard_iface *recv_if); |
| 24 | int batadv_recv_unicast_packet(struct sk_buff *skb, |
| 25 | struct batadv_hard_iface *recv_if); |
Martin Hundebøll | 610bfc6bc | 2013-05-23 16:53:02 +0200 | [diff] [blame] | 26 | int batadv_recv_frag_packet(struct sk_buff *skb, |
| 27 | struct batadv_hard_iface *iface); |
Sven Eckelmann | 56303d3 | 2012-06-05 22:31:31 +0200 | [diff] [blame] | 28 | int batadv_recv_bcast_packet(struct sk_buff *skb, |
| 29 | struct batadv_hard_iface *recv_if); |
Sven Eckelmann | 56303d3 | 2012-06-05 22:31:31 +0200 | [diff] [blame] | 30 | int batadv_recv_tt_query(struct sk_buff *skb, |
| 31 | struct batadv_hard_iface *recv_if); |
| 32 | int batadv_recv_roam_adv(struct sk_buff *skb, |
| 33 | struct batadv_hard_iface *recv_if); |
Marek Lindner | ef26157 | 2013-04-23 21:39:57 +0800 | [diff] [blame] | 34 | int batadv_recv_unicast_tvlv(struct sk_buff *skb, |
| 35 | struct batadv_hard_iface *recv_if); |
Simon Wunderlich | a1f1ac5 | 2013-04-25 10:37:23 +0200 | [diff] [blame] | 36 | int batadv_recv_unhandled_unicast_packet(struct sk_buff *skb, |
| 37 | struct batadv_hard_iface *recv_if); |
Sven Eckelmann | 56303d3 | 2012-06-05 22:31:31 +0200 | [diff] [blame] | 38 | struct batadv_neigh_node * |
| 39 | batadv_find_router(struct batadv_priv *bat_priv, |
| 40 | struct batadv_orig_node *orig_node, |
Simon Wunderlich | f3b3d90 | 2013-11-13 19:14:50 +0100 | [diff] [blame] | 41 | struct batadv_hard_iface *recv_if); |
Sven Eckelmann | 4b426b1 | 2016-02-22 21:02:39 +0100 | [diff] [blame] | 42 | bool 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 Eckelmann | c6c8fea | 2010-12-13 11:19:28 +0000 | [diff] [blame] | 45 | |
| 46 | #endif /* _NET_BATMAN_ADV_ROUTING_H_ */ |