|
@@ -139,15 +139,13 @@ static inline struct net *nf_ct_net(const struct nf_conn *ct)
|
|
|
}
|
|
|
|
|
|
/* Alter reply tuple (maybe alter helper). */
|
|
|
-extern void
|
|
|
-nf_conntrack_alter_reply(struct nf_conn *ct,
|
|
|
- const struct nf_conntrack_tuple *newreply);
|
|
|
+void nf_conntrack_alter_reply(struct nf_conn *ct,
|
|
|
+ const struct nf_conntrack_tuple *newreply);
|
|
|
|
|
|
/* Is this tuple taken? (ignoring any belonging to the given
|
|
|
conntrack). */
|
|
|
-extern int
|
|
|
-nf_conntrack_tuple_taken(const struct nf_conntrack_tuple *tuple,
|
|
|
- const struct nf_conn *ignored_conntrack);
|
|
|
+int nf_conntrack_tuple_taken(const struct nf_conntrack_tuple *tuple,
|
|
|
+ const struct nf_conn *ignored_conntrack);
|
|
|
|
|
|
/* Return conntrack_info and tuple hash for given skb. */
|
|
|
static inline struct nf_conn *
|
|
@@ -165,37 +163,34 @@ static inline void nf_ct_put(struct nf_conn *ct)
|
|
|
}
|
|
|
|
|
|
/* Protocol module loading */
|
|
|
-extern int nf_ct_l3proto_try_module_get(unsigned short l3proto);
|
|
|
-extern void nf_ct_l3proto_module_put(unsigned short l3proto);
|
|
|
+int nf_ct_l3proto_try_module_get(unsigned short l3proto);
|
|
|
+void nf_ct_l3proto_module_put(unsigned short l3proto);
|
|
|
|
|
|
/*
|
|
|
* Allocate a hashtable of hlist_head (if nulls == 0),
|
|
|
* or hlist_nulls_head (if nulls == 1)
|
|
|
*/
|
|
|
-extern void *nf_ct_alloc_hashtable(unsigned int *sizep, int nulls);
|
|
|
+void *nf_ct_alloc_hashtable(unsigned int *sizep, int nulls);
|
|
|
|
|
|
-extern void nf_ct_free_hashtable(void *hash, unsigned int size);
|
|
|
+void nf_ct_free_hashtable(void *hash, unsigned int size);
|
|
|
|
|
|
-extern struct nf_conntrack_tuple_hash *
|
|
|
+struct nf_conntrack_tuple_hash *
|
|
|
__nf_conntrack_find(struct net *net, u16 zone,
|
|
|
const struct nf_conntrack_tuple *tuple);
|
|
|
|
|
|
-extern int nf_conntrack_hash_check_insert(struct nf_conn *ct);
|
|
|
+int nf_conntrack_hash_check_insert(struct nf_conn *ct);
|
|
|
bool nf_ct_delete(struct nf_conn *ct, u32 pid, int report);
|
|
|
|
|
|
-extern void nf_conntrack_flush_report(struct net *net, u32 portid, int report);
|
|
|
+void nf_conntrack_flush_report(struct net *net, u32 portid, int report);
|
|
|
|
|
|
-extern bool nf_ct_get_tuplepr(const struct sk_buff *skb,
|
|
|
- unsigned int nhoff, u_int16_t l3num,
|
|
|
- struct nf_conntrack_tuple *tuple);
|
|
|
-extern bool nf_ct_invert_tuplepr(struct nf_conntrack_tuple *inverse,
|
|
|
- const struct nf_conntrack_tuple *orig);
|
|
|
+bool nf_ct_get_tuplepr(const struct sk_buff *skb, unsigned int nhoff,
|
|
|
+ u_int16_t l3num, struct nf_conntrack_tuple *tuple);
|
|
|
+bool nf_ct_invert_tuplepr(struct nf_conntrack_tuple *inverse,
|
|
|
+ const struct nf_conntrack_tuple *orig);
|
|
|
|
|
|
-extern void __nf_ct_refresh_acct(struct nf_conn *ct,
|
|
|
- enum ip_conntrack_info ctinfo,
|
|
|
- const struct sk_buff *skb,
|
|
|
- unsigned long extra_jiffies,
|
|
|
- int do_acct);
|
|
|
+void __nf_ct_refresh_acct(struct nf_conn *ct, enum ip_conntrack_info ctinfo,
|
|
|
+ const struct sk_buff *skb,
|
|
|
+ unsigned long extra_jiffies, int do_acct);
|
|
|
|
|
|
/* Refresh conntrack for this many jiffies and do accounting */
|
|
|
static inline void nf_ct_refresh_acct(struct nf_conn *ct,
|
|
@@ -214,10 +209,8 @@ static inline void nf_ct_refresh(struct nf_conn *ct,
|
|
|
__nf_ct_refresh_acct(ct, 0, skb, extra_jiffies, 0);
|
|
|
}
|
|
|
|
|
|
-extern bool __nf_ct_kill_acct(struct nf_conn *ct,
|
|
|
- enum ip_conntrack_info ctinfo,
|
|
|
- const struct sk_buff *skb,
|
|
|
- int do_acct);
|
|
|
+bool __nf_ct_kill_acct(struct nf_conn *ct, enum ip_conntrack_info ctinfo,
|
|
|
+ const struct sk_buff *skb, int do_acct);
|
|
|
|
|
|
/* kill conntrack and do accounting */
|
|
|
static inline bool nf_ct_kill_acct(struct nf_conn *ct,
|
|
@@ -244,19 +237,17 @@ static inline struct nf_conn *nf_ct_untracked_get(void)
|
|
|
{
|
|
|
return &__raw_get_cpu_var(nf_conntrack_untracked);
|
|
|
}
|
|
|
-extern void nf_ct_untracked_status_or(unsigned long bits);
|
|
|
+void nf_ct_untracked_status_or(unsigned long bits);
|
|
|
|
|
|
/* Iterate over all conntracks: if iter returns true, it's deleted. */
|
|
|
-extern void
|
|
|
-nf_ct_iterate_cleanup(struct net *net,
|
|
|
- int (*iter)(struct nf_conn *i, void *data),
|
|
|
- void *data, u32 portid, int report);
|
|
|
-extern void nf_conntrack_free(struct nf_conn *ct);
|
|
|
-extern struct nf_conn *
|
|
|
-nf_conntrack_alloc(struct net *net, u16 zone,
|
|
|
- const struct nf_conntrack_tuple *orig,
|
|
|
- const struct nf_conntrack_tuple *repl,
|
|
|
- gfp_t gfp);
|
|
|
+void nf_ct_iterate_cleanup(struct net *net,
|
|
|
+ int (*iter)(struct nf_conn *i, void *data),
|
|
|
+ void *data, u32 portid, int report);
|
|
|
+void nf_conntrack_free(struct nf_conn *ct);
|
|
|
+struct nf_conn *nf_conntrack_alloc(struct net *net, u16 zone,
|
|
|
+ const struct nf_conntrack_tuple *orig,
|
|
|
+ const struct nf_conntrack_tuple *repl,
|
|
|
+ gfp_t gfp);
|
|
|
|
|
|
static inline int nf_ct_is_template(const struct nf_conn *ct)
|
|
|
{
|
|
@@ -287,7 +278,7 @@ static inline bool nf_is_loopback_packet(const struct sk_buff *skb)
|
|
|
|
|
|
struct kernel_param;
|
|
|
|
|
|
-extern int nf_conntrack_set_hashsize(const char *val, struct kernel_param *kp);
|
|
|
+int nf_conntrack_set_hashsize(const char *val, struct kernel_param *kp);
|
|
|
extern unsigned int nf_conntrack_htable_size;
|
|
|
extern unsigned int nf_conntrack_max;
|
|
|
extern unsigned int nf_conntrack_hash_rnd;
|