mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-27 06:04:23 +08:00
07afe1ba28
Implement functionality to receive and forward a new TVLV capable multicast packet type. The new batman-adv multicast packet type allows to contain several originator destination addresses within a TVLV. Routers on the way will potentially split the batman-adv multicast packet and adjust its tracker TVLV contents. Routing decisions are still based on the selected BATMAN IV or BATMAN V routing algorithm. So this new batman-adv multicast packet type retains the same loop-free properties. Also a new OGM multicast TVLV flag is introduced to signal to other nodes that we are capable of handling a batman-adv multicast packet and multicast tracker TVLV. And that all of our hard interfaces have an MTU of at least 1280 bytes (IPv6 minimum MTU), as a simple solution for now to avoid MTU issues while forwarding. Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
54 lines
1.8 KiB
C
54 lines
1.8 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/* Copyright (C) B.A.T.M.A.N. contributors:
|
|
*
|
|
* Marek Lindner, Simon Wunderlich
|
|
*/
|
|
|
|
#ifndef _NET_BATMAN_ADV_ROUTING_H_
|
|
#define _NET_BATMAN_ADV_ROUTING_H_
|
|
|
|
#include "main.h"
|
|
|
|
#include <linux/skbuff.h>
|
|
#include <linux/types.h>
|
|
|
|
bool batadv_check_management_packet(struct sk_buff *skb,
|
|
struct batadv_hard_iface *hard_iface,
|
|
int header_len);
|
|
void batadv_update_route(struct batadv_priv *bat_priv,
|
|
struct batadv_orig_node *orig_node,
|
|
struct batadv_hard_iface *recv_if,
|
|
struct batadv_neigh_node *neigh_node);
|
|
int batadv_recv_icmp_packet(struct sk_buff *skb,
|
|
struct batadv_hard_iface *recv_if);
|
|
int batadv_recv_unicast_packet(struct sk_buff *skb,
|
|
struct batadv_hard_iface *recv_if);
|
|
int batadv_recv_frag_packet(struct sk_buff *skb,
|
|
struct batadv_hard_iface *iface);
|
|
int batadv_recv_bcast_packet(struct sk_buff *skb,
|
|
struct batadv_hard_iface *recv_if);
|
|
#ifdef CONFIG_BATMAN_ADV_MCAST
|
|
int batadv_recv_mcast_packet(struct sk_buff *skb,
|
|
struct batadv_hard_iface *recv_if);
|
|
#else
|
|
static inline int batadv_recv_mcast_packet(struct sk_buff *skb,
|
|
struct batadv_hard_iface *recv_if)
|
|
{
|
|
kfree_skb(skb);
|
|
return NET_RX_DROP;
|
|
}
|
|
#endif
|
|
int batadv_recv_unicast_tvlv(struct sk_buff *skb,
|
|
struct batadv_hard_iface *recv_if);
|
|
int batadv_recv_unhandled_unicast_packet(struct sk_buff *skb,
|
|
struct batadv_hard_iface *recv_if);
|
|
struct batadv_neigh_node *
|
|
batadv_find_router(struct batadv_priv *bat_priv,
|
|
struct batadv_orig_node *orig_node,
|
|
struct batadv_hard_iface *recv_if);
|
|
bool batadv_window_protected(struct batadv_priv *bat_priv, s32 seq_num_diff,
|
|
s32 seq_old_max_diff, unsigned long *last_reset,
|
|
bool *protection_started);
|
|
|
|
#endif /* _NET_BATMAN_ADV_ROUTING_H_ */
|