diff options
author | Sven Eckelmann <sven@narfation.org> | 2012-05-12 07:38:47 -0400 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2012-06-20 16:15:17 -0400 |
commit | 08adf1512298201a53b88bb0a3d67e0dbbe0ed9b (patch) | |
tree | c0300fbf9717978726becbbdf14f1332178e78cd /net/batman-adv/bridge_loop_avoidance.h | |
parent | 0f5f9322681887ca221707afafe4216b6db5d22f (diff) |
batman-adv: Prefix bridge_loop_avoidance non-static functions with batadv_
batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.
Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'net/batman-adv/bridge_loop_avoidance.h')
-rw-r--r-- | net/batman-adv/bridge_loop_avoidance.h | 67 |
1 files changed, 35 insertions, 32 deletions
diff --git a/net/batman-adv/bridge_loop_avoidance.h b/net/batman-adv/bridge_loop_avoidance.h index e39f93acc28f..546cd641012a 100644 --- a/net/batman-adv/bridge_loop_avoidance.h +++ b/net/batman-adv/bridge_loop_avoidance.h | |||
@@ -23,73 +23,76 @@ | |||
23 | #define _NET_BATMAN_ADV_BLA_H_ | 23 | #define _NET_BATMAN_ADV_BLA_H_ |
24 | 24 | ||
25 | #ifdef CONFIG_BATMAN_ADV_BLA | 25 | #ifdef CONFIG_BATMAN_ADV_BLA |
26 | int bla_rx(struct bat_priv *bat_priv, struct sk_buff *skb, short vid); | 26 | int batadv_bla_rx(struct bat_priv *bat_priv, struct sk_buff *skb, short vid); |
27 | int bla_tx(struct bat_priv *bat_priv, struct sk_buff *skb, short vid); | 27 | int batadv_bla_tx(struct bat_priv *bat_priv, struct sk_buff *skb, short vid); |
28 | int bla_is_backbone_gw(struct sk_buff *skb, | 28 | int batadv_bla_is_backbone_gw(struct sk_buff *skb, |
29 | struct orig_node *orig_node, int hdr_size); | 29 | struct orig_node *orig_node, int hdr_size); |
30 | int bla_claim_table_seq_print_text(struct seq_file *seq, void *offset); | 30 | int batadv_bla_claim_table_seq_print_text(struct seq_file *seq, void *offset); |
31 | int bla_is_backbone_gw_orig(struct bat_priv *bat_priv, uint8_t *orig); | 31 | int batadv_bla_is_backbone_gw_orig(struct bat_priv *bat_priv, uint8_t *orig); |
32 | int bla_check_bcast_duplist(struct bat_priv *bat_priv, | 32 | int batadv_bla_check_bcast_duplist(struct bat_priv *bat_priv, |
33 | struct bcast_packet *bcast_packet, int hdr_size); | 33 | struct bcast_packet *bcast_packet, |
34 | void bla_update_orig_address(struct bat_priv *bat_priv, | 34 | int hdr_size); |
35 | struct hard_iface *primary_if, | 35 | void batadv_bla_update_orig_address(struct bat_priv *bat_priv, |
36 | struct hard_iface *oldif); | 36 | struct hard_iface *primary_if, |
37 | int bla_init(struct bat_priv *bat_priv); | 37 | struct hard_iface *oldif); |
38 | void bla_free(struct bat_priv *bat_priv); | 38 | int batadv_bla_init(struct bat_priv *bat_priv); |
39 | void batadv_bla_free(struct bat_priv *bat_priv); | ||
39 | 40 | ||
40 | #define BLA_CRC_INIT 0 | 41 | #define BLA_CRC_INIT 0 |
41 | #else /* ifdef CONFIG_BATMAN_ADV_BLA */ | 42 | #else /* ifdef CONFIG_BATMAN_ADV_BLA */ |
42 | 43 | ||
43 | static inline int bla_rx(struct bat_priv *bat_priv, struct sk_buff *skb, | 44 | static inline int batadv_bla_rx(struct bat_priv *bat_priv, struct sk_buff *skb, |
44 | short vid) | 45 | short vid) |
45 | { | 46 | { |
46 | return 0; | 47 | return 0; |
47 | } | 48 | } |
48 | 49 | ||
49 | static inline int bla_tx(struct bat_priv *bat_priv, struct sk_buff *skb, | 50 | static inline int batadv_bla_tx(struct bat_priv *bat_priv, struct sk_buff *skb, |
50 | short vid) | 51 | short vid) |
51 | { | 52 | { |
52 | return 0; | 53 | return 0; |
53 | } | 54 | } |
54 | 55 | ||
55 | static inline int bla_is_backbone_gw(struct sk_buff *skb, | 56 | static inline int batadv_bla_is_backbone_gw(struct sk_buff *skb, |
56 | struct orig_node *orig_node, | 57 | struct orig_node *orig_node, |
57 | int hdr_size) | 58 | int hdr_size) |
58 | { | 59 | { |
59 | return 0; | 60 | return 0; |
60 | } | 61 | } |
61 | 62 | ||
62 | static inline int bla_claim_table_seq_print_text(struct seq_file *seq, | 63 | static inline int batadv_bla_claim_table_seq_print_text(struct seq_file *seq, |
63 | void *offset) | 64 | void *offset) |
64 | { | 65 | { |
65 | return 0; | 66 | return 0; |
66 | } | 67 | } |
67 | 68 | ||
68 | static inline int bla_is_backbone_gw_orig(struct bat_priv *bat_priv, | 69 | static inline int batadv_bla_is_backbone_gw_orig(struct bat_priv *bat_priv, |
69 | uint8_t *orig) | 70 | uint8_t *orig) |
70 | { | 71 | { |
71 | return 0; | 72 | return 0; |
72 | } | 73 | } |
73 | 74 | ||
74 | static inline int bla_check_bcast_duplist(struct bat_priv *bat_priv, | 75 | static inline int |
75 | struct bcast_packet *bcast_packet, | 76 | batadv_bla_check_bcast_duplist(struct bat_priv *bat_priv, |
76 | int hdr_size) | 77 | struct bcast_packet *bcast_packet, |
78 | int hdr_size) | ||
77 | { | 79 | { |
78 | return 0; | 80 | return 0; |
79 | } | 81 | } |
80 | 82 | ||
81 | static inline void bla_update_orig_address(struct bat_priv *bat_priv, | 83 | static inline void |
82 | struct hard_iface *primary_if, | 84 | batadv_bla_update_orig_address(struct bat_priv *bat_priv, |
83 | struct hard_iface *oldif) | 85 | struct hard_iface *primary_if, |
86 | struct hard_iface *oldif) | ||
84 | { | 87 | { |
85 | } | 88 | } |
86 | 89 | ||
87 | static inline int bla_init(struct bat_priv *bat_priv) | 90 | static inline int batadv_bla_init(struct bat_priv *bat_priv) |
88 | { | 91 | { |
89 | return 1; | 92 | return 1; |
90 | } | 93 | } |
91 | 94 | ||
92 | static inline void bla_free(struct bat_priv *bat_priv) | 95 | static inline void batadv_bla_free(struct bat_priv *bat_priv) |
93 | { | 96 | { |
94 | } | 97 | } |
95 | 98 | ||