Merge tag 'for-6.16-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave...
[linux-2.6-block.git] / net / batman-adv / routing.h
CommitLineData
7db7d9f3 1/* SPDX-License-Identifier: GPL-2.0 */
cfa55c6d 2/* Copyright (C) B.A.T.M.A.N. contributors:
c6c8fea2
SE
3 *
4 * Marek Lindner, Simon Wunderlich
c6c8fea2
SE
5 */
6
7#ifndef _NET_BATMAN_ADV_ROUTING_H_
8#define _NET_BATMAN_ADV_ROUTING_H_
9
1e2c2a4f
SE
10#include "main.h"
11
68a600de 12#include <linux/skbuff.h>
1e2c2a4f
SE
13#include <linux/types.h>
14
30d3c511 15bool batadv_check_management_packet(struct sk_buff *skb,
56303d34 16 struct batadv_hard_iface *hard_iface,
30d3c511 17 int header_len);
56303d34
SE
18void batadv_update_route(struct batadv_priv *bat_priv,
19 struct batadv_orig_node *orig_node,
7351a482 20 struct batadv_hard_iface *recv_if,
56303d34
SE
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);
610bfc6b
MH
26int batadv_recv_frag_packet(struct sk_buff *skb,
27 struct batadv_hard_iface *iface);
56303d34
SE
28int batadv_recv_bcast_packet(struct sk_buff *skb,
29 struct batadv_hard_iface *recv_if);
07afe1ba
LL
30#ifdef CONFIG_BATMAN_ADV_MCAST
31int batadv_recv_mcast_packet(struct sk_buff *skb,
32 struct batadv_hard_iface *recv_if);
33#else
34static inline int batadv_recv_mcast_packet(struct sk_buff *skb,
35 struct batadv_hard_iface *recv_if)
36{
37 kfree_skb(skb);
38 return NET_RX_DROP;
39}
40#endif
ef261577
ML
41int batadv_recv_unicast_tvlv(struct sk_buff *skb,
42 struct batadv_hard_iface *recv_if);
a1f1ac5c
SW
43int batadv_recv_unhandled_unicast_packet(struct sk_buff *skb,
44 struct batadv_hard_iface *recv_if);
56303d34
SE
45struct batadv_neigh_node *
46batadv_find_router(struct batadv_priv *bat_priv,
47 struct batadv_orig_node *orig_node,
f3b3d901 48 struct batadv_hard_iface *recv_if);
4b426b10
SE
49bool batadv_window_protected(struct batadv_priv *bat_priv, s32 seq_num_diff,
50 s32 seq_old_max_diff, unsigned long *last_reset,
51 bool *protection_started);
c6c8fea2
SE
52
53#endif /* _NET_BATMAN_ADV_ROUTING_H_ */