aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/addrconf.h
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2013-07-31 20:31:32 -0400
committerDavid S. Miller <davem@davemloft.net>2013-07-31 20:50:01 -0400
commite8e54d3c13b35479294f3dceb6bd6ed7a7dc5bf8 (patch)
treed9bd08174b9c7f521cdf80a9cb613e6d0a7873c8 /include/net/addrconf.h
parent49dfe76261e427f5521b40321fbc3d947350165d (diff)
addrconf.h: Remove extern function prototypes
There are a mix of function prototypes with and without extern in the kernel sources. Standardize on not using extern for function prototypes. Function prototypes don't need to be written with extern. extern is assumed by the compiler. Its use is as unnecessary as using auto to declare automatic/local variables in a block. Reflow modified prototypes to 80 columns. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/addrconf.h')
-rw-r--r--include/net/addrconf.h160
1 files changed, 72 insertions, 88 deletions
diff --git a/include/net/addrconf.h b/include/net/addrconf.h
index c7b181cb47a6..43fa31a610b8 100644
--- a/include/net/addrconf.h
+++ b/include/net/addrconf.h
@@ -53,51 +53,36 @@ struct prefix_info {
53#define IN6_ADDR_HSIZE_SHIFT 4 53#define IN6_ADDR_HSIZE_SHIFT 4
54#define IN6_ADDR_HSIZE (1 << IN6_ADDR_HSIZE_SHIFT) 54#define IN6_ADDR_HSIZE (1 << IN6_ADDR_HSIZE_SHIFT)
55 55
56extern int addrconf_init(void); 56int addrconf_init(void);
57extern void addrconf_cleanup(void); 57void addrconf_cleanup(void);
58 58
59extern int addrconf_add_ifaddr(struct net *net, 59int addrconf_add_ifaddr(struct net *net, void __user *arg);
60 void __user *arg); 60int addrconf_del_ifaddr(struct net *net, void __user *arg);
61extern int addrconf_del_ifaddr(struct net *net, 61int addrconf_set_dstaddr(struct net *net, void __user *arg);
62 void __user *arg);
63extern int addrconf_set_dstaddr(struct net *net,
64 void __user *arg);
65 62
66extern int ipv6_chk_addr(struct net *net, 63int ipv6_chk_addr(struct net *net, const struct in6_addr *addr,
67 const struct in6_addr *addr, 64 const struct net_device *dev, int strict);
68 const struct net_device *dev,
69 int strict);
70 65
71#if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE) 66#if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE)
72extern int ipv6_chk_home_addr(struct net *net, 67int ipv6_chk_home_addr(struct net *net, const struct in6_addr *addr);
73 const struct in6_addr *addr);
74#endif 68#endif
75 69
76extern int ipv6_chk_prefix(const struct in6_addr *addr, 70int ipv6_chk_prefix(const struct in6_addr *addr, struct net_device *dev);
77 struct net_device *dev); 71
78 72struct inet6_ifaddr *ipv6_get_ifaddr(struct net *net,
79extern struct inet6_ifaddr *ipv6_get_ifaddr(struct net *net, 73 const struct in6_addr *addr,
80 const struct in6_addr *addr, 74 struct net_device *dev, int strict);
81 struct net_device *dev, 75
82 int strict); 76int ipv6_dev_get_saddr(struct net *net, const struct net_device *dev,
83 77 const struct in6_addr *daddr, unsigned int srcprefs,
84extern int ipv6_dev_get_saddr(struct net *net, 78 struct in6_addr *saddr);
85 const struct net_device *dev, 79int __ipv6_get_lladdr(struct inet6_dev *idev, struct in6_addr *addr,
86 const struct in6_addr *daddr, 80 unsigned char banned_flags);
87 unsigned int srcprefs, 81int ipv6_get_lladdr(struct net_device *dev, struct in6_addr *addr,
88 struct in6_addr *saddr); 82 unsigned char banned_flags);
89extern int __ipv6_get_lladdr(struct inet6_dev *idev, 83int ipv6_rcv_saddr_equal(const struct sock *sk, const struct sock *sk2);
90 struct in6_addr *addr, 84void addrconf_join_solict(struct net_device *dev, const struct in6_addr *addr);
91 unsigned char banned_flags); 85void addrconf_leave_solict(struct inet6_dev *idev, const struct in6_addr *addr);
92extern int ipv6_get_lladdr(struct net_device *dev,
93 struct in6_addr *addr,
94 unsigned char banned_flags);
95extern int ipv6_rcv_saddr_equal(const struct sock *sk,
96 const struct sock *sk2);
97extern void addrconf_join_solict(struct net_device *dev,
98 const struct in6_addr *addr);
99extern void addrconf_leave_solict(struct inet6_dev *idev,
100 const struct in6_addr *addr);
101 86
102static inline unsigned long addrconf_timeout_fixup(u32 timeout, 87static inline unsigned long addrconf_timeout_fixup(u32 timeout,
103 unsigned int unit) 88 unsigned int unit)
@@ -124,41 +109,38 @@ static inline int addrconf_finite_timeout(unsigned long timeout)
124/* 109/*
125 * IPv6 Address Label subsystem (addrlabel.c) 110 * IPv6 Address Label subsystem (addrlabel.c)
126 */ 111 */
127extern int ipv6_addr_label_init(void); 112int ipv6_addr_label_init(void);
128extern void ipv6_addr_label_cleanup(void); 113void ipv6_addr_label_cleanup(void);
129extern void ipv6_addr_label_rtnl_register(void); 114void ipv6_addr_label_rtnl_register(void);
130extern u32 ipv6_addr_label(struct net *net, 115u32 ipv6_addr_label(struct net *net, const struct in6_addr *addr,
131 const struct in6_addr *addr, 116 int type, int ifindex);
132 int type, int ifindex);
133 117
134/* 118/*
135 * multicast prototypes (mcast.c) 119 * multicast prototypes (mcast.c)
136 */ 120 */
137extern int ipv6_sock_mc_join(struct sock *sk, int ifindex, 121int ipv6_sock_mc_join(struct sock *sk, int ifindex,
138 const struct in6_addr *addr); 122 const struct in6_addr *addr);
139extern int ipv6_sock_mc_drop(struct sock *sk, int ifindex, 123int ipv6_sock_mc_drop(struct sock *sk, int ifindex,
140 const struct in6_addr *addr); 124 const struct in6_addr *addr);
141extern void ipv6_sock_mc_close(struct sock *sk); 125void ipv6_sock_mc_close(struct sock *sk);
142extern bool inet6_mc_check(struct sock *sk, 126bool inet6_mc_check(struct sock *sk, const struct in6_addr *mc_addr,
143 const struct in6_addr *mc_addr, 127 const struct in6_addr *src_addr);
144 const struct in6_addr *src_addr); 128
145 129int ipv6_dev_mc_inc(struct net_device *dev, const struct in6_addr *addr);
146extern int ipv6_dev_mc_inc(struct net_device *dev, const struct in6_addr *addr); 130int __ipv6_dev_mc_dec(struct inet6_dev *idev, const struct in6_addr *addr);
147extern int __ipv6_dev_mc_dec(struct inet6_dev *idev, const struct in6_addr *addr); 131int ipv6_dev_mc_dec(struct net_device *dev, const struct in6_addr *addr);
148extern int ipv6_dev_mc_dec(struct net_device *dev, const struct in6_addr *addr); 132void ipv6_mc_up(struct inet6_dev *idev);
149extern void ipv6_mc_up(struct inet6_dev *idev); 133void ipv6_mc_down(struct inet6_dev *idev);
150extern void ipv6_mc_down(struct inet6_dev *idev); 134void ipv6_mc_unmap(struct inet6_dev *idev);
151extern void ipv6_mc_unmap(struct inet6_dev *idev); 135void ipv6_mc_remap(struct inet6_dev *idev);
152extern void ipv6_mc_remap(struct inet6_dev *idev); 136void ipv6_mc_init_dev(struct inet6_dev *idev);
153extern void ipv6_mc_init_dev(struct inet6_dev *idev); 137void ipv6_mc_destroy_dev(struct inet6_dev *idev);
154extern void ipv6_mc_destroy_dev(struct inet6_dev *idev); 138void addrconf_dad_failure(struct inet6_ifaddr *ifp);
155extern void addrconf_dad_failure(struct inet6_ifaddr *ifp); 139
156 140bool ipv6_chk_mcast_addr(struct net_device *dev, const struct in6_addr *group,
157extern bool ipv6_chk_mcast_addr(struct net_device *dev, 141 const struct in6_addr *src_addr);
158 const struct in6_addr *group, 142
159 const struct in6_addr *src_addr); 143void ipv6_mc_dad_complete(struct inet6_dev *idev);
160
161extern void ipv6_mc_dad_complete(struct inet6_dev *idev);
162/* 144/*
163 * identify MLD packets for MLD filter exceptions 145 * identify MLD packets for MLD filter exceptions
164 */ 146 */
@@ -184,29 +166,31 @@ static inline bool ipv6_is_mld(struct sk_buff *skb, int nexthdr, int offset)
184 return false; 166 return false;
185} 167}
186 168
187extern void addrconf_prefix_rcv(struct net_device *dev, 169void addrconf_prefix_rcv(struct net_device *dev,
188 u8 *opt, int len, bool sllao); 170 u8 *opt, int len, bool sllao);
189 171
190/* 172/*
191 * anycast prototypes (anycast.c) 173 * anycast prototypes (anycast.c)
192 */ 174 */
193extern int ipv6_sock_ac_join(struct sock *sk,int ifindex, const struct in6_addr *addr); 175int ipv6_sock_ac_join(struct sock *sk, int ifindex,
194extern int ipv6_sock_ac_drop(struct sock *sk,int ifindex, const struct in6_addr *addr); 176 const struct in6_addr *addr);
195extern void ipv6_sock_ac_close(struct sock *sk); 177int ipv6_sock_ac_drop(struct sock *sk, int ifindex,
196 178 const struct in6_addr *addr);
197extern int ipv6_dev_ac_inc(struct net_device *dev, const struct in6_addr *addr); 179void ipv6_sock_ac_close(struct sock *sk);
198extern int __ipv6_dev_ac_dec(struct inet6_dev *idev, const struct in6_addr *addr); 180
199extern bool ipv6_chk_acast_addr(struct net *net, struct net_device *dev, 181int ipv6_dev_ac_inc(struct net_device *dev, const struct in6_addr *addr);
182int __ipv6_dev_ac_dec(struct inet6_dev *idev, const struct in6_addr *addr);
183bool ipv6_chk_acast_addr(struct net *net, struct net_device *dev,
200 const struct in6_addr *addr); 184 const struct in6_addr *addr);
201 185
202 186
203/* Device notifier */ 187/* Device notifier */
204extern int register_inet6addr_notifier(struct notifier_block *nb); 188int register_inet6addr_notifier(struct notifier_block *nb);
205extern int unregister_inet6addr_notifier(struct notifier_block *nb); 189int unregister_inet6addr_notifier(struct notifier_block *nb);
206extern int inet6addr_notifier_call_chain(unsigned long val, void *v); 190int inet6addr_notifier_call_chain(unsigned long val, void *v);
207 191
208extern void inet6_netconf_notify_devconf(struct net *net, int type, int ifindex, 192void inet6_netconf_notify_devconf(struct net *net, int type, int ifindex,
209 struct ipv6_devconf *devconf); 193 struct ipv6_devconf *devconf);
210 194
211/** 195/**
212 * __in6_dev_get - get inet6_dev pointer from netdevice 196 * __in6_dev_get - get inet6_dev pointer from netdevice
@@ -240,7 +224,7 @@ static inline struct inet6_dev *in6_dev_get(const struct net_device *dev)
240 return idev; 224 return idev;
241} 225}
242 226
243extern void in6_dev_finish_destroy(struct inet6_dev *idev); 227void in6_dev_finish_destroy(struct inet6_dev *idev);
244 228
245static inline void in6_dev_put(struct inet6_dev *idev) 229static inline void in6_dev_put(struct inet6_dev *idev)
246{ 230{
@@ -258,7 +242,7 @@ static inline void in6_dev_hold(struct inet6_dev *idev)
258 atomic_inc(&idev->refcnt); 242 atomic_inc(&idev->refcnt);
259} 243}
260 244
261extern void inet6_ifa_finish_destroy(struct inet6_ifaddr *ifp); 245void inet6_ifa_finish_destroy(struct inet6_ifaddr *ifp);
262 246
263static inline void in6_ifa_put(struct inet6_ifaddr *ifp) 247static inline void in6_ifa_put(struct inet6_ifaddr *ifp)
264{ 248{
@@ -340,8 +324,8 @@ static inline bool ipv6_addr_is_solict_mult(const struct in6_addr *addr)
340} 324}
341 325
342#ifdef CONFIG_PROC_FS 326#ifdef CONFIG_PROC_FS
343extern int if6_proc_init(void); 327int if6_proc_init(void);
344extern void if6_proc_exit(void); 328void if6_proc_exit(void);
345#endif 329#endif
346 330
347#endif 331#endif