hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/net/batman-adv/multicast.h
....@@ -1,19 +1,7 @@
11 /* SPDX-License-Identifier: GPL-2.0 */
2
-/* Copyright (C) 2014-2018 B.A.T.M.A.N. contributors:
2
+/* Copyright (C) 2014-2020 B.A.T.M.A.N. contributors:
33 *
44 * Linus Lüssing
5
- *
6
- * This program is free software; you can redistribute it and/or
7
- * modify it under the terms of version 2 of the GNU General Public
8
- * License as published by the Free Software Foundation.
9
- *
10
- * This program is distributed in the hope that it will be useful, but
11
- * WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
- * General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program; if not, see <http://www.gnu.org/licenses/>.
175 */
186
197 #ifndef _NET_BATMAN_ADV_MULTICAST_H_
....@@ -21,9 +9,9 @@
219
2210 #include "main.h"
2311
24
-struct netlink_callback;
25
-struct seq_file;
26
-struct sk_buff;
12
+#include <linux/netlink.h>
13
+#include <linux/seq_file.h>
14
+#include <linux/skbuff.h>
2715
2816 /**
2917 * enum batadv_forw_mode - the way a packet should be forwarded as
....@@ -34,6 +22,13 @@
3422 * classic flooding)
3523 */
3624 BATADV_FORW_ALL,
25
+
26
+ /**
27
+ * @BATADV_FORW_SOME: forward the packet to some nodes (currently via
28
+ * a multicast-to-unicast conversion and the BATMAN unicast routing
29
+ * protocol)
30
+ */
31
+ BATADV_FORW_SOME,
3732
3833 /**
3934 * @BATADV_FORW_SINGLE: forward the packet to a single node (currently
....@@ -49,12 +44,16 @@
4944
5045 enum batadv_forw_mode
5146 batadv_mcast_forw_mode(struct batadv_priv *bat_priv, struct sk_buff *skb,
52
- struct batadv_orig_node **mcast_single_orig);
47
+ struct batadv_orig_node **mcast_single_orig,
48
+ int *is_routable);
5349
5450 int batadv_mcast_forw_send_orig(struct batadv_priv *bat_priv,
5551 struct sk_buff *skb,
5652 unsigned short vid,
5753 struct batadv_orig_node *orig_node);
54
+
55
+int batadv_mcast_forw_send(struct batadv_priv *bat_priv, struct sk_buff *skb,
56
+ unsigned short vid, int is_routable);
5857
5958 void batadv_mcast_init(struct batadv_priv *bat_priv);
6059
....@@ -73,14 +72,10 @@
7372
7473 static inline enum batadv_forw_mode
7574 batadv_mcast_forw_mode(struct batadv_priv *bat_priv, struct sk_buff *skb,
76
- struct batadv_orig_node **mcast_single_orig)
75
+ struct batadv_orig_node **mcast_single_orig,
76
+ int *is_routable)
7777 {
7878 return BATADV_FORW_ALL;
79
-}
80
-
81
-static inline int batadv_mcast_init(struct batadv_priv *bat_priv)
82
-{
83
- return 0;
8479 }
8580
8681 static inline int
....@@ -94,6 +89,19 @@
9489 }
9590
9691 static inline int
92
+batadv_mcast_forw_send(struct batadv_priv *bat_priv, struct sk_buff *skb,
93
+ unsigned short vid, int is_routable)
94
+{
95
+ kfree_skb(skb);
96
+ return NET_XMIT_DROP;
97
+}
98
+
99
+static inline int batadv_mcast_init(struct batadv_priv *bat_priv)
100
+{
101
+ return 0;
102
+}
103
+
104
+static inline int
97105 batadv_mcast_mesh_info_put(struct sk_buff *msg, struct batadv_priv *bat_priv)
98106 {
99107 return 0;