1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19#ifndef _NET_BATMAN_ADV_MULTICAST_H_
20#define _NET_BATMAN_ADV_MULTICAST_H_
21
22#include "main.h"
23
24struct netlink_callback;
25struct seq_file;
26struct sk_buff;
27
28
29
30
31enum batadv_forw_mode {
32
33
34
35
36 BATADV_FORW_ALL,
37
38
39
40
41
42 BATADV_FORW_SINGLE,
43
44
45 BATADV_FORW_NONE,
46};
47
48#ifdef CONFIG_BATMAN_ADV_MCAST
49
50enum batadv_forw_mode
51batadv_mcast_forw_mode(struct batadv_priv *bat_priv, struct sk_buff *skb,
52 struct batadv_orig_node **mcast_single_orig);
53
54void batadv_mcast_init(struct batadv_priv *bat_priv);
55
56int batadv_mcast_flags_seq_print_text(struct seq_file *seq, void *offset);
57
58int batadv_mcast_mesh_info_put(struct sk_buff *msg,
59 struct batadv_priv *bat_priv);
60
61int batadv_mcast_flags_dump(struct sk_buff *msg, struct netlink_callback *cb);
62
63void batadv_mcast_free(struct batadv_priv *bat_priv);
64
65void batadv_mcast_purge_orig(struct batadv_orig_node *orig_node);
66
67#else
68
69static inline enum batadv_forw_mode
70batadv_mcast_forw_mode(struct batadv_priv *bat_priv, struct sk_buff *skb,
71 struct batadv_orig_node **mcast_single_orig)
72{
73 return BATADV_FORW_ALL;
74}
75
76static inline int batadv_mcast_init(struct batadv_priv *bat_priv)
77{
78 return 0;
79}
80
81static inline int
82batadv_mcast_mesh_info_put(struct sk_buff *msg, struct batadv_priv *bat_priv)
83{
84 return 0;
85}
86
87static inline int batadv_mcast_flags_dump(struct sk_buff *msg,
88 struct netlink_callback *cb)
89{
90 return -EOPNOTSUPP;
91}
92
93static inline void batadv_mcast_free(struct batadv_priv *bat_priv)
94{
95}
96
97static inline void batadv_mcast_purge_orig(struct batadv_orig_node *orig_node)
98{
99}
100
101#endif
102
103#endif
104