Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[NET]: Fix sparse warnings

Of this type, mostly:

CHECK net/ipv6/netfilter.c
net/ipv6/netfilter.c:96:12: warning: symbol 'ipv6_netfilter_init' was not declared. Should it be static?
net/ipv6/netfilter.c:101:6: warning: symbol 'ipv6_netfilter_fini' was not declared. Should it be static?

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Arnaldo Carvalho de Melo and committed by
David S. Miller
20380731 9deff7f2

+210 -164
+2
include/linux/if_ether.h
··· 110 110 { 111 111 return (struct ethhdr *)skb->mac.raw; 112 112 } 113 + 114 + extern struct ctl_table ether_table[]; 113 115 #endif 114 116 115 117 #endif /* _LINUX_IF_ETHER_H */
+4 -2
include/linux/if_frad.h
··· 191 191 int buffer; /* current buffer for S508 firmware */ 192 192 }; 193 193 194 - extern void dlci_ioctl_set(int (*hook)(unsigned int, void __user *)); 195 - 196 194 #endif /* __KERNEL__ */ 197 195 198 196 #endif /* CONFIG_DLCI || CONFIG_DLCI_MODULE */ 197 + 198 + #ifdef __KERNEL__ 199 + extern void dlci_ioctl_set(int (*hook)(unsigned int, void __user *)); 200 + #endif 199 201 200 202 #endif
+4
include/linux/if_tr.h
··· 43 43 }; 44 44 45 45 #ifdef __KERNEL__ 46 + #include <linux/config.h> 46 47 #include <linux/skbuff.h> 47 48 48 49 static inline struct trh_hdr *tr_hdr(const struct sk_buff *skb) 49 50 { 50 51 return (struct trh_hdr *)skb->mac.raw; 51 52 } 53 + #ifdef CONFIG_SYSCTL 54 + extern struct ctl_table tr_table[]; 55 + #endif 52 56 #endif 53 57 54 58 /* This is an Token-Ring LLC structure */
+3
include/linux/igmp.h
··· 129 129 #include <linux/skbuff.h> 130 130 #include <linux/in.h> 131 131 132 + extern int sysctl_igmp_max_memberships; 133 + extern int sysctl_igmp_max_msf; 134 + 132 135 struct ip_sf_socklist 133 136 { 134 137 unsigned int sl_max;
+7
include/linux/net.h
··· 286 286 #define MODULE_ALIAS_NET_PF_PROTO(pf, proto) \ 287 287 MODULE_ALIAS("net-pf-" __stringify(pf) "-proto-" __stringify(proto)) 288 288 289 + #ifdef CONFIG_SYSCTL 290 + #include <linux/sysctl.h> 291 + extern ctl_table net_table[]; 292 + extern int net_msg_cost; 293 + extern int net_msg_burst; 294 + #endif 295 + 289 296 #endif /* __KERNEL__ */ 290 297 #endif /* _LINUX_NET_H */
+10
include/linux/netdevice.h
··· 244 244 }; 245 245 #define NETDEV_BOOT_SETUP_MAX 8 246 246 247 + extern int __init netdev_boot_setup(char *str); 247 248 248 249 /* 249 250 * The DEVICE structure. ··· 674 673 extern void dev_init(void); 675 674 676 675 extern int netdev_nit; 676 + extern int netdev_budget; 677 677 678 678 /* Called by rtnetlink.c:rtnl_unlock() */ 679 679 extern void netdev_run_todo(void); ··· 909 907 /* rx skb timestamps */ 910 908 extern void net_enable_timestamp(void); 911 909 extern void net_disable_timestamp(void); 910 + 911 + #ifdef CONFIG_PROC_FS 912 + extern void *dev_seq_start(struct seq_file *seq, loff_t *pos); 913 + extern void *dev_seq_next(struct seq_file *seq, void *v, loff_t *pos); 914 + extern void dev_seq_stop(struct seq_file *seq, void *v); 915 + #endif 916 + 917 + extern void linkwatch_run_queue(void); 912 918 913 919 #endif /* __KERNEL__ */ 914 920
+2 -2
include/linux/netfilter_ipv6.h
··· 71 71 NF_IP6_PRI_LAST = INT_MAX, 72 72 }; 73 73 74 - int ipv6_netfilter_init(void); 75 - void ipv6_netfilter_fini(void); 74 + extern int ipv6_netfilter_init(void); 75 + extern void ipv6_netfilter_fini(void); 76 76 77 77 #endif /*__LINUX_IP6_NETFILTER_H*/
+4 -2
include/linux/security.h
··· 2727 2727 return security_ops->socket_getpeersec(sock, optval, optlen, len); 2728 2728 } 2729 2729 2730 - static inline int security_sk_alloc(struct sock *sk, int family, int priority) 2730 + static inline int security_sk_alloc(struct sock *sk, int family, 2731 + unsigned int __nocast priority) 2731 2732 { 2732 2733 return security_ops->sk_alloc_security(sk, family, priority); 2733 2734 } ··· 2845 2844 return -ENOPROTOOPT; 2846 2845 } 2847 2846 2848 - static inline int security_sk_alloc(struct sock *sk, int family, int priority) 2847 + static inline int security_sk_alloc(struct sock *sk, int family, 2848 + unsigned int __nocast priority) 2849 2849 { 2850 2850 return 0; 2851 2851 }
+2
include/linux/skbuff.h
··· 1203 1203 extern void skb_split(struct sk_buff *skb, 1204 1204 struct sk_buff *skb1, const u32 len); 1205 1205 1206 + extern void skb_release_data(struct sk_buff *skb); 1207 + 1206 1208 static inline void *skb_header_pointer(const struct sk_buff *skb, int offset, 1207 1209 int len, void *buffer) 1208 1210 {
+7
include/linux/socket.h
··· 26 26 #include <linux/types.h> /* pid_t */ 27 27 #include <linux/compiler.h> /* __user */ 28 28 29 + extern int sysctl_somaxconn; 30 + extern void sock_init(void); 31 + #ifdef CONFIG_PROC_FS 32 + struct seq_file; 33 + extern void socket_seq_show(struct seq_file *seq); 34 + #endif 35 + 29 36 typedef unsigned short sa_family_t; 30 37 31 38 /*
+6
include/net/addrconf.h
··· 45 45 46 46 #ifdef __KERNEL__ 47 47 48 + #include <linux/config.h> 48 49 #include <linux/netdevice.h> 49 50 #include <net/if_inet6.h> 50 51 #include <net/ipv6.h> ··· 238 237 addr->s6_addr32[2] == 0 && 239 238 addr->s6_addr32[3] == htonl(0x00000002)); 240 239 } 240 + 241 + #ifdef CONFIG_PROC_FS 242 + extern int if6_proc_init(void); 243 + extern void if6_proc_exit(void); 244 + #endif 241 245 242 246 #endif 243 247 #endif
+15
include/net/af_unix.h
··· 1 1 #ifndef __LINUX_NET_AFUNIX_H 2 2 #define __LINUX_NET_AFUNIX_H 3 + 4 + #include <linux/config.h> 5 + #include <linux/socket.h> 6 + #include <linux/un.h> 7 + #include <net/sock.h> 8 + 3 9 extern void unix_inflight(struct file *fp); 4 10 extern void unix_notinflight(struct file *fp); 5 11 extern void unix_gc(void); ··· 80 74 wait_queue_head_t peer_wait; 81 75 }; 82 76 #define unix_sk(__sk) ((struct unix_sock *)__sk) 77 + 78 + #ifdef CONFIG_SYSCTL 79 + extern int sysctl_unix_max_dgram_qlen; 80 + extern void unix_sysctl_register(void); 81 + extern void unix_sysctl_unregister(void); 82 + #else 83 + static inline void unix_sysctl_register(void) {} 84 + static inline void unix_sysctl_unregister(void) {} 85 + #endif 83 86 #endif 84 87 #endif
+7
include/net/icmp.h
··· 57 57 return (struct raw_sock *)sk; 58 58 } 59 59 60 + extern int sysctl_icmp_echo_ignore_all; 61 + extern int sysctl_icmp_echo_ignore_broadcasts; 62 + extern int sysctl_icmp_ignore_bogus_error_responses; 63 + extern int sysctl_icmp_errors_use_inbound_ifaddr; 64 + extern int sysctl_icmp_ratelimit; 65 + extern int sysctl_icmp_ratemask; 66 + 60 67 #endif /* _ICMP_H */
+23
include/net/ip.h
··· 163 163 extern int sysctl_ip_default_ttl; 164 164 extern int sysctl_ip_nonlocal_bind; 165 165 166 + /* From ip_fragment.c */ 167 + extern int sysctl_ipfrag_high_thresh; 168 + extern int sysctl_ipfrag_low_thresh; 169 + extern int sysctl_ipfrag_time; 170 + extern int sysctl_ipfrag_secret_interval; 171 + 172 + /* From inetpeer.c */ 173 + extern int inet_peer_threshold; 174 + extern int inet_peer_minttl; 175 + extern int inet_peer_maxttl; 176 + extern int inet_peer_gc_mintime; 177 + extern int inet_peer_gc_maxtime; 178 + 179 + /* From ip_output.c */ 180 + extern int sysctl_ip_dynaddr; 181 + 182 + extern void ipfrag_init(void); 183 + 166 184 #ifdef CONFIG_INET 167 185 /* The function in 2.2 was invalid, producing wrong result for 168 186 * check=0xFEFF. It was noticed by Arthur Skawina _year_ ago. --ANK(000625) */ ··· 366 348 void __user *oldval, size_t __user *oldlenp, 367 349 void __user *newval, size_t newlen, 368 350 void **context); 351 + #ifdef CONFIG_PROC_FS 352 + extern int ip_misc_proc_init(void); 353 + #endif 354 + 355 + extern struct ctl_table ipv4_table[]; 369 356 370 357 #endif /* _IP_H */
+5
include/net/ip_fib.h
··· 295 295 #endif 296 296 } 297 297 298 + #ifdef CONFIG_PROC_FS 299 + extern int fib_proc_init(void); 300 + extern void fib_proc_exit(void); 301 + #endif 302 + 298 303 #endif /* _NET_FIB_H */
+34 -3
include/net/ipv6.h
··· 104 104 105 105 #ifdef __KERNEL__ 106 106 107 + #include <linux/config.h> 107 108 #include <net/sock.h> 108 109 109 110 /* sysctls */ ··· 465 464 extern int sysctl_ip6frag_time; 466 465 extern int sysctl_ip6frag_secret_interval; 467 466 467 + extern struct proto_ops inet6_stream_ops; 468 + extern struct proto_ops inet6_dgram_ops; 469 + 470 + extern int ip6_mc_source(int add, int omode, struct sock *sk, 471 + struct group_source_req *pgsr); 472 + extern int ip6_mc_msfilter(struct sock *sk, struct group_filter *gsf); 473 + extern int ip6_mc_msfget(struct sock *sk, struct group_filter *gsf, 474 + struct group_filter __user *optval, 475 + int __user *optlen); 476 + 477 + #ifdef CONFIG_PROC_FS 478 + extern int ac6_proc_init(void); 479 + extern void ac6_proc_exit(void); 480 + extern int raw6_proc_init(void); 481 + extern void raw6_proc_exit(void); 482 + extern int tcp6_proc_init(void); 483 + extern void tcp6_proc_exit(void); 484 + extern int udp6_proc_init(void); 485 + extern void udp6_proc_exit(void); 486 + extern int ipv6_misc_proc_init(void); 487 + extern void ipv6_misc_proc_exit(void); 488 + 489 + extern struct rt6_statistics rt6_stats; 490 + #endif 491 + 492 + #ifdef CONFIG_SYSCTL 493 + extern ctl_table ipv6_route_table[]; 494 + extern ctl_table ipv6_icmp_table[]; 495 + 496 + extern void ipv6_sysctl_register(void); 497 + extern void ipv6_sysctl_unregister(void); 498 + #endif 499 + 468 500 #endif /* __KERNEL__ */ 469 501 #endif /* _NET_IPV6_H */ 470 - 471 - 472 -
+2
include/net/p8022.h
··· 8 8 struct net_device *orig_dev)); 9 9 extern void unregister_8022_client(struct datalink_proto *proto); 10 10 11 + extern struct datalink_proto *make_8023_client(void); 12 + extern void destroy_8023_client(struct datalink_proto *dl); 11 13 #endif
+6 -1
include/net/raw.h
··· 17 17 #ifndef _RAW_H 18 18 #define _RAW_H 19 19 20 + #include <linux/config.h> 20 21 21 22 extern struct proto raw_prot; 22 - 23 23 24 24 extern void raw_err(struct sock *, struct sk_buff *, u32 info); 25 25 extern int raw_rcv(struct sock *, struct sk_buff *); ··· 38 38 int dif); 39 39 40 40 extern int raw_v4_input(struct sk_buff *skb, struct iphdr *iph, int hash); 41 + 42 + #ifdef CONFIG_PROC_FS 43 + extern int raw_proc_init(void); 44 + extern void raw_proc_exit(void); 45 + #endif 41 46 42 47 #endif /* _RAW_H */
+2
include/net/route.h
··· 195 195 return rt->peer; 196 196 } 197 197 198 + extern ctl_table ipv4_route_table[]; 199 + 198 200 #endif /* _ROUTE_H */
+12
include/net/sock.h
··· 1370 1370 } 1371 1371 #endif 1372 1372 1373 + extern void sk_init(void); 1374 + 1375 + #ifdef CONFIG_SYSCTL 1376 + extern struct ctl_table core_table[]; 1377 + extern int sysctl_optmem_max; 1378 + #endif 1379 + 1380 + #ifdef CONFIG_PROC_FS 1381 + extern __u32 sysctl_wmem_default; 1382 + extern __u32 sysctl_rmem_default; 1383 + #endif 1384 + 1373 1385 #endif /* _SOCK_H */
+12
include/net/tcp.h
··· 1183 1183 extern int tcp_proc_register(struct tcp_seq_afinfo *afinfo); 1184 1184 extern void tcp_proc_unregister(struct tcp_seq_afinfo *afinfo); 1185 1185 1186 + extern struct request_sock_ops tcp_request_sock_ops; 1187 + 1188 + extern int tcp_v4_destroy_sock(struct sock *sk); 1189 + 1190 + #ifdef CONFIG_PROC_FS 1191 + extern int tcp4_proc_init(void); 1192 + extern void tcp4_proc_exit(void); 1193 + #endif 1194 + 1195 + extern void tcp_v4_init(struct net_proto_family *ops); 1196 + extern void tcp_init(void); 1197 + 1186 1198 #endif /* _TCP_H */
+5
include/net/udp.h
··· 94 94 struct seq_operations seq_ops; 95 95 }; 96 96 97 + #ifdef CONFIG_PROC_FS 97 98 extern int udp_proc_register(struct udp_seq_afinfo *afinfo); 98 99 extern void udp_proc_unregister(struct udp_seq_afinfo *afinfo); 100 + 101 + extern int udp4_proc_init(void); 102 + extern void udp4_proc_exit(void); 103 + #endif 99 104 #endif /* _UDP_H */
+1 -1
init/main.c
··· 47 47 #include <linux/rmap.h> 48 48 #include <linux/mempolicy.h> 49 49 #include <linux/key.h> 50 + #include <net/sock.h> 50 51 51 52 #include <asm/io.h> 52 53 #include <asm/bugs.h> ··· 81 80 static int init(void *); 82 81 83 82 extern void init_IRQ(void); 84 - extern void sock_init(void); 85 83 extern void fork_init(unsigned long); 86 84 extern void mca_init(void); 87 85 extern void sbus_init(void);
+1 -3
kernel/sysctl.c
··· 31 31 #include <linux/smp_lock.h> 32 32 #include <linux/init.h> 33 33 #include <linux/kernel.h> 34 + #include <linux/net.h> 34 35 #include <linux/sysrq.h> 35 36 #include <linux/highuid.h> 36 37 #include <linux/writeback.h> ··· 137 136 138 137 static ctl_table kern_table[]; 139 138 static ctl_table vm_table[]; 140 - #ifdef CONFIG_NET 141 - extern ctl_table net_table[]; 142 - #endif 143 139 static ctl_table proc_table[]; 144 140 static ctl_table fs_table[]; 145 141 static ctl_table debug_table[];
+1
net/802/p8023.c
··· 20 20 #include <linux/skbuff.h> 21 21 22 22 #include <net/datalink.h> 23 + #include <net/p8022.h> 23 24 24 25 /* 25 26 * Place an 802.3 header on a packet. The driver will do the mac
+3 -2
net/802/sysctl_net_802.c
··· 10 10 * 2 of the License, or (at your option) any later version. 11 11 */ 12 12 13 - #include <linux/mm.h> 14 - #include <linux/sysctl.h> 15 13 #include <linux/config.h> 14 + #include <linux/mm.h> 15 + #include <linux/if_tr.h> 16 + #include <linux/sysctl.h> 16 17 17 18 #ifdef CONFIG_TR 18 19 extern int sysctl_tr_rif_timeout;
-6
net/core/dev.c
··· 267 267 spin_unlock_bh(&ptype_lock); 268 268 } 269 269 270 - extern void linkwatch_run_queue(void); 271 - 272 - 273 - 274 270 /** 275 271 * __dev_remove_pack - remove packet handler 276 272 * @pt: packet type declaration ··· 1128 1132 #else 1129 1133 #define illegal_highdma(dev, skb) (0) 1130 1134 #endif 1131 - 1132 - extern void skb_release_data(struct sk_buff *); 1133 1135 1134 1136 /* Keep head the same: replace data */ 1135 1137 int __skb_linearize(struct sk_buff *skb, unsigned int __nocast gfp_mask)
+2 -7
net/core/sysctl_net_core.c
··· 9 9 #include <linux/sysctl.h> 10 10 #include <linux/config.h> 11 11 #include <linux/module.h> 12 + #include <linux/socket.h> 13 + #include <net/sock.h> 12 14 13 15 #ifdef CONFIG_SYSCTL 14 16 15 17 extern int netdev_max_backlog; 16 - extern int netdev_budget; 17 18 extern int weight_p; 18 - extern int net_msg_cost; 19 - extern int net_msg_burst; 20 19 21 20 extern __u32 sysctl_wmem_max; 22 21 extern __u32 sysctl_rmem_max; 23 - extern __u32 sysctl_wmem_default; 24 - extern __u32 sysctl_rmem_default; 25 22 26 23 extern int sysctl_core_destroy_delay; 27 - extern int sysctl_optmem_max; 28 - extern int sysctl_somaxconn; 29 24 30 25 #ifdef CONFIG_NET_DIVERT 31 26 extern char sysctl_divert_version[];
+2
net/core/utils.c
··· 16 16 #include <linux/module.h> 17 17 #include <linux/jiffies.h> 18 18 #include <linux/kernel.h> 19 + #include <linux/inet.h> 19 20 #include <linux/mm.h> 21 + #include <linux/net.h> 20 22 #include <linux/string.h> 21 23 #include <linux/types.h> 22 24 #include <linux/random.h>
-4
net/core/wireless.c
··· 571 571 return 0; 572 572 } 573 573 574 - extern void *dev_seq_start(struct seq_file *seq, loff_t *pos); 575 - extern void *dev_seq_next(struct seq_file *seq, void *v, loff_t *pos); 576 - extern void dev_seq_stop(struct seq_file *seq, void *v); 577 - 578 574 static struct seq_operations wireless_seq_ops = { 579 575 .start = dev_seq_start, 580 576 .next = dev_seq_next,
-2
net/ethernet/eth.c
··· 62 62 #include <asm/system.h> 63 63 #include <asm/checksum.h> 64 64 65 - extern int __init netdev_boot_setup(char *str); 66 - 67 65 __setup("ether=", netdev_boot_setup); 68 66 69 67 /*
+1
net/ethernet/sysctl_net_ether.c
··· 7 7 8 8 #include <linux/mm.h> 9 9 #include <linux/sysctl.h> 10 + #include <linux/if_ether.h> 10 11 11 12 ctl_table ether_table[] = { 12 13 {0}
-14
net/ipv4/af_inet.c
··· 859 859 .owner = THIS_MODULE, 860 860 }; 861 861 862 - 863 - extern void tcp_init(void); 864 - extern void tcp_v4_init(struct net_proto_family *); 865 - 866 862 /* Upon startup we insert all the elements in inetsw_array[] into 867 863 * the linked list inetsw. 868 864 */ ··· 1128 1132 } 1129 1133 1130 1134 static int ipv4_proc_init(void); 1131 - extern void ipfrag_init(void); 1132 1135 1133 1136 /* 1134 1137 * IP protocol layer initialiser ··· 1248 1253 /* ------------------------------------------------------------------------ */ 1249 1254 1250 1255 #ifdef CONFIG_PROC_FS 1251 - extern int fib_proc_init(void); 1252 - extern void fib_proc_exit(void); 1253 1256 #ifdef CONFIG_IP_FIB_TRIE 1254 1257 extern int fib_stat_proc_init(void); 1255 1258 extern void fib_stat_proc_exit(void); 1256 1259 #endif 1257 - extern int ip_misc_proc_init(void); 1258 - extern int raw_proc_init(void); 1259 - extern void raw_proc_exit(void); 1260 - extern int tcp4_proc_init(void); 1261 - extern void tcp4_proc_exit(void); 1262 - extern int udp4_proc_init(void); 1263 - extern void udp4_proc_exit(void); 1264 1260 1265 1261 static int __init ipv4_proc_init(void) 1266 1262 {
+1
net/ipv4/datagram.c
··· 16 16 #include <linux/module.h> 17 17 #include <linux/ip.h> 18 18 #include <linux/in.h> 19 + #include <net/ip.h> 19 20 #include <net/sock.h> 20 21 #include <net/route.h> 21 22 #include <net/tcp_states.h>
+1
net/ipv4/inetpeer.c
··· 20 20 #include <linux/kernel.h> 21 21 #include <linux/mm.h> 22 22 #include <linux/net.h> 23 + #include <net/ip.h> 23 24 #include <net/inetpeer.h> 24 25 25 26 /*
-2
net/ipv4/ip_sockglue.c
··· 614 614 } 615 615 case IP_MSFILTER: 616 616 { 617 - extern int sysctl_optmem_max; 618 617 extern int sysctl_igmp_max_msf; 619 618 struct ip_msfilter *msf; 620 619 ··· 768 769 } 769 770 case MCAST_MSFILTER: 770 771 { 771 - extern int sysctl_optmem_max; 772 772 extern int sysctl_igmp_max_msf; 773 773 struct sockaddr_in *psin; 774 774 struct ip_msfilter *msf = NULL;
-3
net/ipv4/proc.c
··· 59 59 */ 60 60 static int sockstat_seq_show(struct seq_file *seq, void *v) 61 61 { 62 - /* From net/socket.c */ 63 - extern void socket_seq_show(struct seq_file *seq); 64 - 65 62 socket_seq_show(seq); 66 63 seq_printf(seq, "TCP: inuse %d orphan %d tw %d alloc %d mem %d\n", 67 64 fold_prot_inuse(&tcp_prot), atomic_read(&tcp_orphan_count),
-2
net/ipv4/syncookies.c
··· 169 169 return mssind < NUM_MSS ? msstab[mssind] + 1 : 0; 170 170 } 171 171 172 - extern struct request_sock_ops tcp_request_sock_ops; 173 - 174 172 static inline struct sock *get_cookie_sock(struct sock *sk, struct sk_buff *skb, 175 173 struct request_sock *req, 176 174 struct dst_entry *dst)
+7 -36
net/ipv4/sysctl_net_ipv4.c
··· 11 11 #include <linux/module.h> 12 12 #include <linux/sysctl.h> 13 13 #include <linux/config.h> 14 + #include <linux/igmp.h> 14 15 #include <net/snmp.h> 16 + #include <net/icmp.h> 15 17 #include <net/ip.h> 16 18 #include <net/route.h> 17 19 #include <net/tcp.h> 18 20 19 21 /* From af_inet.c */ 20 22 extern int sysctl_ip_nonlocal_bind; 21 - 22 - /* From icmp.c */ 23 - extern int sysctl_icmp_echo_ignore_all; 24 - extern int sysctl_icmp_echo_ignore_broadcasts; 25 - extern int sysctl_icmp_ignore_bogus_error_responses; 26 - extern int sysctl_icmp_errors_use_inbound_ifaddr; 27 - 28 - /* From ip_fragment.c */ 29 - extern int sysctl_ipfrag_low_thresh; 30 - extern int sysctl_ipfrag_high_thresh; 31 - extern int sysctl_ipfrag_time; 32 - extern int sysctl_ipfrag_secret_interval; 33 - 34 - /* From ip_output.c */ 35 - extern int sysctl_ip_dynaddr; 36 - 37 - /* From icmp.c */ 38 - extern int sysctl_icmp_ratelimit; 39 - extern int sysctl_icmp_ratemask; 40 - 41 - /* From igmp.c */ 42 - extern int sysctl_igmp_max_memberships; 43 - extern int sysctl_igmp_max_msf; 44 - 45 - /* From inetpeer.c */ 46 - extern int inet_peer_threshold; 47 - extern int inet_peer_minttl; 48 - extern int inet_peer_maxttl; 49 - extern int inet_peer_gc_mintime; 50 - extern int inet_peer_gc_maxtime; 51 23 52 24 #ifdef CONFIG_SYSCTL 53 25 static int tcp_retr1_max = 255; ··· 28 56 #endif 29 57 30 58 struct ipv4_config ipv4_config; 31 - 32 - extern ctl_table ipv4_route_table[]; 33 59 34 60 #ifdef CONFIG_SYSCTL 35 61 ··· 106 136 return ret; 107 137 } 108 138 109 - int sysctl_tcp_congestion_control(ctl_table *table, int __user *name, int nlen, 110 - void __user *oldval, size_t __user *oldlenp, 111 - void __user *newval, size_t newlen, 112 - void **context) 139 + static int sysctl_tcp_congestion_control(ctl_table *table, int __user *name, 140 + int nlen, void __user *oldval, 141 + size_t __user *oldlenp, 142 + void __user *newval, size_t newlen, 143 + void **context) 113 144 { 114 145 char val[TCP_CA_NAME_MAX]; 115 146 ctl_table tbl = {
+1 -1
net/ipv4/tcp_input.c
··· 4229 4229 */ 4230 4230 if (tp->rx_opt.saw_tstamp && tp->rx_opt.rcv_tsecr && 4231 4231 !tp->srtt) 4232 - tcp_ack_saw_tstamp(sk, 0, 0); 4232 + tcp_ack_saw_tstamp(sk, NULL, 0); 4233 4233 4234 4234 if (tp->rx_opt.tstamp_ok) 4235 4235 tp->advmss -= TCPOLEN_TSTAMP_ALIGNED;
+1 -1
net/ipv4/tcp_ipv4.c
··· 66 66 #include <net/icmp.h> 67 67 #include <net/inet_hashtables.h> 68 68 #include <net/tcp.h> 69 + #include <net/transp_v6.h> 69 70 #include <net/ipv6.h> 70 71 #include <net/inet_common.h> 71 72 #include <net/xfrm.h> ··· 77 76 #include <linux/proc_fs.h> 78 77 #include <linux/seq_file.h> 79 78 80 - extern int sysctl_ip_dynaddr; 81 79 int sysctl_tcp_tw_reuse; 82 80 int sysctl_tcp_low_latency; 83 81
+2 -2
net/ipv6/addrconf.c
··· 1126 1126 __ipv6_dev_mc_dec(idev, &maddr); 1127 1127 } 1128 1128 1129 - void addrconf_join_anycast(struct inet6_ifaddr *ifp) 1129 + static void addrconf_join_anycast(struct inet6_ifaddr *ifp) 1130 1130 { 1131 1131 struct in6_addr addr; 1132 1132 ipv6_addr_prefix(&addr, &ifp->addr, ifp->prefix_len); ··· 1135 1135 ipv6_dev_ac_inc(ifp->idev->dev, &addr); 1136 1136 } 1137 1137 1138 - void addrconf_leave_anycast(struct inet6_ifaddr *ifp) 1138 + static void addrconf_leave_anycast(struct inet6_ifaddr *ifp) 1139 1139 { 1140 1140 struct in6_addr addr; 1141 1141 ipv6_addr_prefix(&addr, &ifp->addr, ifp->prefix_len);
-24
net/ipv6/af_inet6.c
··· 67 67 MODULE_DESCRIPTION("IPv6 protocol stack for Linux"); 68 68 MODULE_LICENSE("GPL"); 69 69 70 - /* IPv6 procfs goodies... */ 71 - 72 - #ifdef CONFIG_PROC_FS 73 - extern int raw6_proc_init(void); 74 - extern void raw6_proc_exit(void); 75 - extern int tcp6_proc_init(void); 76 - extern void tcp6_proc_exit(void); 77 - extern int udp6_proc_init(void); 78 - extern void udp6_proc_exit(void); 79 - extern int ipv6_misc_proc_init(void); 80 - extern void ipv6_misc_proc_exit(void); 81 - extern int ac6_proc_init(void); 82 - extern void ac6_proc_exit(void); 83 - extern int if6_proc_init(void); 84 - extern void if6_proc_exit(void); 85 - #endif 86 - 87 70 int sysctl_ipv6_bindv6only; 88 71 89 72 /* The inetsw table contains everything that inet_create needs to ··· 488 505 .owner = THIS_MODULE, 489 506 }; 490 507 491 - #ifdef CONFIG_SYSCTL 492 - extern void ipv6_sysctl_register(void); 493 - extern void ipv6_sysctl_unregister(void); 494 - #endif 495 - 496 508 /* Same as inet6_dgram_ops, sans udp_poll. */ 497 509 static struct proto_ops inet6_sockraw_ops = { 498 510 .family = PF_INET6, ··· 653 675 snmp6_mib_free((void **)icmpv6_statistics); 654 676 snmp6_mib_free((void **)udp_stats_in6); 655 677 } 656 - 657 - extern int ipv6_misc_proc_init(void); 658 678 659 679 static int __init inet6_init(void) 660 680 {
-8
net/ipv6/ipv6_sockglue.c
··· 109 109 return 0; 110 110 } 111 111 112 - extern int ip6_mc_source(int add, int omode, struct sock *sk, 113 - struct group_source_req *pgsr); 114 - extern int ip6_mc_msfilter(struct sock *sk, struct group_filter *gsf); 115 - extern int ip6_mc_msfget(struct sock *sk, struct group_filter *gsf, 116 - struct group_filter __user *optval, int __user *optlen); 117 - 118 - 119 112 int ipv6_setsockopt(struct sock *sk, int level, int optname, 120 113 char __user *optval, int optlen) 121 114 { ··· 439 446 } 440 447 case MCAST_MSFILTER: 441 448 { 442 - extern int sysctl_optmem_max; 443 449 extern int sysctl_mld_max_msf; 444 450 struct group_filter *gsf; 445 451
+2 -4
net/ipv6/route.c
··· 1372 1372 * Drop the packet on the floor 1373 1373 */ 1374 1374 1375 - int ip6_pkt_discard(struct sk_buff *skb) 1375 + static int ip6_pkt_discard(struct sk_buff *skb) 1376 1376 { 1377 1377 IP6_INC_STATS(IPSTATS_MIB_OUTNOROUTES); 1378 1378 icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_NOROUTE, 0, skb->dev); ··· 1380 1380 return 0; 1381 1381 } 1382 1382 1383 - int ip6_pkt_discard_out(struct sk_buff *skb) 1383 + static int ip6_pkt_discard_out(struct sk_buff *skb) 1384 1384 { 1385 1385 skb->dev = skb->dst->dev; 1386 1386 return ip6_pkt_discard(skb); ··· 1959 1959 1960 1960 return arg.len; 1961 1961 } 1962 - 1963 - extern struct rt6_statistics rt6_stats; 1964 1962 1965 1963 static int rt6_stats_seq_show(struct seq_file *seq, void *v) 1966 1964 {
+1 -1
net/ipv6/sit.c
··· 770 770 return 0; 771 771 } 772 772 773 - int __init ipip6_fb_tunnel_init(struct net_device *dev) 773 + static int __init ipip6_fb_tunnel_init(struct net_device *dev) 774 774 { 775 775 struct ip_tunnel *tunnel = dev->priv; 776 776 struct iphdr *iph = &tunnel->parms.iph;
-3
net/ipv6/sysctl_net_ipv6.c
··· 14 14 #include <net/ipv6.h> 15 15 #include <net/addrconf.h> 16 16 17 - extern ctl_table ipv6_route_table[]; 18 - extern ctl_table ipv6_icmp_table[]; 19 - 20 17 #ifdef CONFIG_SYSCTL 21 18 22 19 static ctl_table ipv6_table[] = {
-4
net/ipv6/tcp_ipv6.c
··· 1910 1910 1911 1911 static int tcp_v6_destroy_sock(struct sock *sk) 1912 1912 { 1913 - extern int tcp_v4_destroy_sock(struct sock *sk); 1914 - 1915 1913 tcp_v4_destroy_sock(sk); 1916 1914 return inet6_destroy_sock(sk); 1917 1915 } ··· 2120 2122 .err_handler = tcp_v6_err, 2121 2123 .flags = INET6_PROTO_NOPOLICY|INET6_PROTO_FINAL, 2122 2124 }; 2123 - 2124 - extern struct proto_ops inet6_stream_ops; 2125 2125 2126 2126 static struct inet_protosw tcpv6_protosw = { 2127 2127 .type = SOCK_STREAM,
-2
net/ipv6/udp.c
··· 1054 1054 .obj_size = sizeof(struct udp6_sock), 1055 1055 }; 1056 1056 1057 - extern struct proto_ops inet6_dgram_ops; 1058 - 1059 1057 static struct inet_protosw udpv6_protosw = { 1060 1058 .type = SOCK_DGRAM, 1061 1059 .protocol = IPPROTO_UDP,
-2
net/ipx/af_ipx.c
··· 1940 1940 }; 1941 1941 1942 1942 extern struct datalink_proto *make_EII_client(void); 1943 - extern struct datalink_proto *make_8023_client(void); 1944 1943 extern void destroy_EII_client(struct datalink_proto *); 1945 - extern void destroy_8023_client(struct datalink_proto *); 1946 1944 1947 1945 static unsigned char ipx_8022_type = 0xE0; 1948 1946 static unsigned char ipx_snap_id[5] = { 0x0, 0x0, 0x0, 0x81, 0x37 };
+5 -6
net/socket.c
··· 70 70 #include <linux/seq_file.h> 71 71 #include <linux/wanrouter.h> 72 72 #include <linux/if_bridge.h> 73 + #include <linux/if_frad.h> 74 + #include <linux/if_vlan.h> 73 75 #include <linux/init.h> 74 76 #include <linux/poll.h> 75 77 #include <linux/cache.h> ··· 726 724 return __sock_sendmsg(iocb, sock, &x->async_msg, size); 727 725 } 728 726 729 - ssize_t sock_sendpage(struct file *file, struct page *page, 730 - int offset, size_t size, loff_t *ppos, int more) 727 + static ssize_t sock_sendpage(struct file *file, struct page *page, 728 + int offset, size_t size, loff_t *ppos, int more) 731 729 { 732 730 struct socket *sock; 733 731 int flags; ··· 950 948 return sock->ops->mmap(file, sock, vma); 951 949 } 952 950 953 - int sock_close(struct inode *inode, struct file *filp) 951 + static int sock_close(struct inode *inode, struct file *filp) 954 952 { 955 953 /* 956 954 * It was possible the inode is NULL we were ··· 2028 2026 family); 2029 2027 return 0; 2030 2028 } 2031 - 2032 - 2033 - extern void sk_init(void); 2034 2029 2035 2030 void __init sock_init(void) 2036 2031 {
+3 -5
net/sysctl_net.c
··· 17 17 #include <linux/sysctl.h> 18 18 19 19 #ifdef CONFIG_INET 20 - extern struct ctl_table ipv4_table[]; 20 + #include <net/ip.h> 21 21 #endif 22 22 23 - extern struct ctl_table core_table[]; 24 - 25 23 #ifdef CONFIG_NET 26 - extern struct ctl_table ether_table[]; 24 + #include <linux/if_ether.h> 27 25 #endif 28 26 29 27 #ifdef CONFIG_TR 30 - extern struct ctl_table tr_table[]; 28 + #include <linux/if_tr.h> 31 29 #endif 32 30 33 31 struct ctl_table net_table[] = {
-8
net/unix/af_unix.c
··· 2026 2026 .owner = THIS_MODULE, 2027 2027 }; 2028 2028 2029 - #ifdef CONFIG_SYSCTL 2030 - extern void unix_sysctl_register(void); 2031 - extern void unix_sysctl_unregister(void); 2032 - #else 2033 - static inline void unix_sysctl_register(void) {} 2034 - static inline void unix_sysctl_unregister(void) {} 2035 - #endif 2036 - 2037 2029 static int __init af_unix_init(void) 2038 2030 { 2039 2031 int rc = -1;
+1 -1
net/unix/sysctl_net_unix.c
··· 12 12 #include <linux/mm.h> 13 13 #include <linux/sysctl.h> 14 14 15 - extern int sysctl_unix_max_dgram_qlen; 15 + #include <net/af_unix.h> 16 16 17 17 static ctl_table unix_table[] = { 18 18 {