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

netfilter: 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
4e77be46 0e418f94

+206 -235
+3 -3
include/net/netfilter/ipv4/nf_conntrack_ipv4.h
··· 16 16 extern struct nf_conntrack_l4proto nf_conntrack_l4proto_udp4; 17 17 extern struct nf_conntrack_l4proto nf_conntrack_l4proto_icmp; 18 18 19 - extern int nf_conntrack_ipv4_compat_init(void); 20 - extern void nf_conntrack_ipv4_compat_fini(void); 19 + int nf_conntrack_ipv4_compat_init(void); 20 + void nf_conntrack_ipv4_compat_fini(void); 21 21 22 - extern void need_ipv4_conntrack(void); 22 + void need_ipv4_conntrack(void); 23 23 24 24 #endif /*_NF_CONNTRACK_IPV4_H*/
+1 -1
include/net/netfilter/ipv4/nf_defrag_ipv4.h
··· 1 1 #ifndef _NF_DEFRAG_IPV4_H 2 2 #define _NF_DEFRAG_IPV4_H 3 3 4 - extern void nf_defrag_ipv4_enable(void); 4 + void nf_defrag_ipv4_enable(void); 5 5 6 6 #endif /* _NF_DEFRAG_IPV4_H */
+7 -8
include/net/netfilter/ipv6/nf_defrag_ipv6.h
··· 1 1 #ifndef _NF_DEFRAG_IPV6_H 2 2 #define _NF_DEFRAG_IPV6_H 3 3 4 - extern void nf_defrag_ipv6_enable(void); 4 + void nf_defrag_ipv6_enable(void); 5 5 6 - extern int nf_ct_frag6_init(void); 7 - extern void nf_ct_frag6_cleanup(void); 8 - extern struct sk_buff *nf_ct_frag6_gather(struct sk_buff *skb, u32 user); 9 - extern void nf_ct_frag6_output(unsigned int hooknum, struct sk_buff *skb, 10 - struct net_device *in, 11 - struct net_device *out, 12 - int (*okfn)(struct sk_buff *)); 6 + int nf_ct_frag6_init(void); 7 + void nf_ct_frag6_cleanup(void); 8 + struct sk_buff *nf_ct_frag6_gather(struct sk_buff *skb, u32 user); 9 + void nf_ct_frag6_output(unsigned int hooknum, struct sk_buff *skb, 10 + struct net_device *in, struct net_device *out, 11 + int (*okfn)(struct sk_buff *)); 13 12 14 13 struct inet_frags_ctl; 15 14
+30 -39
include/net/netfilter/nf_conntrack.h
··· 139 139 } 140 140 141 141 /* Alter reply tuple (maybe alter helper). */ 142 - extern void 143 - nf_conntrack_alter_reply(struct nf_conn *ct, 144 - const struct nf_conntrack_tuple *newreply); 142 + void nf_conntrack_alter_reply(struct nf_conn *ct, 143 + const struct nf_conntrack_tuple *newreply); 145 144 146 145 /* Is this tuple taken? (ignoring any belonging to the given 147 146 conntrack). */ 148 - extern int 149 - nf_conntrack_tuple_taken(const struct nf_conntrack_tuple *tuple, 150 - const struct nf_conn *ignored_conntrack); 147 + int nf_conntrack_tuple_taken(const struct nf_conntrack_tuple *tuple, 148 + const struct nf_conn *ignored_conntrack); 151 149 152 150 /* Return conntrack_info and tuple hash for given skb. */ 153 151 static inline struct nf_conn * ··· 163 165 } 164 166 165 167 /* Protocol module loading */ 166 - extern int nf_ct_l3proto_try_module_get(unsigned short l3proto); 167 - extern void nf_ct_l3proto_module_put(unsigned short l3proto); 168 + int nf_ct_l3proto_try_module_get(unsigned short l3proto); 169 + void nf_ct_l3proto_module_put(unsigned short l3proto); 168 170 169 171 /* 170 172 * Allocate a hashtable of hlist_head (if nulls == 0), 171 173 * or hlist_nulls_head (if nulls == 1) 172 174 */ 173 - extern void *nf_ct_alloc_hashtable(unsigned int *sizep, int nulls); 175 + void *nf_ct_alloc_hashtable(unsigned int *sizep, int nulls); 174 176 175 - extern void nf_ct_free_hashtable(void *hash, unsigned int size); 177 + void nf_ct_free_hashtable(void *hash, unsigned int size); 176 178 177 - extern struct nf_conntrack_tuple_hash * 179 + struct nf_conntrack_tuple_hash * 178 180 __nf_conntrack_find(struct net *net, u16 zone, 179 181 const struct nf_conntrack_tuple *tuple); 180 182 181 - extern int nf_conntrack_hash_check_insert(struct nf_conn *ct); 183 + int nf_conntrack_hash_check_insert(struct nf_conn *ct); 182 184 bool nf_ct_delete(struct nf_conn *ct, u32 pid, int report); 183 185 184 - extern void nf_conntrack_flush_report(struct net *net, u32 portid, int report); 186 + void nf_conntrack_flush_report(struct net *net, u32 portid, int report); 185 187 186 - extern bool nf_ct_get_tuplepr(const struct sk_buff *skb, 187 - unsigned int nhoff, u_int16_t l3num, 188 - struct nf_conntrack_tuple *tuple); 189 - extern bool nf_ct_invert_tuplepr(struct nf_conntrack_tuple *inverse, 190 - const struct nf_conntrack_tuple *orig); 188 + bool nf_ct_get_tuplepr(const struct sk_buff *skb, unsigned int nhoff, 189 + u_int16_t l3num, struct nf_conntrack_tuple *tuple); 190 + bool nf_ct_invert_tuplepr(struct nf_conntrack_tuple *inverse, 191 + const struct nf_conntrack_tuple *orig); 191 192 192 - extern void __nf_ct_refresh_acct(struct nf_conn *ct, 193 - enum ip_conntrack_info ctinfo, 194 - const struct sk_buff *skb, 195 - unsigned long extra_jiffies, 196 - int do_acct); 193 + void __nf_ct_refresh_acct(struct nf_conn *ct, enum ip_conntrack_info ctinfo, 194 + const struct sk_buff *skb, 195 + unsigned long extra_jiffies, int do_acct); 197 196 198 197 /* Refresh conntrack for this many jiffies and do accounting */ 199 198 static inline void nf_ct_refresh_acct(struct nf_conn *ct, ··· 209 214 __nf_ct_refresh_acct(ct, 0, skb, extra_jiffies, 0); 210 215 } 211 216 212 - extern bool __nf_ct_kill_acct(struct nf_conn *ct, 213 - enum ip_conntrack_info ctinfo, 214 - const struct sk_buff *skb, 215 - int do_acct); 217 + bool __nf_ct_kill_acct(struct nf_conn *ct, enum ip_conntrack_info ctinfo, 218 + const struct sk_buff *skb, int do_acct); 216 219 217 220 /* kill conntrack and do accounting */ 218 221 static inline bool nf_ct_kill_acct(struct nf_conn *ct, ··· 237 244 { 238 245 return &__raw_get_cpu_var(nf_conntrack_untracked); 239 246 } 240 - extern void nf_ct_untracked_status_or(unsigned long bits); 247 + void nf_ct_untracked_status_or(unsigned long bits); 241 248 242 249 /* Iterate over all conntracks: if iter returns true, it's deleted. */ 243 - extern void 244 - nf_ct_iterate_cleanup(struct net *net, 245 - int (*iter)(struct nf_conn *i, void *data), 246 - void *data, u32 portid, int report); 247 - extern void nf_conntrack_free(struct nf_conn *ct); 248 - extern struct nf_conn * 249 - nf_conntrack_alloc(struct net *net, u16 zone, 250 - const struct nf_conntrack_tuple *orig, 251 - const struct nf_conntrack_tuple *repl, 252 - gfp_t gfp); 250 + void nf_ct_iterate_cleanup(struct net *net, 251 + int (*iter)(struct nf_conn *i, void *data), 252 + void *data, u32 portid, int report); 253 + void nf_conntrack_free(struct nf_conn *ct); 254 + struct nf_conn *nf_conntrack_alloc(struct net *net, u16 zone, 255 + const struct nf_conntrack_tuple *orig, 256 + const struct nf_conntrack_tuple *repl, 257 + gfp_t gfp); 253 258 254 259 static inline int nf_ct_is_template(const struct nf_conn *ct) 255 260 { ··· 278 287 279 288 struct kernel_param; 280 289 281 - extern int nf_conntrack_set_hashsize(const char *val, struct kernel_param *kp); 290 + int nf_conntrack_set_hashsize(const char *val, struct kernel_param *kp); 282 291 extern unsigned int nf_conntrack_htable_size; 283 292 extern unsigned int nf_conntrack_max; 284 293 extern unsigned int nf_conntrack_hash_rnd;
+6 -6
include/net/netfilter/nf_conntrack_acct.h
··· 42 42 return acct; 43 43 }; 44 44 45 - extern unsigned int 46 - seq_print_acct(struct seq_file *s, const struct nf_conn *ct, int dir); 45 + unsigned int seq_print_acct(struct seq_file *s, const struct nf_conn *ct, 46 + int dir); 47 47 48 48 /* Check if connection tracking accounting is enabled */ 49 49 static inline bool nf_ct_acct_enabled(struct net *net) ··· 57 57 net->ct.sysctl_acct = enable; 58 58 } 59 59 60 - extern int nf_conntrack_acct_pernet_init(struct net *net); 61 - extern void nf_conntrack_acct_pernet_fini(struct net *net); 60 + int nf_conntrack_acct_pernet_init(struct net *net); 61 + void nf_conntrack_acct_pernet_fini(struct net *net); 62 62 63 - extern int nf_conntrack_acct_init(void); 64 - extern void nf_conntrack_acct_fini(void); 63 + int nf_conntrack_acct_init(void); 64 + void nf_conntrack_acct_fini(void); 65 65 #endif /* _NF_CONNTRACK_ACCT_H */
+24 -31
include/net/netfilter/nf_conntrack_core.h
··· 20 20 /* This header is used to share core functionality between the 21 21 standalone connection tracking module, and the compatibility layer's use 22 22 of connection tracking. */ 23 - extern unsigned int nf_conntrack_in(struct net *net, 24 - u_int8_t pf, 25 - unsigned int hooknum, 26 - struct sk_buff *skb); 23 + unsigned int nf_conntrack_in(struct net *net, u_int8_t pf, unsigned int hooknum, 24 + struct sk_buff *skb); 27 25 28 - extern int nf_conntrack_init_net(struct net *net); 29 - extern void nf_conntrack_cleanup_net(struct net *net); 30 - extern void nf_conntrack_cleanup_net_list(struct list_head *net_exit_list); 26 + int nf_conntrack_init_net(struct net *net); 27 + void nf_conntrack_cleanup_net(struct net *net); 28 + void nf_conntrack_cleanup_net_list(struct list_head *net_exit_list); 31 29 32 - extern int nf_conntrack_proto_pernet_init(struct net *net); 33 - extern void nf_conntrack_proto_pernet_fini(struct net *net); 30 + int nf_conntrack_proto_pernet_init(struct net *net); 31 + void nf_conntrack_proto_pernet_fini(struct net *net); 34 32 35 - extern int nf_conntrack_proto_init(void); 36 - extern void nf_conntrack_proto_fini(void); 33 + int nf_conntrack_proto_init(void); 34 + void nf_conntrack_proto_fini(void); 37 35 38 - extern int nf_conntrack_init_start(void); 39 - extern void nf_conntrack_cleanup_start(void); 36 + int nf_conntrack_init_start(void); 37 + void nf_conntrack_cleanup_start(void); 40 38 41 - extern void nf_conntrack_init_end(void); 42 - extern void nf_conntrack_cleanup_end(void); 39 + void nf_conntrack_init_end(void); 40 + void nf_conntrack_cleanup_end(void); 43 41 44 - extern bool 45 - nf_ct_get_tuple(const struct sk_buff *skb, 46 - unsigned int nhoff, 47 - unsigned int dataoff, 48 - u_int16_t l3num, 49 - u_int8_t protonum, 50 - struct nf_conntrack_tuple *tuple, 51 - const struct nf_conntrack_l3proto *l3proto, 52 - const struct nf_conntrack_l4proto *l4proto); 42 + bool nf_ct_get_tuple(const struct sk_buff *skb, unsigned int nhoff, 43 + unsigned int dataoff, u_int16_t l3num, u_int8_t protonum, 44 + struct nf_conntrack_tuple *tuple, 45 + const struct nf_conntrack_l3proto *l3proto, 46 + const struct nf_conntrack_l4proto *l4proto); 53 47 54 - extern bool 55 - nf_ct_invert_tuple(struct nf_conntrack_tuple *inverse, 56 - const struct nf_conntrack_tuple *orig, 57 - const struct nf_conntrack_l3proto *l3proto, 58 - const struct nf_conntrack_l4proto *l4proto); 48 + bool nf_ct_invert_tuple(struct nf_conntrack_tuple *inverse, 49 + const struct nf_conntrack_tuple *orig, 50 + const struct nf_conntrack_l3proto *l3proto, 51 + const struct nf_conntrack_l4proto *l4proto); 59 52 60 53 /* Find a connection corresponding to a tuple. */ 61 - extern struct nf_conntrack_tuple_hash * 54 + struct nf_conntrack_tuple_hash * 62 55 nf_conntrack_find_get(struct net *net, u16 zone, 63 56 const struct nf_conntrack_tuple *tuple); 64 57 65 - extern int __nf_conntrack_confirm(struct sk_buff *skb); 58 + int __nf_conntrack_confirm(struct sk_buff *skb); 66 59 67 60 /* Confirm a connection: returns NF_DROP if packet must be dropped. */ 68 61 static inline int nf_conntrack_confirm(struct sk_buff *skb)
+13 -9
include/net/netfilter/nf_conntrack_ecache.h
··· 68 68 int (*fcn)(unsigned int events, struct nf_ct_event *item); 69 69 }; 70 70 71 - extern int nf_conntrack_register_notifier(struct net *net, struct nf_ct_event_notifier *nb); 72 - extern void nf_conntrack_unregister_notifier(struct net *net, struct nf_ct_event_notifier *nb); 71 + int nf_conntrack_register_notifier(struct net *net, 72 + struct nf_ct_event_notifier *nb); 73 + void nf_conntrack_unregister_notifier(struct net *net, 74 + struct nf_ct_event_notifier *nb); 73 75 74 - extern void nf_ct_deliver_cached_events(struct nf_conn *ct); 76 + void nf_ct_deliver_cached_events(struct nf_conn *ct); 75 77 76 78 static inline void 77 79 nf_conntrack_event_cache(enum ip_conntrack_events event, struct nf_conn *ct) ··· 168 166 int (*fcn)(unsigned int events, struct nf_exp_event *item); 169 167 }; 170 168 171 - extern int nf_ct_expect_register_notifier(struct net *net, struct nf_exp_event_notifier *nb); 172 - extern void nf_ct_expect_unregister_notifier(struct net *net, struct nf_exp_event_notifier *nb); 169 + int nf_ct_expect_register_notifier(struct net *net, 170 + struct nf_exp_event_notifier *nb); 171 + void nf_ct_expect_unregister_notifier(struct net *net, 172 + struct nf_exp_event_notifier *nb); 173 173 174 174 static inline void 175 175 nf_ct_expect_event_report(enum ip_conntrack_expect_events event, ··· 211 207 nf_ct_expect_event_report(event, exp, 0, 0); 212 208 } 213 209 214 - extern int nf_conntrack_ecache_pernet_init(struct net *net); 215 - extern void nf_conntrack_ecache_pernet_fini(struct net *net); 210 + int nf_conntrack_ecache_pernet_init(struct net *net); 211 + void nf_conntrack_ecache_pernet_fini(struct net *net); 216 212 217 - extern int nf_conntrack_ecache_init(void); 218 - extern void nf_conntrack_ecache_fini(void); 213 + int nf_conntrack_ecache_init(void); 214 + void nf_conntrack_ecache_fini(void); 219 215 #else /* CONFIG_NF_CONNTRACK_EVENTS */ 220 216 221 217 static inline void nf_conntrack_event_cache(enum ip_conntrack_events event,
+1 -1
include/net/netfilter/nf_conntrack_extend.h
··· 73 73 ((id##_TYPE *)__nf_ct_ext_find((ext), (id))) 74 74 75 75 /* Destroy all relationships */ 76 - extern void __nf_ct_ext_destroy(struct nf_conn *ct); 76 + void __nf_ct_ext_destroy(struct nf_conn *ct); 77 77 static inline void nf_ct_ext_destroy(struct nf_conn *ct) 78 78 { 79 79 if (ct->ext)
+21 -19
include/net/netfilter/nf_conntrack_helper.h
··· 52 52 unsigned int queue_num; /* For user-space helpers. */ 53 53 }; 54 54 55 - extern struct nf_conntrack_helper * 56 - __nf_conntrack_helper_find(const char *name, u16 l3num, u8 protonum); 55 + struct nf_conntrack_helper *__nf_conntrack_helper_find(const char *name, 56 + u16 l3num, u8 protonum); 57 57 58 - extern struct nf_conntrack_helper * 59 - nf_conntrack_helper_try_module_get(const char *name, u16 l3num, u8 protonum); 58 + struct nf_conntrack_helper *nf_conntrack_helper_try_module_get(const char *name, 59 + u16 l3num, 60 + u8 protonum); 60 61 61 - extern int nf_conntrack_helper_register(struct nf_conntrack_helper *); 62 - extern void nf_conntrack_helper_unregister(struct nf_conntrack_helper *); 62 + int nf_conntrack_helper_register(struct nf_conntrack_helper *); 63 + void nf_conntrack_helper_unregister(struct nf_conntrack_helper *); 63 64 64 - extern struct nf_conn_help *nf_ct_helper_ext_add(struct nf_conn *ct, struct nf_conntrack_helper *helper, gfp_t gfp); 65 + struct nf_conn_help *nf_ct_helper_ext_add(struct nf_conn *ct, 66 + struct nf_conntrack_helper *helper, 67 + gfp_t gfp); 65 68 66 - extern int __nf_ct_try_assign_helper(struct nf_conn *ct, struct nf_conn *tmpl, 67 - gfp_t flags); 69 + int __nf_ct_try_assign_helper(struct nf_conn *ct, struct nf_conn *tmpl, 70 + gfp_t flags); 68 71 69 - extern void nf_ct_helper_destroy(struct nf_conn *ct); 72 + void nf_ct_helper_destroy(struct nf_conn *ct); 70 73 71 74 static inline struct nf_conn_help *nfct_help(const struct nf_conn *ct) 72 75 { ··· 85 82 return (void *)help->data; 86 83 } 87 84 88 - extern int nf_conntrack_helper_pernet_init(struct net *net); 89 - extern void nf_conntrack_helper_pernet_fini(struct net *net); 85 + int nf_conntrack_helper_pernet_init(struct net *net); 86 + void nf_conntrack_helper_pernet_fini(struct net *net); 90 87 91 - extern int nf_conntrack_helper_init(void); 92 - extern void nf_conntrack_helper_fini(void); 88 + int nf_conntrack_helper_init(void); 89 + void nf_conntrack_helper_fini(void); 93 90 94 - extern int nf_conntrack_broadcast_help(struct sk_buff *skb, 95 - unsigned int protoff, 96 - struct nf_conn *ct, 97 - enum ip_conntrack_info ctinfo, 98 - unsigned int timeout); 91 + int nf_conntrack_broadcast_help(struct sk_buff *skb, unsigned int protoff, 92 + struct nf_conn *ct, 93 + enum ip_conntrack_info ctinfo, 94 + unsigned int timeout); 99 95 100 96 struct nf_ct_helper_expectfn { 101 97 struct list_head head;
+8 -8
include/net/netfilter/nf_conntrack_l3proto.h
··· 77 77 extern struct nf_conntrack_l3proto __rcu *nf_ct_l3protos[AF_MAX]; 78 78 79 79 /* Protocol pernet registration. */ 80 - extern int nf_ct_l3proto_pernet_register(struct net *net, 81 - struct nf_conntrack_l3proto *proto); 82 - extern void nf_ct_l3proto_pernet_unregister(struct net *net, 83 - struct nf_conntrack_l3proto *proto); 80 + int nf_ct_l3proto_pernet_register(struct net *net, 81 + struct nf_conntrack_l3proto *proto); 82 + void nf_ct_l3proto_pernet_unregister(struct net *net, 83 + struct nf_conntrack_l3proto *proto); 84 84 85 85 /* Protocol global registration. */ 86 - extern int nf_ct_l3proto_register(struct nf_conntrack_l3proto *proto); 87 - extern void nf_ct_l3proto_unregister(struct nf_conntrack_l3proto *proto); 86 + int nf_ct_l3proto_register(struct nf_conntrack_l3proto *proto); 87 + void nf_ct_l3proto_unregister(struct nf_conntrack_l3proto *proto); 88 88 89 - extern struct nf_conntrack_l3proto *nf_ct_l3proto_find_get(u_int16_t l3proto); 90 - extern void nf_ct_l3proto_put(struct nf_conntrack_l3proto *p); 89 + struct nf_conntrack_l3proto *nf_ct_l3proto_find_get(u_int16_t l3proto); 90 + void nf_ct_l3proto_put(struct nf_conntrack_l3proto *p); 91 91 92 92 /* Existing built-in protocols */ 93 93 extern struct nf_conntrack_l3proto nf_conntrack_l3proto_generic;
+16 -16
include/net/netfilter/nf_conntrack_l4proto.h
··· 114 114 115 115 #define MAX_NF_CT_PROTO 256 116 116 117 - extern struct nf_conntrack_l4proto * 118 - __nf_ct_l4proto_find(u_int16_t l3proto, u_int8_t l4proto); 117 + struct nf_conntrack_l4proto *__nf_ct_l4proto_find(u_int16_t l3proto, 118 + u_int8_t l4proto); 119 119 120 - extern struct nf_conntrack_l4proto * 121 - nf_ct_l4proto_find_get(u_int16_t l3proto, u_int8_t l4proto); 122 - extern void nf_ct_l4proto_put(struct nf_conntrack_l4proto *p); 120 + struct nf_conntrack_l4proto *nf_ct_l4proto_find_get(u_int16_t l3proto, 121 + u_int8_t l4proto); 122 + void nf_ct_l4proto_put(struct nf_conntrack_l4proto *p); 123 123 124 124 /* Protocol pernet registration. */ 125 - extern int nf_ct_l4proto_pernet_register(struct net *net, 126 - struct nf_conntrack_l4proto *proto); 127 - extern void nf_ct_l4proto_pernet_unregister(struct net *net, 128 - struct nf_conntrack_l4proto *proto); 125 + int nf_ct_l4proto_pernet_register(struct net *net, 126 + struct nf_conntrack_l4proto *proto); 127 + void nf_ct_l4proto_pernet_unregister(struct net *net, 128 + struct nf_conntrack_l4proto *proto); 129 129 130 130 /* Protocol global registration. */ 131 - extern int nf_ct_l4proto_register(struct nf_conntrack_l4proto *proto); 132 - extern void nf_ct_l4proto_unregister(struct nf_conntrack_l4proto *proto); 131 + int nf_ct_l4proto_register(struct nf_conntrack_l4proto *proto); 132 + void nf_ct_l4proto_unregister(struct nf_conntrack_l4proto *proto); 133 133 134 134 static inline void nf_ct_kfree_compat_sysctl_table(struct nf_proto_net *pn) 135 135 { ··· 140 140 } 141 141 142 142 /* Generic netlink helpers */ 143 - extern int nf_ct_port_tuple_to_nlattr(struct sk_buff *skb, 144 - const struct nf_conntrack_tuple *tuple); 145 - extern int nf_ct_port_nlattr_to_tuple(struct nlattr *tb[], 146 - struct nf_conntrack_tuple *t); 147 - extern int nf_ct_port_nlattr_tuple_size(void); 143 + int nf_ct_port_tuple_to_nlattr(struct sk_buff *skb, 144 + const struct nf_conntrack_tuple *tuple); 145 + int nf_ct_port_nlattr_to_tuple(struct nlattr *tb[], 146 + struct nf_conntrack_tuple *t); 147 + int nf_ct_port_nlattr_tuple_size(void); 148 148 extern const struct nla_policy nf_ct_port_nla_policy[]; 149 149 150 150 #ifdef CONFIG_SYSCTL
+11 -15
include/net/netfilter/nf_conntrack_seqadj.h
··· 30 30 return nf_ct_ext_add(ct, NF_CT_EXT_SEQADJ, GFP_ATOMIC); 31 31 } 32 32 33 - extern int nf_ct_seqadj_init(struct nf_conn *ct, enum ip_conntrack_info ctinfo, 34 - s32 off); 35 - extern int nf_ct_seqadj_set(struct nf_conn *ct, enum ip_conntrack_info ctinfo, 36 - __be32 seq, s32 off); 37 - extern void nf_ct_tcp_seqadj_set(struct sk_buff *skb, 38 - struct nf_conn *ct, 39 - enum ip_conntrack_info ctinfo, 40 - s32 off); 33 + int nf_ct_seqadj_init(struct nf_conn *ct, enum ip_conntrack_info ctinfo, 34 + s32 off); 35 + int nf_ct_seqadj_set(struct nf_conn *ct, enum ip_conntrack_info ctinfo, 36 + __be32 seq, s32 off); 37 + void nf_ct_tcp_seqadj_set(struct sk_buff *skb, struct nf_conn *ct, 38 + enum ip_conntrack_info ctinfo, s32 off); 41 39 42 - extern int nf_ct_seq_adjust(struct sk_buff *skb, 43 - struct nf_conn *ct, enum ip_conntrack_info ctinfo, 44 - unsigned int protoff); 45 - extern s32 nf_ct_seq_offset(const struct nf_conn *ct, enum ip_conntrack_dir, 46 - u32 seq); 40 + int nf_ct_seq_adjust(struct sk_buff *skb, struct nf_conn *ct, 41 + enum ip_conntrack_info ctinfo, unsigned int protoff); 42 + s32 nf_ct_seq_offset(const struct nf_conn *ct, enum ip_conntrack_dir, u32 seq); 47 43 48 - extern int nf_conntrack_seqadj_init(void); 49 - extern void nf_conntrack_seqadj_fini(void); 44 + int nf_conntrack_seqadj_init(void); 45 + void nf_conntrack_seqadj_fini(void); 50 46 51 47 #endif /* _NF_CONNTRACK_SEQADJ_H */
+13 -15
include/net/netfilter/nf_conntrack_synproxy.h
··· 56 56 57 57 struct tcphdr; 58 58 struct xt_synproxy_info; 59 - extern void synproxy_parse_options(const struct sk_buff *skb, unsigned int doff, 60 - const struct tcphdr *th, 61 - struct synproxy_options *opts); 62 - extern unsigned int synproxy_options_size(const struct synproxy_options *opts); 63 - extern void synproxy_build_options(struct tcphdr *th, 64 - const struct synproxy_options *opts); 59 + void synproxy_parse_options(const struct sk_buff *skb, unsigned int doff, 60 + const struct tcphdr *th, 61 + struct synproxy_options *opts); 62 + unsigned int synproxy_options_size(const struct synproxy_options *opts); 63 + void synproxy_build_options(struct tcphdr *th, 64 + const struct synproxy_options *opts); 65 65 66 - extern void synproxy_init_timestamp_cookie(const struct xt_synproxy_info *info, 67 - struct synproxy_options *opts); 68 - extern void synproxy_check_timestamp_cookie(struct synproxy_options *opts); 66 + void synproxy_init_timestamp_cookie(const struct xt_synproxy_info *info, 67 + struct synproxy_options *opts); 68 + void synproxy_check_timestamp_cookie(struct synproxy_options *opts); 69 69 70 - extern unsigned int synproxy_tstamp_adjust(struct sk_buff *skb, 71 - unsigned int protoff, 72 - struct tcphdr *th, 73 - struct nf_conn *ct, 74 - enum ip_conntrack_info ctinfo, 75 - const struct nf_conn_synproxy *synproxy); 70 + unsigned int synproxy_tstamp_adjust(struct sk_buff *skb, unsigned int protoff, 71 + struct tcphdr *th, struct nf_conn *ct, 72 + enum ip_conntrack_info ctinfo, 73 + const struct nf_conn_synproxy *synproxy); 76 74 77 75 #endif /* _NF_CONNTRACK_SYNPROXY_H */
+2 -2
include/net/netfilter/nf_conntrack_timeout.h
··· 76 76 } 77 77 78 78 #ifdef CONFIG_NF_CONNTRACK_TIMEOUT 79 - extern int nf_conntrack_timeout_init(void); 80 - extern void nf_conntrack_timeout_fini(void); 79 + int nf_conntrack_timeout_init(void); 80 + void nf_conntrack_timeout_fini(void); 81 81 #else 82 82 static inline int nf_conntrack_timeout_init(void) 83 83 {
+4 -4
include/net/netfilter/nf_conntrack_timestamp.h
··· 48 48 } 49 49 50 50 #ifdef CONFIG_NF_CONNTRACK_TIMESTAMP 51 - extern int nf_conntrack_tstamp_pernet_init(struct net *net); 52 - extern void nf_conntrack_tstamp_pernet_fini(struct net *net); 51 + int nf_conntrack_tstamp_pernet_init(struct net *net); 52 + void nf_conntrack_tstamp_pernet_fini(struct net *net); 53 53 54 - extern int nf_conntrack_tstamp_init(void); 55 - extern void nf_conntrack_tstamp_fini(void); 54 + int nf_conntrack_tstamp_init(void); 55 + void nf_conntrack_tstamp_fini(void); 56 56 #else 57 57 static inline int nf_conntrack_tstamp_pernet_init(struct net *net) 58 58 {
+5 -5
include/net/netfilter/nf_nat.h
··· 41 41 }; 42 42 43 43 /* Set up the info structure to map into this range. */ 44 - extern unsigned int nf_nat_setup_info(struct nf_conn *ct, 45 - const struct nf_nat_range *range, 46 - enum nf_nat_manip_type maniptype); 44 + unsigned int nf_nat_setup_info(struct nf_conn *ct, 45 + const struct nf_nat_range *range, 46 + enum nf_nat_manip_type maniptype); 47 47 48 48 /* Is this tuple already taken? (not by us)*/ 49 - extern int nf_nat_used_tuple(const struct nf_conntrack_tuple *tuple, 50 - const struct nf_conn *ignored_conntrack); 49 + int nf_nat_used_tuple(const struct nf_conntrack_tuple *tuple, 50 + const struct nf_conn *ignored_conntrack); 51 51 52 52 static inline struct nf_conn_nat *nfct_nat(const struct nf_conn *ct) 53 53 {
+3 -5
include/net/netfilter/nf_nat_core.h
··· 7 7 /* This header used to share core functionality between the standalone 8 8 NAT module, and the compatibility layer's use of NAT for masquerading. */ 9 9 10 - extern unsigned int nf_nat_packet(struct nf_conn *ct, 11 - enum ip_conntrack_info ctinfo, 12 - unsigned int hooknum, 13 - struct sk_buff *skb); 10 + unsigned int nf_nat_packet(struct nf_conn *ct, enum ip_conntrack_info ctinfo, 11 + unsigned int hooknum, struct sk_buff *skb); 14 12 15 - extern int nf_xfrm_me_harder(struct sk_buff *skb, unsigned int family); 13 + int nf_xfrm_me_harder(struct sk_buff *skb, unsigned int family); 16 14 17 15 static inline int nf_nat_initialized(struct nf_conn *ct, 18 16 enum nf_nat_manip_type manip)
+11 -18
include/net/netfilter/nf_nat_helper.h
··· 7 7 struct sk_buff; 8 8 9 9 /* These return true or false. */ 10 - extern int __nf_nat_mangle_tcp_packet(struct sk_buff *skb, 11 - struct nf_conn *ct, 12 - enum ip_conntrack_info ctinfo, 13 - unsigned int protoff, 14 - unsigned int match_offset, 15 - unsigned int match_len, 16 - const char *rep_buffer, 17 - unsigned int rep_len, bool adjust); 10 + int __nf_nat_mangle_tcp_packet(struct sk_buff *skb, struct nf_conn *ct, 11 + enum ip_conntrack_info ctinfo, 12 + unsigned int protoff, unsigned int match_offset, 13 + unsigned int match_len, const char *rep_buffer, 14 + unsigned int rep_len, bool adjust); 18 15 19 16 static inline int nf_nat_mangle_tcp_packet(struct sk_buff *skb, 20 17 struct nf_conn *ct, ··· 27 30 rep_buffer, rep_len, true); 28 31 } 29 32 30 - extern int nf_nat_mangle_udp_packet(struct sk_buff *skb, 31 - struct nf_conn *ct, 32 - enum ip_conntrack_info ctinfo, 33 - unsigned int protoff, 34 - unsigned int match_offset, 35 - unsigned int match_len, 36 - const char *rep_buffer, 37 - unsigned int rep_len); 33 + int nf_nat_mangle_udp_packet(struct sk_buff *skb, struct nf_conn *ct, 34 + enum ip_conntrack_info ctinfo, 35 + unsigned int protoff, unsigned int match_offset, 36 + unsigned int match_len, const char *rep_buffer, 37 + unsigned int rep_len); 38 38 39 39 /* Setup NAT on this expected conntrack so it follows master, but goes 40 40 * to port ct->master->saved_proto. */ 41 - extern void nf_nat_follow_master(struct nf_conn *ct, 42 - struct nf_conntrack_expect *this); 41 + void nf_nat_follow_master(struct nf_conn *ct, struct nf_conntrack_expect *this); 43 42 44 43 #endif
+9 -12
include/net/netfilter/nf_nat_l3proto.h
··· 35 35 struct nf_nat_range *range); 36 36 }; 37 37 38 - extern int nf_nat_l3proto_register(const struct nf_nat_l3proto *); 39 - extern void nf_nat_l3proto_unregister(const struct nf_nat_l3proto *); 40 - extern const struct nf_nat_l3proto *__nf_nat_l3proto_find(u8 l3proto); 38 + int nf_nat_l3proto_register(const struct nf_nat_l3proto *); 39 + void nf_nat_l3proto_unregister(const struct nf_nat_l3proto *); 40 + const struct nf_nat_l3proto *__nf_nat_l3proto_find(u8 l3proto); 41 41 42 - extern int nf_nat_icmp_reply_translation(struct sk_buff *skb, 43 - struct nf_conn *ct, 44 - enum ip_conntrack_info ctinfo, 45 - unsigned int hooknum); 46 - extern int nf_nat_icmpv6_reply_translation(struct sk_buff *skb, 47 - struct nf_conn *ct, 48 - enum ip_conntrack_info ctinfo, 49 - unsigned int hooknum, 50 - unsigned int hdrlen); 42 + int nf_nat_icmp_reply_translation(struct sk_buff *skb, struct nf_conn *ct, 43 + enum ip_conntrack_info ctinfo, 44 + unsigned int hooknum); 45 + int nf_nat_icmpv6_reply_translation(struct sk_buff *skb, struct nf_conn *ct, 46 + enum ip_conntrack_info ctinfo, 47 + unsigned int hooknum, unsigned int hdrlen); 51 48 52 49 #endif /* _NF_NAT_L3PROTO_H */
+15 -15
include/net/netfilter/nf_nat_l4proto.h
··· 42 42 }; 43 43 44 44 /* Protocol registration. */ 45 - extern int nf_nat_l4proto_register(u8 l3proto, const struct nf_nat_l4proto *l4proto); 46 - extern void nf_nat_l4proto_unregister(u8 l3proto, const struct nf_nat_l4proto *l4proto); 45 + int nf_nat_l4proto_register(u8 l3proto, const struct nf_nat_l4proto *l4proto); 46 + void nf_nat_l4proto_unregister(u8 l3proto, 47 + const struct nf_nat_l4proto *l4proto); 47 48 48 - extern const struct nf_nat_l4proto *__nf_nat_l4proto_find(u8 l3proto, u8 l4proto); 49 + const struct nf_nat_l4proto *__nf_nat_l4proto_find(u8 l3proto, u8 l4proto); 49 50 50 51 /* Built-in protocols. */ 51 52 extern const struct nf_nat_l4proto nf_nat_l4proto_tcp; ··· 55 54 extern const struct nf_nat_l4proto nf_nat_l4proto_icmpv6; 56 55 extern const struct nf_nat_l4proto nf_nat_l4proto_unknown; 57 56 58 - extern bool nf_nat_l4proto_in_range(const struct nf_conntrack_tuple *tuple, 59 - enum nf_nat_manip_type maniptype, 60 - const union nf_conntrack_man_proto *min, 61 - const union nf_conntrack_man_proto *max); 57 + bool nf_nat_l4proto_in_range(const struct nf_conntrack_tuple *tuple, 58 + enum nf_nat_manip_type maniptype, 59 + const union nf_conntrack_man_proto *min, 60 + const union nf_conntrack_man_proto *max); 62 61 63 - extern void nf_nat_l4proto_unique_tuple(const struct nf_nat_l3proto *l3proto, 64 - struct nf_conntrack_tuple *tuple, 65 - const struct nf_nat_range *range, 66 - enum nf_nat_manip_type maniptype, 67 - const struct nf_conn *ct, 68 - u16 *rover); 62 + void nf_nat_l4proto_unique_tuple(const struct nf_nat_l3proto *l3proto, 63 + struct nf_conntrack_tuple *tuple, 64 + const struct nf_nat_range *range, 65 + enum nf_nat_manip_type maniptype, 66 + const struct nf_conn *ct, u16 *rover); 69 67 70 - extern int nf_nat_l4proto_nlattr_to_range(struct nlattr *tb[], 71 - struct nf_nat_range *range); 68 + int nf_nat_l4proto_nlattr_to_range(struct nlattr *tb[], 69 + struct nf_nat_range *range); 72 70 73 71 #endif /*_NF_NAT_L4PROTO_H*/
+1 -1
include/net/netfilter/nf_queue.h
··· 28 28 29 29 void nf_register_queue_handler(const struct nf_queue_handler *qh); 30 30 void nf_unregister_queue_handler(void); 31 - extern void nf_reinject(struct nf_queue_entry *entry, unsigned int verdict); 31 + void nf_reinject(struct nf_queue_entry *entry, unsigned int verdict); 32 32 33 33 bool nf_queue_entry_get_refs(struct nf_queue_entry *entry); 34 34 void nf_queue_entry_release_refs(struct nf_queue_entry *entry);
+2 -2
include/net/netfilter/xt_rateest.h
··· 16 16 struct rcu_head rcu; 17 17 }; 18 18 19 - extern struct xt_rateest *xt_rateest_lookup(const char *name); 20 - extern void xt_rateest_put(struct xt_rateest *est); 19 + struct xt_rateest *xt_rateest_lookup(const char *name); 20 + void xt_rateest_put(struct xt_rateest *est); 21 21 22 22 #endif /* _XT_RATEEST_H */