aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/udp.h
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2013-09-23 14:33:36 -0400
committerDavid S. Miller <davem@davemloft.net>2013-09-23 16:29:40 -0400
commit1a50bd064e1825ad0cc049be2d205ac6719f88e5 (patch)
treeaa9398ed1cbf262b1782adb27e1279fbb4c14310 /include/net/udp.h
parent5c9f30236f53f3fbee170e2452dfa0e5dce4727b (diff)
udp.h: Remove extern from 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. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/udp.h')
-rw-r--r--include/net/udp.h94
1 files changed, 47 insertions, 47 deletions
diff --git a/include/net/udp.h b/include/net/udp.h
index ef2e0b7843a0..510b8cb4d1a7 100644
--- a/include/net/udp.h
+++ b/include/net/udp.h
@@ -79,7 +79,7 @@ struct udp_table {
79 unsigned int log; 79 unsigned int log;
80}; 80};
81extern struct udp_table udp_table; 81extern struct udp_table udp_table;
82extern void udp_table_init(struct udp_table *, const char *); 82void udp_table_init(struct udp_table *, const char *);
83static inline struct udp_hslot *udp_hashslot(struct udp_table *table, 83static inline struct udp_hslot *udp_hashslot(struct udp_table *table,
84 struct net *net, unsigned int num) 84 struct net *net, unsigned int num)
85{ 85{
@@ -162,52 +162,52 @@ static inline void udp_lib_hash(struct sock *sk)
162 BUG(); 162 BUG();
163} 163}
164 164
165extern void udp_lib_unhash(struct sock *sk); 165void udp_lib_unhash(struct sock *sk);
166extern void udp_lib_rehash(struct sock *sk, u16 new_hash); 166void udp_lib_rehash(struct sock *sk, u16 new_hash);
167 167
168static inline void udp_lib_close(struct sock *sk, long timeout) 168static inline void udp_lib_close(struct sock *sk, long timeout)
169{ 169{
170 sk_common_release(sk); 170 sk_common_release(sk);
171} 171}
172 172
173extern int udp_lib_get_port(struct sock *sk, unsigned short snum, 173int udp_lib_get_port(struct sock *sk, unsigned short snum,
174 int (*)(const struct sock *,const struct sock *), 174 int (*)(const struct sock *, const struct sock *),
175 unsigned int hash2_nulladdr); 175 unsigned int hash2_nulladdr);
176 176
177/* net/ipv4/udp.c */ 177/* net/ipv4/udp.c */
178extern int udp_get_port(struct sock *sk, unsigned short snum, 178int udp_get_port(struct sock *sk, unsigned short snum,
179 int (*saddr_cmp)(const struct sock *, 179 int (*saddr_cmp)(const struct sock *,
180 const struct sock *)); 180 const struct sock *));
181extern void udp_err(struct sk_buff *, u32); 181void udp_err(struct sk_buff *, u32);
182extern int udp_sendmsg(struct kiocb *iocb, struct sock *sk, 182int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
183 struct msghdr *msg, size_t len); 183 size_t len);
184extern int udp_push_pending_frames(struct sock *sk); 184int udp_push_pending_frames(struct sock *sk);
185extern void udp_flush_pending_frames(struct sock *sk); 185void udp_flush_pending_frames(struct sock *sk);
186extern void udp4_hwcsum(struct sk_buff *skb, __be32 src, __be32 dst); 186void udp4_hwcsum(struct sk_buff *skb, __be32 src, __be32 dst);
187extern int udp_rcv(struct sk_buff *skb); 187int udp_rcv(struct sk_buff *skb);
188extern int udp_ioctl(struct sock *sk, int cmd, unsigned long arg); 188int udp_ioctl(struct sock *sk, int cmd, unsigned long arg);
189extern int udp_disconnect(struct sock *sk, int flags); 189int udp_disconnect(struct sock *sk, int flags);
190extern unsigned int udp_poll(struct file *file, struct socket *sock, 190unsigned int udp_poll(struct file *file, struct socket *sock, poll_table *wait);
191 poll_table *wait); 191struct sk_buff *skb_udp_tunnel_segment(struct sk_buff *skb,
192extern struct sk_buff *skb_udp_tunnel_segment(struct sk_buff *skb, 192 netdev_features_t features);
193 netdev_features_t features); 193int udp_lib_getsockopt(struct sock *sk, int level, int optname,
194extern int udp_lib_getsockopt(struct sock *sk, int level, int optname, 194 char __user *optval, int __user *optlen);
195 char __user *optval, int __user *optlen); 195int udp_lib_setsockopt(struct sock *sk, int level, int optname,
196extern int udp_lib_setsockopt(struct sock *sk, int level, int optname, 196 char __user *optval, unsigned int optlen,
197 char __user *optval, unsigned int optlen, 197 int (*push_pending_frames)(struct sock *));
198 int (*push_pending_frames)(struct sock *)); 198struct sock *udp4_lib_lookup(struct net *net, __be32 saddr, __be16 sport,
199extern struct sock *udp4_lib_lookup(struct net *net, __be32 saddr, __be16 sport, 199 __be32 daddr, __be16 dport, int dif);
200 __be32 daddr, __be16 dport, 200struct sock *__udp4_lib_lookup(struct net *net, __be32 saddr, __be16 sport,
201 int dif); 201 __be32 daddr, __be16 dport, int dif,
202extern struct sock *__udp4_lib_lookup(struct net *net, __be32 saddr, __be16 sport, 202 struct udp_table *tbl);
203 __be32 daddr, __be16 dport, 203struct sock *udp6_lib_lookup(struct net *net,
204 int dif, struct udp_table *tbl); 204 const struct in6_addr *saddr, __be16 sport,
205extern struct sock *udp6_lib_lookup(struct net *net, const struct in6_addr *saddr, __be16 sport, 205 const struct in6_addr *daddr, __be16 dport,
206 const struct in6_addr *daddr, __be16 dport, 206 int dif);
207 int dif); 207struct sock *__udp6_lib_lookup(struct net *net,
208extern struct sock *__udp6_lib_lookup(struct net *net, const struct in6_addr *saddr, __be16 sport, 208 const struct in6_addr *saddr, __be16 sport,
209 const struct in6_addr *daddr, __be16 dport, 209 const struct in6_addr *daddr, __be16 dport,
210 int dif, struct udp_table *tbl); 210 int dif, struct udp_table *tbl);
211 211
212/* 212/*
213 * SNMP statistics for UDP and UDP-Lite 213 * SNMP statistics for UDP and UDP-Lite
@@ -259,19 +259,19 @@ struct udp_iter_state {
259}; 259};
260 260
261#ifdef CONFIG_PROC_FS 261#ifdef CONFIG_PROC_FS
262extern int udp_proc_register(struct net *net, struct udp_seq_afinfo *afinfo); 262int udp_proc_register(struct net *net, struct udp_seq_afinfo *afinfo);
263extern void udp_proc_unregister(struct net *net, struct udp_seq_afinfo *afinfo); 263void udp_proc_unregister(struct net *net, struct udp_seq_afinfo *afinfo);
264 264
265extern int udp4_proc_init(void); 265int udp4_proc_init(void);
266extern void udp4_proc_exit(void); 266void udp4_proc_exit(void);
267#endif 267#endif
268 268
269extern int udpv4_offload_init(void); 269int udpv4_offload_init(void);
270 270
271extern void udp_init(void); 271void udp_init(void);
272 272
273extern void udp_encap_enable(void); 273void udp_encap_enable(void);
274#if IS_ENABLED(CONFIG_IPV6) 274#if IS_ENABLED(CONFIG_IPV6)
275extern void udpv6_encap_enable(void); 275void udpv6_encap_enable(void);
276#endif 276#endif
277#endif /* _UDP_H */ 277#endif /* _UDP_H */