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

ip*.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>

authored by

Joe Perches and committed by
David S. Miller
5c3a0fd7 1fd51155

+401 -463
+83 -84
include/net/ip.h
··· 86 86 struct rtable; 87 87 struct sockaddr; 88 88 89 - extern int igmp_mc_proc_init(void); 89 + int igmp_mc_proc_init(void); 90 90 91 91 /* 92 92 * Functions provided by ip.c 93 93 */ 94 94 95 - extern int ip_build_and_send_pkt(struct sk_buff *skb, struct sock *sk, 96 - __be32 saddr, __be32 daddr, 97 - struct ip_options_rcu *opt); 98 - extern int ip_rcv(struct sk_buff *skb, struct net_device *dev, 99 - struct packet_type *pt, struct net_device *orig_dev); 100 - extern int ip_local_deliver(struct sk_buff *skb); 101 - extern int ip_mr_input(struct sk_buff *skb); 102 - extern int ip_output(struct sk_buff *skb); 103 - extern int ip_mc_output(struct sk_buff *skb); 104 - extern int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)); 105 - extern int ip_do_nat(struct sk_buff *skb); 106 - extern void ip_send_check(struct iphdr *ip); 107 - extern int __ip_local_out(struct sk_buff *skb); 108 - extern int ip_local_out(struct sk_buff *skb); 109 - extern int ip_queue_xmit(struct sk_buff *skb, struct flowi *fl); 110 - extern void ip_init(void); 111 - extern int ip_append_data(struct sock *sk, struct flowi4 *fl4, 112 - int getfrag(void *from, char *to, int offset, int len, 113 - int odd, struct sk_buff *skb), 114 - void *from, int len, int protolen, 115 - struct ipcm_cookie *ipc, 116 - struct rtable **rt, 117 - unsigned int flags); 118 - extern int ip_generic_getfrag(void *from, char *to, int offset, int len, int odd, struct sk_buff *skb); 119 - extern ssize_t ip_append_page(struct sock *sk, struct flowi4 *fl4, struct page *page, 120 - int offset, size_t size, int flags); 121 - extern struct sk_buff *__ip_make_skb(struct sock *sk, 122 - struct flowi4 *fl4, 123 - struct sk_buff_head *queue, 124 - struct inet_cork *cork); 125 - extern int ip_send_skb(struct net *net, struct sk_buff *skb); 126 - extern int ip_push_pending_frames(struct sock *sk, struct flowi4 *fl4); 127 - extern void ip_flush_pending_frames(struct sock *sk); 128 - extern struct sk_buff *ip_make_skb(struct sock *sk, 129 - struct flowi4 *fl4, 130 - int getfrag(void *from, char *to, int offset, int len, 131 - int odd, struct sk_buff *skb), 132 - void *from, int length, int transhdrlen, 133 - struct ipcm_cookie *ipc, 134 - struct rtable **rtp, 135 - unsigned int flags); 95 + int ip_build_and_send_pkt(struct sk_buff *skb, struct sock *sk, 96 + __be32 saddr, __be32 daddr, 97 + struct ip_options_rcu *opt); 98 + int ip_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, 99 + struct net_device *orig_dev); 100 + int ip_local_deliver(struct sk_buff *skb); 101 + int ip_mr_input(struct sk_buff *skb); 102 + int ip_output(struct sk_buff *skb); 103 + int ip_mc_output(struct sk_buff *skb); 104 + int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)); 105 + int ip_do_nat(struct sk_buff *skb); 106 + void ip_send_check(struct iphdr *ip); 107 + int __ip_local_out(struct sk_buff *skb); 108 + int ip_local_out(struct sk_buff *skb); 109 + int ip_queue_xmit(struct sk_buff *skb, struct flowi *fl); 110 + void ip_init(void); 111 + int ip_append_data(struct sock *sk, struct flowi4 *fl4, 112 + int getfrag(void *from, char *to, int offset, int len, 113 + int odd, struct sk_buff *skb), 114 + void *from, int len, int protolen, 115 + struct ipcm_cookie *ipc, 116 + struct rtable **rt, 117 + unsigned int flags); 118 + int ip_generic_getfrag(void *from, char *to, int offset, int len, int odd, 119 + struct sk_buff *skb); 120 + ssize_t ip_append_page(struct sock *sk, struct flowi4 *fl4, struct page *page, 121 + int offset, size_t size, int flags); 122 + struct sk_buff *__ip_make_skb(struct sock *sk, struct flowi4 *fl4, 123 + struct sk_buff_head *queue, 124 + struct inet_cork *cork); 125 + int ip_send_skb(struct net *net, struct sk_buff *skb); 126 + int ip_push_pending_frames(struct sock *sk, struct flowi4 *fl4); 127 + void ip_flush_pending_frames(struct sock *sk); 128 + struct sk_buff *ip_make_skb(struct sock *sk, struct flowi4 *fl4, 129 + int getfrag(void *from, char *to, int offset, 130 + int len, int odd, struct sk_buff *skb), 131 + void *from, int length, int transhdrlen, 132 + struct ipcm_cookie *ipc, struct rtable **rtp, 133 + unsigned int flags); 136 134 137 135 static inline struct sk_buff *ip_finish_skb(struct sock *sk, struct flowi4 *fl4) 138 136 { ··· 138 140 } 139 141 140 142 /* datagram.c */ 141 - extern int ip4_datagram_connect(struct sock *sk, 142 - struct sockaddr *uaddr, int addr_len); 143 + int ip4_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len); 143 144 144 - extern void ip4_datagram_release_cb(struct sock *sk); 145 + void ip4_datagram_release_cb(struct sock *sk); 145 146 146 147 struct ip_reply_arg { 147 148 struct kvec iov[1]; ··· 181 184 #define NET_ADD_STATS_BH(net, field, adnd) SNMP_ADD_STATS_BH((net)->mib.net_statistics, field, adnd) 182 185 #define NET_ADD_STATS_USER(net, field, adnd) SNMP_ADD_STATS_USER((net)->mib.net_statistics, field, adnd) 183 186 184 - extern unsigned long snmp_fold_field(void __percpu *mib[], int offt); 187 + unsigned long snmp_fold_field(void __percpu *mib[], int offt); 185 188 #if BITS_PER_LONG==32 186 - extern u64 snmp_fold_field64(void __percpu *mib[], int offt, size_t sync_off); 189 + u64 snmp_fold_field64(void __percpu *mib[], int offt, size_t sync_off); 187 190 #else 188 191 static inline u64 snmp_fold_field64(void __percpu *mib[], int offt, size_t syncp_off) 189 192 { 190 193 return snmp_fold_field(mib, offt); 191 194 } 192 195 #endif 193 - extern int snmp_mib_init(void __percpu *ptr[2], size_t mibsize, size_t align); 196 + int snmp_mib_init(void __percpu *ptr[2], size_t mibsize, size_t align); 194 197 195 198 static inline void snmp_mib_free(void __percpu *ptr[SNMP_ARRAY_SZ]) 196 199 { ··· 207 210 seqlock_t lock; 208 211 int range[2]; 209 212 } sysctl_local_ports; 210 - extern void inet_get_local_port_range(int *low, int *high); 213 + void inet_get_local_port_range(int *low, int *high); 211 214 212 215 extern unsigned long *sysctl_local_reserved_ports; 213 216 static inline int inet_is_reserved_local_port(int port) ··· 228 231 /* From ip_output.c */ 229 232 extern int sysctl_ip_dynaddr; 230 233 231 - extern void ipfrag_init(void); 234 + void ipfrag_init(void); 232 235 233 - extern void ip_static_sysctl_init(void); 236 + void ip_static_sysctl_init(void); 234 237 235 238 static inline bool ip_is_fragment(const struct iphdr *iph) 236 239 { ··· 259 262 !(dst_metric_locked(dst, RTAX_MTU))); 260 263 } 261 264 262 - extern void __ip_select_ident(struct iphdr *iph, struct dst_entry *dst, int more); 265 + void __ip_select_ident(struct iphdr *iph, struct dst_entry *dst, int more); 263 266 264 267 static inline void ip_select_ident(struct sk_buff *skb, struct dst_entry *dst, struct sock *sk) 265 268 { ··· 387 390 return 1; 388 391 } 389 392 390 - extern bool ip_call_ra_chain(struct sk_buff *skb); 393 + bool ip_call_ra_chain(struct sk_buff *skb); 391 394 392 395 /* 393 396 * Functions provided by ip_fragment.c ··· 425 428 * Functions provided by ip_forward.c 426 429 */ 427 430 428 - extern int ip_forward(struct sk_buff *skb); 431 + int ip_forward(struct sk_buff *skb); 429 432 430 433 /* 431 434 * Functions provided by ip_options.c 432 435 */ 433 436 434 - extern void ip_options_build(struct sk_buff *skb, struct ip_options *opt, 435 - __be32 daddr, struct rtable *rt, int is_frag); 436 - extern int ip_options_echo(struct ip_options *dopt, struct sk_buff *skb); 437 - extern void ip_options_fragment(struct sk_buff *skb); 438 - extern int ip_options_compile(struct net *net, 439 - struct ip_options *opt, struct sk_buff *skb); 440 - extern int ip_options_get(struct net *net, struct ip_options_rcu **optp, 441 - unsigned char *data, int optlen); 442 - extern int ip_options_get_from_user(struct net *net, struct ip_options_rcu **optp, 443 - unsigned char __user *data, int optlen); 444 - extern void ip_options_undo(struct ip_options * opt); 445 - extern void ip_forward_options(struct sk_buff *skb); 446 - extern int ip_options_rcv_srr(struct sk_buff *skb); 437 + void ip_options_build(struct sk_buff *skb, struct ip_options *opt, 438 + __be32 daddr, struct rtable *rt, int is_frag); 439 + int ip_options_echo(struct ip_options *dopt, struct sk_buff *skb); 440 + void ip_options_fragment(struct sk_buff *skb); 441 + int ip_options_compile(struct net *net, struct ip_options *opt, 442 + struct sk_buff *skb); 443 + int ip_options_get(struct net *net, struct ip_options_rcu **optp, 444 + unsigned char *data, int optlen); 445 + int ip_options_get_from_user(struct net *net, struct ip_options_rcu **optp, 446 + unsigned char __user *data, int optlen); 447 + void ip_options_undo(struct ip_options *opt); 448 + void ip_forward_options(struct sk_buff *skb); 449 + int ip_options_rcv_srr(struct sk_buff *skb); 447 450 448 451 /* 449 452 * Functions provided by ip_sockglue.c 450 453 */ 451 454 452 - extern void ipv4_pktinfo_prepare(struct sk_buff *skb); 453 - extern void ip_cmsg_recv(struct msghdr *msg, struct sk_buff *skb); 454 - extern int ip_cmsg_send(struct net *net, 455 - struct msghdr *msg, struct ipcm_cookie *ipc); 456 - extern int ip_setsockopt(struct sock *sk, int level, int optname, char __user *optval, unsigned int optlen); 457 - extern int ip_getsockopt(struct sock *sk, int level, int optname, char __user *optval, int __user *optlen); 458 - extern int compat_ip_setsockopt(struct sock *sk, int level, 459 - int optname, char __user *optval, unsigned int optlen); 460 - extern int compat_ip_getsockopt(struct sock *sk, int level, 461 - int optname, char __user *optval, int __user *optlen); 462 - extern int ip_ra_control(struct sock *sk, unsigned char on, void (*destructor)(struct sock *)); 455 + void ipv4_pktinfo_prepare(struct sk_buff *skb); 456 + void ip_cmsg_recv(struct msghdr *msg, struct sk_buff *skb); 457 + int ip_cmsg_send(struct net *net, struct msghdr *msg, struct ipcm_cookie *ipc); 458 + int ip_setsockopt(struct sock *sk, int level, int optname, char __user *optval, 459 + unsigned int optlen); 460 + int ip_getsockopt(struct sock *sk, int level, int optname, char __user *optval, 461 + int __user *optlen); 462 + int compat_ip_setsockopt(struct sock *sk, int level, int optname, 463 + char __user *optval, unsigned int optlen); 464 + int compat_ip_getsockopt(struct sock *sk, int level, int optname, 465 + char __user *optval, int __user *optlen); 466 + int ip_ra_control(struct sock *sk, unsigned char on, 467 + void (*destructor)(struct sock *)); 463 468 464 - extern int ip_recv_error(struct sock *sk, struct msghdr *msg, int len); 465 - extern void ip_icmp_error(struct sock *sk, struct sk_buff *skb, int err, 466 - __be16 port, u32 info, u8 *payload); 467 - extern void ip_local_error(struct sock *sk, int err, __be32 daddr, __be16 dport, 468 - u32 info); 469 + int ip_recv_error(struct sock *sk, struct msghdr *msg, int len); 470 + void ip_icmp_error(struct sock *sk, struct sk_buff *skb, int err, __be16 port, 471 + u32 info, u8 *payload); 472 + void ip_local_error(struct sock *sk, int err, __be32 daddr, __be16 dport, 473 + u32 info); 469 474 470 475 #ifdef CONFIG_PROC_FS 471 - extern int ip_misc_proc_init(void); 476 + int ip_misc_proc_init(void); 472 477 #endif 473 478 474 479 #endif /* _IP_H */
+23 -30
include/net/ip6_fib.h
··· 267 267 * exported functions 268 268 */ 269 269 270 - extern struct fib6_table *fib6_get_table(struct net *net, u32 id); 271 - extern struct fib6_table *fib6_new_table(struct net *net, u32 id); 272 - extern struct dst_entry *fib6_rule_lookup(struct net *net, 273 - struct flowi6 *fl6, int flags, 274 - pol_lookup_t lookup); 270 + struct fib6_table *fib6_get_table(struct net *net, u32 id); 271 + struct fib6_table *fib6_new_table(struct net *net, u32 id); 272 + struct dst_entry *fib6_rule_lookup(struct net *net, struct flowi6 *fl6, 273 + int flags, pol_lookup_t lookup); 275 274 276 - extern struct fib6_node *fib6_lookup(struct fib6_node *root, 277 - const struct in6_addr *daddr, 278 - const struct in6_addr *saddr); 275 + struct fib6_node *fib6_lookup(struct fib6_node *root, 276 + const struct in6_addr *daddr, 277 + const struct in6_addr *saddr); 279 278 280 - struct fib6_node *fib6_locate(struct fib6_node *root, 281 - const struct in6_addr *daddr, int dst_len, 282 - const struct in6_addr *saddr, int src_len); 279 + struct fib6_node *fib6_locate(struct fib6_node *root, 280 + const struct in6_addr *daddr, int dst_len, 281 + const struct in6_addr *saddr, int src_len); 283 282 284 - extern void fib6_clean_all_ro(struct net *net, 285 - int (*func)(struct rt6_info *, void *arg), 286 - int prune, void *arg); 283 + void fib6_clean_all_ro(struct net *net, 284 + int (*func)(struct rt6_info *, void *arg), 285 + int prune, void *arg); 287 286 288 - extern void fib6_clean_all(struct net *net, 289 - int (*func)(struct rt6_info *, void *arg), 290 - int prune, void *arg); 287 + void fib6_clean_all(struct net *net, int (*func)(struct rt6_info *, void *arg), 288 + int prune, void *arg); 291 289 292 - extern int fib6_add(struct fib6_node *root, 293 - struct rt6_info *rt, 294 - struct nl_info *info); 290 + int fib6_add(struct fib6_node *root, struct rt6_info *rt, struct nl_info *info); 295 291 296 - extern int fib6_del(struct rt6_info *rt, 297 - struct nl_info *info); 292 + int fib6_del(struct rt6_info *rt, struct nl_info *info); 298 293 299 - extern void inet6_rt_notify(int event, struct rt6_info *rt, 300 - struct nl_info *info); 294 + void inet6_rt_notify(int event, struct rt6_info *rt, struct nl_info *info); 301 295 302 - extern void fib6_run_gc(unsigned long expires, 303 - struct net *net, bool force); 296 + void fib6_run_gc(unsigned long expires, struct net *net, bool force); 304 297 305 - extern void fib6_gc_cleanup(void); 298 + void fib6_gc_cleanup(void); 306 299 307 - extern int fib6_init(void); 300 + int fib6_init(void); 308 301 309 302 #ifdef CONFIG_IPV6_MULTIPLE_TABLES 310 - extern int fib6_rules_init(void); 311 - extern void fib6_rules_cleanup(void); 303 + int fib6_rules_init(void); 304 + void fib6_rules_cleanup(void); 312 305 #else 313 306 static inline int fib6_rules_init(void) 314 307 {
+40 -52
include/net/ip6_route.h
··· 51 51 return (flags >> 3) & 7; 52 52 } 53 53 54 - extern void rt6_bind_peer(struct rt6_info *rt, int create); 54 + void rt6_bind_peer(struct rt6_info *rt, int create); 55 55 56 56 static inline struct inet_peer *__rt6_get_peer(struct rt6_info *rt, int create) 57 57 { ··· 72 72 return __rt6_get_peer(rt, 1); 73 73 } 74 74 75 - extern void ip6_route_input(struct sk_buff *skb); 75 + void ip6_route_input(struct sk_buff *skb); 76 76 77 - extern struct dst_entry * ip6_route_output(struct net *net, 78 - const struct sock *sk, 79 - struct flowi6 *fl6); 80 - extern struct dst_entry * ip6_route_lookup(struct net *net, 81 - struct flowi6 *fl6, int flags); 77 + struct dst_entry *ip6_route_output(struct net *net, const struct sock *sk, 78 + struct flowi6 *fl6); 79 + struct dst_entry *ip6_route_lookup(struct net *net, struct flowi6 *fl6, 80 + int flags); 82 81 83 - extern int ip6_route_init(void); 84 - extern void ip6_route_cleanup(void); 82 + int ip6_route_init(void); 83 + void ip6_route_cleanup(void); 85 84 86 - extern int ipv6_route_ioctl(struct net *net, 87 - unsigned int cmd, 88 - void __user *arg); 85 + int ipv6_route_ioctl(struct net *net, unsigned int cmd, void __user *arg); 89 86 90 - extern int ip6_route_add(struct fib6_config *cfg); 91 - extern int ip6_ins_rt(struct rt6_info *); 92 - extern int ip6_del_rt(struct rt6_info *); 87 + int ip6_route_add(struct fib6_config *cfg); 88 + int ip6_ins_rt(struct rt6_info *); 89 + int ip6_del_rt(struct rt6_info *); 93 90 94 - extern int ip6_route_get_saddr(struct net *net, 95 - struct rt6_info *rt, 96 - const struct in6_addr *daddr, 97 - unsigned int prefs, 98 - struct in6_addr *saddr); 91 + int ip6_route_get_saddr(struct net *net, struct rt6_info *rt, 92 + const struct in6_addr *daddr, unsigned int prefs, 93 + struct in6_addr *saddr); 99 94 100 - extern struct rt6_info *rt6_lookup(struct net *net, 101 - const struct in6_addr *daddr, 102 - const struct in6_addr *saddr, 103 - int oif, int flags); 95 + struct rt6_info *rt6_lookup(struct net *net, const struct in6_addr *daddr, 96 + const struct in6_addr *saddr, int oif, int flags); 104 97 105 - extern struct dst_entry *icmp6_dst_alloc(struct net_device *dev, 106 - struct flowi6 *fl6); 107 - extern int icmp6_dst_gc(void); 98 + struct dst_entry *icmp6_dst_alloc(struct net_device *dev, struct flowi6 *fl6); 99 + int icmp6_dst_gc(void); 108 100 109 - extern void fib6_force_start_gc(struct net *net); 101 + void fib6_force_start_gc(struct net *net); 110 102 111 - extern struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev, 112 - const struct in6_addr *addr, 113 - bool anycast); 103 + struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev, 104 + const struct in6_addr *addr, bool anycast); 114 105 115 106 /* 116 107 * support functions for ND 117 108 * 118 109 */ 119 - extern struct rt6_info * rt6_get_dflt_router(const struct in6_addr *addr, 120 - struct net_device *dev); 121 - extern struct rt6_info * rt6_add_dflt_router(const struct in6_addr *gwaddr, 122 - struct net_device *dev, 123 - unsigned int pref); 110 + struct rt6_info *rt6_get_dflt_router(const struct in6_addr *addr, 111 + struct net_device *dev); 112 + struct rt6_info *rt6_add_dflt_router(const struct in6_addr *gwaddr, 113 + struct net_device *dev, unsigned int pref); 124 114 125 - extern void rt6_purge_dflt_routers(struct net *net); 115 + void rt6_purge_dflt_routers(struct net *net); 126 116 127 - extern int rt6_route_rcv(struct net_device *dev, 128 - u8 *opt, int len, 129 - const struct in6_addr *gwaddr); 117 + int rt6_route_rcv(struct net_device *dev, u8 *opt, int len, 118 + const struct in6_addr *gwaddr); 130 119 131 - extern void ip6_update_pmtu(struct sk_buff *skb, struct net *net, __be32 mtu, 132 - int oif, u32 mark); 133 - extern void ip6_sk_update_pmtu(struct sk_buff *skb, struct sock *sk, 134 - __be32 mtu); 135 - extern void ip6_redirect(struct sk_buff *skb, struct net *net, int oif, u32 mark); 136 - extern void ip6_redirect_no_header(struct sk_buff *skb, struct net *net, int oif, 137 - u32 mark); 138 - extern void ip6_sk_redirect(struct sk_buff *skb, struct sock *sk); 120 + void ip6_update_pmtu(struct sk_buff *skb, struct net *net, __be32 mtu, int oif, 121 + u32 mark); 122 + void ip6_sk_update_pmtu(struct sk_buff *skb, struct sock *sk, __be32 mtu); 123 + void ip6_redirect(struct sk_buff *skb, struct net *net, int oif, u32 mark); 124 + void ip6_redirect_no_header(struct sk_buff *skb, struct net *net, int oif, 125 + u32 mark); 126 + void ip6_sk_redirect(struct sk_buff *skb, struct sock *sk); 139 127 140 128 struct netlink_callback; 141 129 ··· 133 145 struct net *net; 134 146 }; 135 147 136 - extern int rt6_dump_route(struct rt6_info *rt, void *p_arg); 137 - extern void rt6_ifdown(struct net *net, struct net_device *dev); 138 - extern void rt6_mtu_change(struct net_device *dev, unsigned int mtu); 139 - extern void rt6_remove_prefsrc(struct inet6_ifaddr *ifp); 148 + int rt6_dump_route(struct rt6_info *rt, void *p_arg); 149 + void rt6_ifdown(struct net *net, struct net_device *dev); 150 + void rt6_mtu_change(struct net_device *dev, unsigned int mtu); 151 + void rt6_remove_prefsrc(struct inet6_ifaddr *ifp); 140 152 141 153 142 154 /*
+30 -31
include/net/ip_fib.h
··· 165 165 #define FIB_TABLE_HASHSZ 2 166 166 #endif 167 167 168 - extern __be32 fib_info_update_nh_saddr(struct net *net, struct fib_nh *nh); 168 + __be32 fib_info_update_nh_saddr(struct net *net, struct fib_nh *nh); 169 169 170 170 #define FIB_RES_SADDR(net, res) \ 171 171 ((FIB_RES_NH(res).nh_saddr_genid == \ ··· 187 187 unsigned long tb_data[0]; 188 188 }; 189 189 190 - extern int fib_table_lookup(struct fib_table *tb, const struct flowi4 *flp, 191 - struct fib_result *res, int fib_flags); 192 - extern int fib_table_insert(struct fib_table *, struct fib_config *); 193 - extern int fib_table_delete(struct fib_table *, struct fib_config *); 194 - extern int fib_table_dump(struct fib_table *table, struct sk_buff *skb, 195 - struct netlink_callback *cb); 196 - extern int fib_table_flush(struct fib_table *table); 197 - extern void fib_free_table(struct fib_table *tb); 190 + int fib_table_lookup(struct fib_table *tb, const struct flowi4 *flp, 191 + struct fib_result *res, int fib_flags); 192 + int fib_table_insert(struct fib_table *, struct fib_config *); 193 + int fib_table_delete(struct fib_table *, struct fib_config *); 194 + int fib_table_dump(struct fib_table *table, struct sk_buff *skb, 195 + struct netlink_callback *cb); 196 + int fib_table_flush(struct fib_table *table); 197 + void fib_free_table(struct fib_table *tb); 198 198 199 199 200 200 ··· 234 234 } 235 235 236 236 #else /* CONFIG_IP_MULTIPLE_TABLES */ 237 - extern int __net_init fib4_rules_init(struct net *net); 238 - extern void __net_exit fib4_rules_exit(struct net *net); 237 + int __net_init fib4_rules_init(struct net *net); 238 + void __net_exit fib4_rules_exit(struct net *net); 239 239 240 - extern struct fib_table *fib_new_table(struct net *net, u32 id); 241 - extern struct fib_table *fib_get_table(struct net *net, u32 id); 240 + struct fib_table *fib_new_table(struct net *net, u32 id); 241 + struct fib_table *fib_get_table(struct net *net, u32 id); 242 242 243 - extern int __fib_lookup(struct net *net, struct flowi4 *flp, 244 - struct fib_result *res); 243 + int __fib_lookup(struct net *net, struct flowi4 *flp, struct fib_result *res); 245 244 246 245 static inline int fib_lookup(struct net *net, struct flowi4 *flp, 247 246 struct fib_result *res) ··· 268 269 269 270 /* Exported by fib_frontend.c */ 270 271 extern const struct nla_policy rtm_ipv4_policy[]; 271 - extern void ip_fib_init(void); 272 - extern __be32 fib_compute_spec_dst(struct sk_buff *skb); 273 - extern int fib_validate_source(struct sk_buff *skb, __be32 src, __be32 dst, 274 - u8 tos, int oif, struct net_device *dev, 275 - struct in_device *idev, u32 *itag); 276 - extern void fib_select_default(struct fib_result *res); 272 + void ip_fib_init(void); 273 + __be32 fib_compute_spec_dst(struct sk_buff *skb); 274 + int fib_validate_source(struct sk_buff *skb, __be32 src, __be32 dst, 275 + u8 tos, int oif, struct net_device *dev, 276 + struct in_device *idev, u32 *itag); 277 + void fib_select_default(struct fib_result *res); 277 278 #ifdef CONFIG_IP_ROUTE_CLASSID 278 279 static inline int fib_num_tclassid_users(struct net *net) 279 280 { ··· 287 288 #endif 288 289 289 290 /* Exported by fib_semantics.c */ 290 - extern int ip_fib_check_default(__be32 gw, struct net_device *dev); 291 - extern int fib_sync_down_dev(struct net_device *dev, int force); 292 - extern int fib_sync_down_addr(struct net *net, __be32 local); 293 - extern int fib_sync_up(struct net_device *dev); 294 - extern void fib_select_multipath(struct fib_result *res); 291 + int ip_fib_check_default(__be32 gw, struct net_device *dev); 292 + int fib_sync_down_dev(struct net_device *dev, int force); 293 + int fib_sync_down_addr(struct net *net, __be32 local); 294 + int fib_sync_up(struct net_device *dev); 295 + void fib_select_multipath(struct fib_result *res); 295 296 296 297 /* Exported by fib_trie.c */ 297 - extern void fib_trie_init(void); 298 - extern struct fib_table *fib_trie_table(u32 id); 298 + void fib_trie_init(void); 299 + struct fib_table *fib_trie_table(u32 id); 299 300 300 301 static inline void fib_combine_itag(u32 *itag, const struct fib_result *res) 301 302 { ··· 313 314 #endif 314 315 } 315 316 316 - extern void free_fib_info(struct fib_info *fi); 317 + void free_fib_info(struct fib_info *fi); 317 318 318 319 static inline void fib_info_put(struct fib_info *fi) 319 320 { ··· 322 323 } 323 324 324 325 #ifdef CONFIG_PROC_FS 325 - extern int __net_init fib_proc_init(struct net *net); 326 - extern void __net_exit fib_proc_exit(struct net *net); 326 + int __net_init fib_proc_init(struct net *net); 327 + void __net_exit fib_proc_exit(struct net *net); 327 328 #else 328 329 static inline int fib_proc_init(struct net *net) 329 330 {
+115 -126
include/net/ip_vs.h
··· 236 236 #ifdef CONFIG_IP_VS_DEBUG 237 237 #include <linux/net.h> 238 238 239 - extern int ip_vs_get_debug_level(void); 239 + int ip_vs_get_debug_level(void); 240 240 241 241 static inline const char *ip_vs_dbg_addr(int af, char *buf, size_t buf_len, 242 242 const union nf_inet_addr *addr, ··· 532 532 struct tcp_states_t *tcp_state_table; 533 533 }; 534 534 535 - extern struct ip_vs_protocol *ip_vs_proto_get(unsigned short proto); 536 - extern struct ip_vs_proto_data *ip_vs_proto_data_get(struct net *net, 537 - unsigned short proto); 535 + struct ip_vs_protocol *ip_vs_proto_get(unsigned short proto); 536 + struct ip_vs_proto_data *ip_vs_proto_data_get(struct net *net, 537 + unsigned short proto); 538 538 539 539 struct ip_vs_conn_param { 540 540 struct net *net; ··· 1176 1176 * IPVS core functions 1177 1177 * (from ip_vs_core.c) 1178 1178 */ 1179 - extern const char *ip_vs_proto_name(unsigned int proto); 1180 - extern void ip_vs_init_hash_table(struct list_head *table, int rows); 1179 + const char *ip_vs_proto_name(unsigned int proto); 1180 + void ip_vs_init_hash_table(struct list_head *table, int rows); 1181 1181 #define IP_VS_INIT_HASH_TABLE(t) ip_vs_init_hash_table((t), ARRAY_SIZE((t))) 1182 1182 1183 1183 #define IP_VS_APP_TYPE_FTP 1 ··· 1240 1240 smp_mb__before_atomic_dec(); 1241 1241 atomic_dec(&cp->refcnt); 1242 1242 } 1243 - extern void ip_vs_conn_put(struct ip_vs_conn *cp); 1244 - extern void ip_vs_conn_fill_cport(struct ip_vs_conn *cp, __be16 cport); 1243 + void ip_vs_conn_put(struct ip_vs_conn *cp); 1244 + void ip_vs_conn_fill_cport(struct ip_vs_conn *cp, __be16 cport); 1245 1245 1246 1246 struct ip_vs_conn *ip_vs_conn_new(const struct ip_vs_conn_param *p, 1247 1247 const union nf_inet_addr *daddr, 1248 1248 __be16 dport, unsigned int flags, 1249 1249 struct ip_vs_dest *dest, __u32 fwmark); 1250 - extern void ip_vs_conn_expire_now(struct ip_vs_conn *cp); 1250 + void ip_vs_conn_expire_now(struct ip_vs_conn *cp); 1251 1251 1252 - extern const char * ip_vs_state_name(__u16 proto, int state); 1252 + const char *ip_vs_state_name(__u16 proto, int state); 1253 1253 1254 - extern void ip_vs_tcp_conn_listen(struct net *net, struct ip_vs_conn *cp); 1255 - extern int ip_vs_check_template(struct ip_vs_conn *ct); 1256 - extern void ip_vs_random_dropentry(struct net *net); 1257 - extern int ip_vs_conn_init(void); 1258 - extern void ip_vs_conn_cleanup(void); 1254 + void ip_vs_tcp_conn_listen(struct net *net, struct ip_vs_conn *cp); 1255 + int ip_vs_check_template(struct ip_vs_conn *ct); 1256 + void ip_vs_random_dropentry(struct net *net); 1257 + int ip_vs_conn_init(void); 1258 + void ip_vs_conn_cleanup(void); 1259 1259 1260 1260 static inline void ip_vs_control_del(struct ip_vs_conn *cp) 1261 1261 { ··· 1320 1320 /* 1321 1321 * IPVS netns init & cleanup functions 1322 1322 */ 1323 - extern int ip_vs_estimator_net_init(struct net *net); 1324 - extern int ip_vs_control_net_init(struct net *net); 1325 - extern int ip_vs_protocol_net_init(struct net *net); 1326 - extern int ip_vs_app_net_init(struct net *net); 1327 - extern int ip_vs_conn_net_init(struct net *net); 1328 - extern int ip_vs_sync_net_init(struct net *net); 1329 - extern void ip_vs_conn_net_cleanup(struct net *net); 1330 - extern void ip_vs_app_net_cleanup(struct net *net); 1331 - extern void ip_vs_protocol_net_cleanup(struct net *net); 1332 - extern void ip_vs_control_net_cleanup(struct net *net); 1333 - extern void ip_vs_estimator_net_cleanup(struct net *net); 1334 - extern void ip_vs_sync_net_cleanup(struct net *net); 1335 - extern void ip_vs_service_net_cleanup(struct net *net); 1323 + int ip_vs_estimator_net_init(struct net *net); 1324 + int ip_vs_control_net_init(struct net *net); 1325 + int ip_vs_protocol_net_init(struct net *net); 1326 + int ip_vs_app_net_init(struct net *net); 1327 + int ip_vs_conn_net_init(struct net *net); 1328 + int ip_vs_sync_net_init(struct net *net); 1329 + void ip_vs_conn_net_cleanup(struct net *net); 1330 + void ip_vs_app_net_cleanup(struct net *net); 1331 + void ip_vs_protocol_net_cleanup(struct net *net); 1332 + void ip_vs_control_net_cleanup(struct net *net); 1333 + void ip_vs_estimator_net_cleanup(struct net *net); 1334 + void ip_vs_sync_net_cleanup(struct net *net); 1335 + void ip_vs_service_net_cleanup(struct net *net); 1336 1336 1337 1337 /* 1338 1338 * IPVS application functions 1339 1339 * (from ip_vs_app.c) 1340 1340 */ 1341 1341 #define IP_VS_APP_MAX_PORTS 8 1342 - extern struct ip_vs_app *register_ip_vs_app(struct net *net, 1343 - struct ip_vs_app *app); 1344 - extern void unregister_ip_vs_app(struct net *net, struct ip_vs_app *app); 1345 - extern int ip_vs_bind_app(struct ip_vs_conn *cp, struct ip_vs_protocol *pp); 1346 - extern void ip_vs_unbind_app(struct ip_vs_conn *cp); 1347 - extern int register_ip_vs_app_inc(struct net *net, struct ip_vs_app *app, 1348 - __u16 proto, __u16 port); 1349 - extern int ip_vs_app_inc_get(struct ip_vs_app *inc); 1350 - extern void ip_vs_app_inc_put(struct ip_vs_app *inc); 1342 + struct ip_vs_app *register_ip_vs_app(struct net *net, struct ip_vs_app *app); 1343 + void unregister_ip_vs_app(struct net *net, struct ip_vs_app *app); 1344 + int ip_vs_bind_app(struct ip_vs_conn *cp, struct ip_vs_protocol *pp); 1345 + void ip_vs_unbind_app(struct ip_vs_conn *cp); 1346 + int register_ip_vs_app_inc(struct net *net, struct ip_vs_app *app, __u16 proto, 1347 + __u16 port); 1348 + int ip_vs_app_inc_get(struct ip_vs_app *inc); 1349 + void ip_vs_app_inc_put(struct ip_vs_app *inc); 1351 1350 1352 - extern int ip_vs_app_pkt_out(struct ip_vs_conn *, struct sk_buff *skb); 1353 - extern int ip_vs_app_pkt_in(struct ip_vs_conn *, struct sk_buff *skb); 1351 + int ip_vs_app_pkt_out(struct ip_vs_conn *, struct sk_buff *skb); 1352 + int ip_vs_app_pkt_in(struct ip_vs_conn *, struct sk_buff *skb); 1354 1353 1355 1354 int register_ip_vs_pe(struct ip_vs_pe *pe); 1356 1355 int unregister_ip_vs_pe(struct ip_vs_pe *pe); ··· 1370 1371 /* 1371 1372 * IPVS protocol functions (from ip_vs_proto.c) 1372 1373 */ 1373 - extern int ip_vs_protocol_init(void); 1374 - extern void ip_vs_protocol_cleanup(void); 1375 - extern void ip_vs_protocol_timeout_change(struct netns_ipvs *ipvs, int flags); 1376 - extern int *ip_vs_create_timeout_table(int *table, int size); 1377 - extern int 1378 - ip_vs_set_state_timeout(int *table, int num, const char *const *names, 1379 - const char *name, int to); 1380 - extern void 1381 - ip_vs_tcpudp_debug_packet(int af, struct ip_vs_protocol *pp, 1382 - const struct sk_buff *skb, 1383 - int offset, const char *msg); 1374 + int ip_vs_protocol_init(void); 1375 + void ip_vs_protocol_cleanup(void); 1376 + void ip_vs_protocol_timeout_change(struct netns_ipvs *ipvs, int flags); 1377 + int *ip_vs_create_timeout_table(int *table, int size); 1378 + int ip_vs_set_state_timeout(int *table, int num, const char *const *names, 1379 + const char *name, int to); 1380 + void ip_vs_tcpudp_debug_packet(int af, struct ip_vs_protocol *pp, 1381 + const struct sk_buff *skb, int offset, 1382 + const char *msg); 1384 1383 1385 1384 extern struct ip_vs_protocol ip_vs_protocol_tcp; 1386 1385 extern struct ip_vs_protocol ip_vs_protocol_udp; ··· 1391 1394 * Registering/unregistering scheduler functions 1392 1395 * (from ip_vs_sched.c) 1393 1396 */ 1394 - extern int register_ip_vs_scheduler(struct ip_vs_scheduler *scheduler); 1395 - extern int unregister_ip_vs_scheduler(struct ip_vs_scheduler *scheduler); 1396 - extern int ip_vs_bind_scheduler(struct ip_vs_service *svc, 1397 - struct ip_vs_scheduler *scheduler); 1398 - extern void ip_vs_unbind_scheduler(struct ip_vs_service *svc, 1399 - struct ip_vs_scheduler *sched); 1400 - extern struct ip_vs_scheduler *ip_vs_scheduler_get(const char *sched_name); 1401 - extern void ip_vs_scheduler_put(struct ip_vs_scheduler *scheduler); 1402 - extern struct ip_vs_conn * 1397 + int register_ip_vs_scheduler(struct ip_vs_scheduler *scheduler); 1398 + int unregister_ip_vs_scheduler(struct ip_vs_scheduler *scheduler); 1399 + int ip_vs_bind_scheduler(struct ip_vs_service *svc, 1400 + struct ip_vs_scheduler *scheduler); 1401 + void ip_vs_unbind_scheduler(struct ip_vs_service *svc, 1402 + struct ip_vs_scheduler *sched); 1403 + struct ip_vs_scheduler *ip_vs_scheduler_get(const char *sched_name); 1404 + void ip_vs_scheduler_put(struct ip_vs_scheduler *scheduler); 1405 + struct ip_vs_conn * 1403 1406 ip_vs_schedule(struct ip_vs_service *svc, struct sk_buff *skb, 1404 1407 struct ip_vs_proto_data *pd, int *ignored, 1405 1408 struct ip_vs_iphdr *iph); 1406 - extern int ip_vs_leave(struct ip_vs_service *svc, struct sk_buff *skb, 1407 - struct ip_vs_proto_data *pd, struct ip_vs_iphdr *iph); 1409 + int ip_vs_leave(struct ip_vs_service *svc, struct sk_buff *skb, 1410 + struct ip_vs_proto_data *pd, struct ip_vs_iphdr *iph); 1408 1411 1409 - extern void ip_vs_scheduler_err(struct ip_vs_service *svc, const char *msg); 1412 + void ip_vs_scheduler_err(struct ip_vs_service *svc, const char *msg); 1410 1413 1411 1414 1412 1415 /* ··· 1415 1418 extern struct ip_vs_stats ip_vs_stats; 1416 1419 extern int sysctl_ip_vs_sync_ver; 1417 1420 1418 - extern struct ip_vs_service * 1421 + struct ip_vs_service * 1419 1422 ip_vs_service_find(struct net *net, int af, __u32 fwmark, __u16 protocol, 1420 1423 const union nf_inet_addr *vaddr, __be16 vport); 1421 1424 1422 - extern bool 1423 - ip_vs_has_real_service(struct net *net, int af, __u16 protocol, 1424 - const union nf_inet_addr *daddr, __be16 dport); 1425 + bool ip_vs_has_real_service(struct net *net, int af, __u16 protocol, 1426 + const union nf_inet_addr *daddr, __be16 dport); 1425 1427 1426 - extern int ip_vs_use_count_inc(void); 1427 - extern void ip_vs_use_count_dec(void); 1428 - extern int ip_vs_register_nl_ioctl(void); 1429 - extern void ip_vs_unregister_nl_ioctl(void); 1430 - extern int ip_vs_control_init(void); 1431 - extern void ip_vs_control_cleanup(void); 1432 - extern struct ip_vs_dest * 1428 + int ip_vs_use_count_inc(void); 1429 + void ip_vs_use_count_dec(void); 1430 + int ip_vs_register_nl_ioctl(void); 1431 + void ip_vs_unregister_nl_ioctl(void); 1432 + int ip_vs_control_init(void); 1433 + void ip_vs_control_cleanup(void); 1434 + struct ip_vs_dest * 1433 1435 ip_vs_find_dest(struct net *net, int af, const union nf_inet_addr *daddr, 1434 1436 __be16 dport, const union nf_inet_addr *vaddr, __be16 vport, 1435 1437 __u16 protocol, __u32 fwmark, __u32 flags); 1436 - extern void ip_vs_try_bind_dest(struct ip_vs_conn *cp); 1438 + void ip_vs_try_bind_dest(struct ip_vs_conn *cp); 1437 1439 1438 1440 static inline void ip_vs_dest_hold(struct ip_vs_dest *dest) 1439 1441 { ··· 1449 1453 * IPVS sync daemon data and function prototypes 1450 1454 * (from ip_vs_sync.c) 1451 1455 */ 1452 - extern int start_sync_thread(struct net *net, int state, char *mcast_ifn, 1453 - __u8 syncid); 1454 - extern int stop_sync_thread(struct net *net, int state); 1455 - extern void ip_vs_sync_conn(struct net *net, struct ip_vs_conn *cp, int pkts); 1456 - 1456 + int start_sync_thread(struct net *net, int state, char *mcast_ifn, __u8 syncid); 1457 + int stop_sync_thread(struct net *net, int state); 1458 + void ip_vs_sync_conn(struct net *net, struct ip_vs_conn *cp, int pkts); 1457 1459 1458 1460 /* 1459 1461 * IPVS rate estimator prototypes (from ip_vs_est.c) 1460 1462 */ 1461 - extern void ip_vs_start_estimator(struct net *net, struct ip_vs_stats *stats); 1462 - extern void ip_vs_stop_estimator(struct net *net, struct ip_vs_stats *stats); 1463 - extern void ip_vs_zero_estimator(struct ip_vs_stats *stats); 1464 - extern void ip_vs_read_estimator(struct ip_vs_stats_user *dst, 1465 - struct ip_vs_stats *stats); 1463 + void ip_vs_start_estimator(struct net *net, struct ip_vs_stats *stats); 1464 + void ip_vs_stop_estimator(struct net *net, struct ip_vs_stats *stats); 1465 + void ip_vs_zero_estimator(struct ip_vs_stats *stats); 1466 + void ip_vs_read_estimator(struct ip_vs_stats_user *dst, 1467 + struct ip_vs_stats *stats); 1466 1468 1467 1469 /* 1468 1470 * Various IPVS packet transmitters (from ip_vs_xmit.c) 1469 1471 */ 1470 - extern int ip_vs_null_xmit(struct sk_buff *skb, struct ip_vs_conn *cp, 1471 - struct ip_vs_protocol *pp, struct ip_vs_iphdr *iph); 1472 - extern int ip_vs_bypass_xmit(struct sk_buff *skb, struct ip_vs_conn *cp, 1473 - struct ip_vs_protocol *pp, 1474 - struct ip_vs_iphdr *iph); 1475 - extern int ip_vs_nat_xmit(struct sk_buff *skb, struct ip_vs_conn *cp, 1476 - struct ip_vs_protocol *pp, struct ip_vs_iphdr *iph); 1477 - extern int ip_vs_tunnel_xmit(struct sk_buff *skb, struct ip_vs_conn *cp, 1478 - struct ip_vs_protocol *pp, 1479 - struct ip_vs_iphdr *iph); 1480 - extern int ip_vs_dr_xmit(struct sk_buff *skb, struct ip_vs_conn *cp, 1481 - struct ip_vs_protocol *pp, struct ip_vs_iphdr *iph); 1482 - extern int ip_vs_icmp_xmit(struct sk_buff *skb, struct ip_vs_conn *cp, 1483 - struct ip_vs_protocol *pp, int offset, 1484 - unsigned int hooknum, struct ip_vs_iphdr *iph); 1485 - extern void ip_vs_dest_dst_rcu_free(struct rcu_head *head); 1472 + int ip_vs_null_xmit(struct sk_buff *skb, struct ip_vs_conn *cp, 1473 + struct ip_vs_protocol *pp, struct ip_vs_iphdr *iph); 1474 + int ip_vs_bypass_xmit(struct sk_buff *skb, struct ip_vs_conn *cp, 1475 + struct ip_vs_protocol *pp, struct ip_vs_iphdr *iph); 1476 + int ip_vs_nat_xmit(struct sk_buff *skb, struct ip_vs_conn *cp, 1477 + struct ip_vs_protocol *pp, struct ip_vs_iphdr *iph); 1478 + int ip_vs_tunnel_xmit(struct sk_buff *skb, struct ip_vs_conn *cp, 1479 + struct ip_vs_protocol *pp, struct ip_vs_iphdr *iph); 1480 + int ip_vs_dr_xmit(struct sk_buff *skb, struct ip_vs_conn *cp, 1481 + struct ip_vs_protocol *pp, struct ip_vs_iphdr *iph); 1482 + int ip_vs_icmp_xmit(struct sk_buff *skb, struct ip_vs_conn *cp, 1483 + struct ip_vs_protocol *pp, int offset, 1484 + unsigned int hooknum, struct ip_vs_iphdr *iph); 1485 + void ip_vs_dest_dst_rcu_free(struct rcu_head *head); 1486 1486 1487 1487 #ifdef CONFIG_IP_VS_IPV6 1488 - extern int ip_vs_bypass_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp, 1489 - struct ip_vs_protocol *pp, 1490 - struct ip_vs_iphdr *iph); 1491 - extern int ip_vs_nat_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp, 1492 - struct ip_vs_protocol *pp, 1493 - struct ip_vs_iphdr *iph); 1494 - extern int ip_vs_tunnel_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp, 1495 - struct ip_vs_protocol *pp, 1496 - struct ip_vs_iphdr *iph); 1497 - extern int ip_vs_dr_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp, 1498 - struct ip_vs_protocol *pp, struct ip_vs_iphdr *iph); 1499 - extern int ip_vs_icmp_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp, 1500 - struct ip_vs_protocol *pp, int offset, 1501 - unsigned int hooknum, struct ip_vs_iphdr *iph); 1488 + int ip_vs_bypass_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp, 1489 + struct ip_vs_protocol *pp, struct ip_vs_iphdr *iph); 1490 + int ip_vs_nat_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp, 1491 + struct ip_vs_protocol *pp, struct ip_vs_iphdr *iph); 1492 + int ip_vs_tunnel_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp, 1493 + struct ip_vs_protocol *pp, struct ip_vs_iphdr *iph); 1494 + int ip_vs_dr_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp, 1495 + struct ip_vs_protocol *pp, struct ip_vs_iphdr *iph); 1496 + int ip_vs_icmp_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp, 1497 + struct ip_vs_protocol *pp, int offset, 1498 + unsigned int hooknum, struct ip_vs_iphdr *iph); 1502 1499 #endif 1503 1500 1504 1501 #ifdef CONFIG_SYSCTL ··· 1540 1551 return fwd; 1541 1552 } 1542 1553 1543 - extern void ip_vs_nat_icmp(struct sk_buff *skb, struct ip_vs_protocol *pp, 1544 - struct ip_vs_conn *cp, int dir); 1554 + void ip_vs_nat_icmp(struct sk_buff *skb, struct ip_vs_protocol *pp, 1555 + struct ip_vs_conn *cp, int dir); 1545 1556 1546 1557 #ifdef CONFIG_IP_VS_IPV6 1547 - extern void ip_vs_nat_icmp_v6(struct sk_buff *skb, struct ip_vs_protocol *pp, 1548 - struct ip_vs_conn *cp, int dir); 1558 + void ip_vs_nat_icmp_v6(struct sk_buff *skb, struct ip_vs_protocol *pp, 1559 + struct ip_vs_conn *cp, int dir); 1549 1560 #endif 1550 1561 1551 - extern __sum16 ip_vs_checksum_complete(struct sk_buff *skb, int offset); 1562 + __sum16 ip_vs_checksum_complete(struct sk_buff *skb, int offset); 1552 1563 1553 1564 static inline __wsum ip_vs_check_diff4(__be32 old, __be32 new, __wsum oldsum) 1554 1565 { ··· 1607 1618 #endif 1608 1619 } 1609 1620 1610 - extern void ip_vs_update_conntrack(struct sk_buff *skb, struct ip_vs_conn *cp, 1611 - int outin); 1612 - extern int ip_vs_confirm_conntrack(struct sk_buff *skb); 1613 - extern void ip_vs_nfct_expect_related(struct sk_buff *skb, struct nf_conn *ct, 1614 - struct ip_vs_conn *cp, u_int8_t proto, 1615 - const __be16 port, int from_rs); 1616 - extern void ip_vs_conn_drop_conntrack(struct ip_vs_conn *cp); 1621 + void ip_vs_update_conntrack(struct sk_buff *skb, struct ip_vs_conn *cp, 1622 + int outin); 1623 + int ip_vs_confirm_conntrack(struct sk_buff *skb); 1624 + void ip_vs_nfct_expect_related(struct sk_buff *skb, struct nf_conn *ct, 1625 + struct ip_vs_conn *cp, u_int8_t proto, 1626 + const __be16 port, int from_rs); 1627 + void ip_vs_conn_drop_conntrack(struct ip_vs_conn *cp); 1617 1628 1618 1629 #else 1619 1630
+110 -140
include/net/ipv6.h
··· 244 244 struct rcu_head rcu; 245 245 }; 246 246 247 - extern struct ip6_flowlabel *fl6_sock_lookup(struct sock *sk, __be32 label); 248 - extern struct ipv6_txoptions *fl6_merge_options(struct ipv6_txoptions * opt_space, 249 - struct ip6_flowlabel * fl, 250 - struct ipv6_txoptions * fopt); 251 - extern void fl6_free_socklist(struct sock *sk); 252 - extern int ipv6_flowlabel_opt(struct sock *sk, char __user *optval, int optlen); 253 - extern int ip6_flowlabel_init(void); 254 - extern void ip6_flowlabel_cleanup(void); 247 + struct ip6_flowlabel *fl6_sock_lookup(struct sock *sk, __be32 label); 248 + struct ipv6_txoptions *fl6_merge_options(struct ipv6_txoptions *opt_space, 249 + struct ip6_flowlabel *fl, 250 + struct ipv6_txoptions *fopt); 251 + void fl6_free_socklist(struct sock *sk); 252 + int ipv6_flowlabel_opt(struct sock *sk, char __user *optval, int optlen); 253 + int ip6_flowlabel_init(void); 254 + void ip6_flowlabel_cleanup(void); 255 255 256 256 static inline void fl6_sock_release(struct ip6_flowlabel *fl) 257 257 { ··· 259 259 atomic_dec(&fl->users); 260 260 } 261 261 262 - extern void icmpv6_notify(struct sk_buff *skb, u8 type, u8 code, __be32 info); 262 + void icmpv6_notify(struct sk_buff *skb, u8 type, u8 code, __be32 info); 263 263 264 264 int icmpv6_push_pending_frames(struct sock *sk, struct flowi6 *fl6, 265 265 struct icmp6hdr *thdr, int len); ··· 267 267 struct dst_entry *icmpv6_route_lookup(struct net *net, struct sk_buff *skb, 268 268 struct sock *sk, struct flowi6 *fl6); 269 269 270 - extern int ip6_ra_control(struct sock *sk, int sel); 270 + int ip6_ra_control(struct sock *sk, int sel); 271 271 272 - extern int ipv6_parse_hopopts(struct sk_buff *skb); 272 + int ipv6_parse_hopopts(struct sk_buff *skb); 273 273 274 - extern struct ipv6_txoptions * ipv6_dup_options(struct sock *sk, struct ipv6_txoptions *opt); 275 - extern struct ipv6_txoptions * ipv6_renew_options(struct sock *sk, struct ipv6_txoptions *opt, 276 - int newtype, 277 - struct ipv6_opt_hdr __user *newopt, 278 - int newoptlen); 274 + struct ipv6_txoptions *ipv6_dup_options(struct sock *sk, 275 + struct ipv6_txoptions *opt); 276 + struct ipv6_txoptions *ipv6_renew_options(struct sock *sk, 277 + struct ipv6_txoptions *opt, 278 + int newtype, 279 + struct ipv6_opt_hdr __user *newopt, 280 + int newoptlen); 279 281 struct ipv6_txoptions *ipv6_fixup_options(struct ipv6_txoptions *opt_space, 280 282 struct ipv6_txoptions *opt); 281 283 282 - extern bool ipv6_opt_accepted(const struct sock *sk, const struct sk_buff *skb); 284 + bool ipv6_opt_accepted(const struct sock *sk, const struct sk_buff *skb); 283 285 284 286 static inline bool ipv6_accept_ra(struct inet6_dev *idev) 285 287 { ··· 308 306 #define IPV6_FRAG_LOW_THRESH (3 * 1024*1024) /* 3145728 */ 309 307 #define IPV6_FRAG_TIMEOUT (60 * HZ) /* 60 seconds */ 310 308 311 - extern int __ipv6_addr_type(const struct in6_addr *addr); 309 + int __ipv6_addr_type(const struct in6_addr *addr); 312 310 static inline int ipv6_addr_type(const struct in6_addr *addr) 313 311 { 314 312 return __ipv6_addr_type(addr) & 0xffff; ··· 658 656 return __ipv6_addr_diff(a1, a2, sizeof(struct in6_addr)); 659 657 } 660 658 661 - extern void ipv6_select_ident(struct frag_hdr *fhdr, struct rt6_info *rt); 659 + void ipv6_select_ident(struct frag_hdr *fhdr, struct rt6_info *rt); 662 660 663 - extern int ip6_dst_hoplimit(struct dst_entry *dst); 661 + int ip6_dst_hoplimit(struct dst_entry *dst); 664 662 665 663 /* 666 664 * Header manipulation ··· 684 682 * rcv function (called from netdevice level) 685 683 */ 686 684 687 - extern int ipv6_rcv(struct sk_buff *skb, 688 - struct net_device *dev, 689 - struct packet_type *pt, 690 - struct net_device *orig_dev); 685 + int ipv6_rcv(struct sk_buff *skb, struct net_device *dev, 686 + struct packet_type *pt, struct net_device *orig_dev); 691 687 692 - extern int ip6_rcv_finish(struct sk_buff *skb); 688 + int ip6_rcv_finish(struct sk_buff *skb); 693 689 694 690 /* 695 691 * upper-layer output functions 696 692 */ 697 - extern int ip6_xmit(struct sock *sk, 698 - struct sk_buff *skb, 699 - struct flowi6 *fl6, 700 - struct ipv6_txoptions *opt, 701 - int tclass); 693 + int ip6_xmit(struct sock *sk, struct sk_buff *skb, struct flowi6 *fl6, 694 + struct ipv6_txoptions *opt, int tclass); 702 695 703 - extern int ip6_find_1stfragopt(struct sk_buff *skb, u8 **nexthdr); 696 + int ip6_find_1stfragopt(struct sk_buff *skb, u8 **nexthdr); 704 697 705 - extern int ip6_append_data(struct sock *sk, 706 - int getfrag(void *from, char *to, int offset, int len, int odd, struct sk_buff *skb), 707 - void *from, 708 - int length, 709 - int transhdrlen, 710 - int hlimit, 711 - int tclass, 712 - struct ipv6_txoptions *opt, 713 - struct flowi6 *fl6, 714 - struct rt6_info *rt, 715 - unsigned int flags, 716 - int dontfrag); 698 + int ip6_append_data(struct sock *sk, 699 + int getfrag(void *from, char *to, int offset, int len, 700 + int odd, struct sk_buff *skb), 701 + void *from, int length, int transhdrlen, int hlimit, 702 + int tclass, struct ipv6_txoptions *opt, struct flowi6 *fl6, 703 + struct rt6_info *rt, unsigned int flags, int dontfrag); 717 704 718 - extern int ip6_push_pending_frames(struct sock *sk); 705 + int ip6_push_pending_frames(struct sock *sk); 719 706 720 - extern void ip6_flush_pending_frames(struct sock *sk); 707 + void ip6_flush_pending_frames(struct sock *sk); 721 708 722 - extern int ip6_dst_lookup(struct sock *sk, 723 - struct dst_entry **dst, 724 - struct flowi6 *fl6); 725 - extern struct dst_entry * ip6_dst_lookup_flow(struct sock *sk, 726 - struct flowi6 *fl6, 727 - const struct in6_addr *final_dst, 728 - bool can_sleep); 729 - extern struct dst_entry * ip6_sk_dst_lookup_flow(struct sock *sk, 730 - struct flowi6 *fl6, 731 - const struct in6_addr *final_dst, 732 - bool can_sleep); 733 - extern struct dst_entry * ip6_blackhole_route(struct net *net, 734 - struct dst_entry *orig_dst); 709 + int ip6_dst_lookup(struct sock *sk, struct dst_entry **dst, struct flowi6 *fl6); 710 + struct dst_entry *ip6_dst_lookup_flow(struct sock *sk, struct flowi6 *fl6, 711 + const struct in6_addr *final_dst, 712 + bool can_sleep); 713 + struct dst_entry *ip6_sk_dst_lookup_flow(struct sock *sk, struct flowi6 *fl6, 714 + const struct in6_addr *final_dst, 715 + bool can_sleep); 716 + struct dst_entry *ip6_blackhole_route(struct net *net, 717 + struct dst_entry *orig_dst); 735 718 736 719 /* 737 720 * skb processing functions 738 721 */ 739 722 740 - extern int ip6_output(struct sk_buff *skb); 741 - extern int ip6_forward(struct sk_buff *skb); 742 - extern int ip6_input(struct sk_buff *skb); 743 - extern int ip6_mc_input(struct sk_buff *skb); 723 + int ip6_output(struct sk_buff *skb); 724 + int ip6_forward(struct sk_buff *skb); 725 + int ip6_input(struct sk_buff *skb); 726 + int ip6_mc_input(struct sk_buff *skb); 744 727 745 - extern int __ip6_local_out(struct sk_buff *skb); 746 - extern int ip6_local_out(struct sk_buff *skb); 728 + int __ip6_local_out(struct sk_buff *skb); 729 + int ip6_local_out(struct sk_buff *skb); 747 730 748 731 /* 749 732 * Extension header (options) processing 750 733 */ 751 734 752 - extern void ipv6_push_nfrag_opts(struct sk_buff *skb, 753 - struct ipv6_txoptions *opt, 754 - u8 *proto, 755 - struct in6_addr **daddr_p); 756 - extern void ipv6_push_frag_opts(struct sk_buff *skb, 757 - struct ipv6_txoptions *opt, 758 - u8 *proto); 735 + void ipv6_push_nfrag_opts(struct sk_buff *skb, struct ipv6_txoptions *opt, 736 + u8 *proto, struct in6_addr **daddr_p); 737 + void ipv6_push_frag_opts(struct sk_buff *skb, struct ipv6_txoptions *opt, 738 + u8 *proto); 759 739 760 - extern int ipv6_skip_exthdr(const struct sk_buff *, int start, 761 - u8 *nexthdrp, __be16 *frag_offp); 740 + int ipv6_skip_exthdr(const struct sk_buff *, int start, u8 *nexthdrp, 741 + __be16 *frag_offp); 762 742 763 - extern bool ipv6_ext_hdr(u8 nexthdr); 743 + bool ipv6_ext_hdr(u8 nexthdr); 764 744 765 745 enum { 766 746 IP6_FH_F_FRAG = (1 << 0), ··· 751 767 }; 752 768 753 769 /* find specified header and get offset to it */ 754 - extern int ipv6_find_hdr(const struct sk_buff *skb, unsigned int *offset, 755 - int target, unsigned short *fragoff, int *fragflg); 770 + int ipv6_find_hdr(const struct sk_buff *skb, unsigned int *offset, int target, 771 + unsigned short *fragoff, int *fragflg); 756 772 757 - extern int ipv6_find_tlv(struct sk_buff *skb, int offset, int type); 773 + int ipv6_find_tlv(struct sk_buff *skb, int offset, int type); 758 774 759 - extern struct in6_addr *fl6_update_dst(struct flowi6 *fl6, 760 - const struct ipv6_txoptions *opt, 761 - struct in6_addr *orig); 775 + struct in6_addr *fl6_update_dst(struct flowi6 *fl6, 776 + const struct ipv6_txoptions *opt, 777 + struct in6_addr *orig); 762 778 763 779 /* 764 780 * socket options (ipv6_sockglue.c) 765 781 */ 766 782 767 - extern int ipv6_setsockopt(struct sock *sk, int level, 768 - int optname, 769 - char __user *optval, 770 - unsigned int optlen); 771 - extern int ipv6_getsockopt(struct sock *sk, int level, 772 - int optname, 773 - char __user *optval, 774 - int __user *optlen); 775 - extern int compat_ipv6_setsockopt(struct sock *sk, 776 - int level, 777 - int optname, 778 - char __user *optval, 779 - unsigned int optlen); 780 - extern int compat_ipv6_getsockopt(struct sock *sk, 781 - int level, 782 - int optname, 783 - char __user *optval, 784 - int __user *optlen); 783 + int ipv6_setsockopt(struct sock *sk, int level, int optname, 784 + char __user *optval, unsigned int optlen); 785 + int ipv6_getsockopt(struct sock *sk, int level, int optname, 786 + char __user *optval, int __user *optlen); 787 + int compat_ipv6_setsockopt(struct sock *sk, int level, int optname, 788 + char __user *optval, unsigned int optlen); 789 + int compat_ipv6_getsockopt(struct sock *sk, int level, int optname, 790 + char __user *optval, int __user *optlen); 785 791 786 - extern int ip6_datagram_connect(struct sock *sk, 787 - struct sockaddr *addr, int addr_len); 792 + int ip6_datagram_connect(struct sock *sk, struct sockaddr *addr, int addr_len); 788 793 789 - extern int ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len); 790 - extern int ipv6_recv_rxpmtu(struct sock *sk, struct msghdr *msg, int len); 791 - extern void ipv6_icmp_error(struct sock *sk, struct sk_buff *skb, int err, __be16 port, 792 - u32 info, u8 *payload); 793 - extern void ipv6_local_error(struct sock *sk, int err, struct flowi6 *fl6, u32 info); 794 - extern void ipv6_local_rxpmtu(struct sock *sk, struct flowi6 *fl6, u32 mtu); 794 + int ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len); 795 + int ipv6_recv_rxpmtu(struct sock *sk, struct msghdr *msg, int len); 796 + void ipv6_icmp_error(struct sock *sk, struct sk_buff *skb, int err, __be16 port, 797 + u32 info, u8 *payload); 798 + void ipv6_local_error(struct sock *sk, int err, struct flowi6 *fl6, u32 info); 799 + void ipv6_local_rxpmtu(struct sock *sk, struct flowi6 *fl6, u32 mtu); 795 800 796 - extern int inet6_release(struct socket *sock); 797 - extern int inet6_bind(struct socket *sock, struct sockaddr *uaddr, 798 - int addr_len); 799 - extern int inet6_getname(struct socket *sock, struct sockaddr *uaddr, 800 - int *uaddr_len, int peer); 801 - extern int inet6_ioctl(struct socket *sock, unsigned int cmd, 802 - unsigned long arg); 801 + int inet6_release(struct socket *sock); 802 + int inet6_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len); 803 + int inet6_getname(struct socket *sock, struct sockaddr *uaddr, int *uaddr_len, 804 + int peer); 805 + int inet6_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg); 803 806 804 - extern int inet6_hash_connect(struct inet_timewait_death_row *death_row, 807 + int inet6_hash_connect(struct inet_timewait_death_row *death_row, 805 808 struct sock *sk); 806 809 807 810 /* ··· 800 829 struct group_source_req; 801 830 struct group_filter; 802 831 803 - extern int ip6_mc_source(int add, int omode, struct sock *sk, 804 - struct group_source_req *pgsr); 805 - extern int ip6_mc_msfilter(struct sock *sk, struct group_filter *gsf); 806 - extern int ip6_mc_msfget(struct sock *sk, struct group_filter *gsf, 807 - struct group_filter __user *optval, 808 - int __user *optlen); 809 - extern unsigned int inet6_hash_frag(__be32 id, const struct in6_addr *saddr, 810 - const struct in6_addr *daddr, u32 rnd); 832 + int ip6_mc_source(int add, int omode, struct sock *sk, 833 + struct group_source_req *pgsr); 834 + int ip6_mc_msfilter(struct sock *sk, struct group_filter *gsf); 835 + int ip6_mc_msfget(struct sock *sk, struct group_filter *gsf, 836 + struct group_filter __user *optval, int __user *optlen); 837 + unsigned int inet6_hash_frag(__be32 id, const struct in6_addr *saddr, 838 + const struct in6_addr *daddr, u32 rnd); 811 839 812 840 #ifdef CONFIG_PROC_FS 813 - extern int ac6_proc_init(struct net *net); 814 - extern void ac6_proc_exit(struct net *net); 815 - extern int raw6_proc_init(void); 816 - extern void raw6_proc_exit(void); 817 - extern int tcp6_proc_init(struct net *net); 818 - extern void tcp6_proc_exit(struct net *net); 819 - extern int udp6_proc_init(struct net *net); 820 - extern void udp6_proc_exit(struct net *net); 821 - extern int udplite6_proc_init(void); 822 - extern void udplite6_proc_exit(void); 823 - extern int ipv6_misc_proc_init(void); 824 - extern void ipv6_misc_proc_exit(void); 825 - extern int snmp6_register_dev(struct inet6_dev *idev); 826 - extern int snmp6_unregister_dev(struct inet6_dev *idev); 841 + int ac6_proc_init(struct net *net); 842 + void ac6_proc_exit(struct net *net); 843 + int raw6_proc_init(void); 844 + void raw6_proc_exit(void); 845 + int tcp6_proc_init(struct net *net); 846 + void tcp6_proc_exit(struct net *net); 847 + int udp6_proc_init(struct net *net); 848 + void udp6_proc_exit(struct net *net); 849 + int udplite6_proc_init(void); 850 + void udplite6_proc_exit(void); 851 + int ipv6_misc_proc_init(void); 852 + void ipv6_misc_proc_exit(void); 853 + int snmp6_register_dev(struct inet6_dev *idev); 854 + int snmp6_unregister_dev(struct inet6_dev *idev); 827 855 828 856 #else 829 857 static inline int ac6_proc_init(struct net *net) { return 0; } ··· 835 865 extern struct ctl_table ipv6_route_table_template[]; 836 866 extern struct ctl_table ipv6_icmp_table_template[]; 837 867 838 - extern struct ctl_table *ipv6_icmp_sysctl_init(struct net *net); 839 - extern struct ctl_table *ipv6_route_sysctl_init(struct net *net); 840 - extern int ipv6_sysctl_register(void); 841 - extern void ipv6_sysctl_unregister(void); 868 + struct ctl_table *ipv6_icmp_sysctl_init(struct net *net); 869 + struct ctl_table *ipv6_route_sysctl_init(struct net *net); 870 + int ipv6_sysctl_register(void); 871 + void ipv6_sysctl_unregister(void); 842 872 #endif 843 873 844 874 #endif /* _NET_IPV6_H */