mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 07:10:50 +07:00
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>
This commit is contained in:
parent
0e418f94d3
commit
4e77be4637
@ -16,9 +16,9 @@ extern struct nf_conntrack_l4proto nf_conntrack_l4proto_tcp4;
|
||||
extern struct nf_conntrack_l4proto nf_conntrack_l4proto_udp4;
|
||||
extern struct nf_conntrack_l4proto nf_conntrack_l4proto_icmp;
|
||||
|
||||
extern int nf_conntrack_ipv4_compat_init(void);
|
||||
extern void nf_conntrack_ipv4_compat_fini(void);
|
||||
int nf_conntrack_ipv4_compat_init(void);
|
||||
void nf_conntrack_ipv4_compat_fini(void);
|
||||
|
||||
extern void need_ipv4_conntrack(void);
|
||||
void need_ipv4_conntrack(void);
|
||||
|
||||
#endif /*_NF_CONNTRACK_IPV4_H*/
|
||||
|
@ -1,6 +1,6 @@
|
||||
#ifndef _NF_DEFRAG_IPV4_H
|
||||
#define _NF_DEFRAG_IPV4_H
|
||||
|
||||
extern void nf_defrag_ipv4_enable(void);
|
||||
void nf_defrag_ipv4_enable(void);
|
||||
|
||||
#endif /* _NF_DEFRAG_IPV4_H */
|
||||
|
@ -1,14 +1,13 @@
|
||||
#ifndef _NF_DEFRAG_IPV6_H
|
||||
#define _NF_DEFRAG_IPV6_H
|
||||
|
||||
extern void nf_defrag_ipv6_enable(void);
|
||||
void nf_defrag_ipv6_enable(void);
|
||||
|
||||
extern int nf_ct_frag6_init(void);
|
||||
extern void nf_ct_frag6_cleanup(void);
|
||||
extern struct sk_buff *nf_ct_frag6_gather(struct sk_buff *skb, u32 user);
|
||||
extern void nf_ct_frag6_output(unsigned int hooknum, struct sk_buff *skb,
|
||||
struct net_device *in,
|
||||
struct net_device *out,
|
||||
int nf_ct_frag6_init(void);
|
||||
void nf_ct_frag6_cleanup(void);
|
||||
struct sk_buff *nf_ct_frag6_gather(struct sk_buff *skb, u32 user);
|
||||
void nf_ct_frag6_output(unsigned int hooknum, struct sk_buff *skb,
|
||||
struct net_device *in, struct net_device *out,
|
||||
int (*okfn)(struct sk_buff *));
|
||||
|
||||
struct inet_frags_ctl;
|
||||
|
@ -139,14 +139,12 @@ 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,
|
||||
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,
|
||||
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. */
|
||||
@ -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,
|
||||
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,
|
||||
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);
|
||||
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,16 +237,14 @@ 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,
|
||||
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,
|
||||
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);
|
||||
@ -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;
|
||||
|
@ -42,8 +42,8 @@ struct nf_conn_counter *nf_ct_acct_ext_add(struct nf_conn *ct, gfp_t gfp)
|
||||
return acct;
|
||||
};
|
||||
|
||||
extern unsigned int
|
||||
seq_print_acct(struct seq_file *s, const struct nf_conn *ct, int dir);
|
||||
unsigned int seq_print_acct(struct seq_file *s, const struct nf_conn *ct,
|
||||
int dir);
|
||||
|
||||
/* Check if connection tracking accounting is enabled */
|
||||
static inline bool nf_ct_acct_enabled(struct net *net)
|
||||
@ -57,9 +57,9 @@ static inline void nf_ct_set_acct(struct net *net, bool enable)
|
||||
net->ct.sysctl_acct = enable;
|
||||
}
|
||||
|
||||
extern int nf_conntrack_acct_pernet_init(struct net *net);
|
||||
extern void nf_conntrack_acct_pernet_fini(struct net *net);
|
||||
int nf_conntrack_acct_pernet_init(struct net *net);
|
||||
void nf_conntrack_acct_pernet_fini(struct net *net);
|
||||
|
||||
extern int nf_conntrack_acct_init(void);
|
||||
extern void nf_conntrack_acct_fini(void);
|
||||
int nf_conntrack_acct_init(void);
|
||||
void nf_conntrack_acct_fini(void);
|
||||
#endif /* _NF_CONNTRACK_ACCT_H */
|
||||
|
@ -20,49 +20,42 @@
|
||||
/* This header is used to share core functionality between the
|
||||
standalone connection tracking module, and the compatibility layer's use
|
||||
of connection tracking. */
|
||||
extern unsigned int nf_conntrack_in(struct net *net,
|
||||
u_int8_t pf,
|
||||
unsigned int hooknum,
|
||||
unsigned int nf_conntrack_in(struct net *net, u_int8_t pf, unsigned int hooknum,
|
||||
struct sk_buff *skb);
|
||||
|
||||
extern int nf_conntrack_init_net(struct net *net);
|
||||
extern void nf_conntrack_cleanup_net(struct net *net);
|
||||
extern void nf_conntrack_cleanup_net_list(struct list_head *net_exit_list);
|
||||
int nf_conntrack_init_net(struct net *net);
|
||||
void nf_conntrack_cleanup_net(struct net *net);
|
||||
void nf_conntrack_cleanup_net_list(struct list_head *net_exit_list);
|
||||
|
||||
extern int nf_conntrack_proto_pernet_init(struct net *net);
|
||||
extern void nf_conntrack_proto_pernet_fini(struct net *net);
|
||||
int nf_conntrack_proto_pernet_init(struct net *net);
|
||||
void nf_conntrack_proto_pernet_fini(struct net *net);
|
||||
|
||||
extern int nf_conntrack_proto_init(void);
|
||||
extern void nf_conntrack_proto_fini(void);
|
||||
int nf_conntrack_proto_init(void);
|
||||
void nf_conntrack_proto_fini(void);
|
||||
|
||||
extern int nf_conntrack_init_start(void);
|
||||
extern void nf_conntrack_cleanup_start(void);
|
||||
int nf_conntrack_init_start(void);
|
||||
void nf_conntrack_cleanup_start(void);
|
||||
|
||||
extern void nf_conntrack_init_end(void);
|
||||
extern void nf_conntrack_cleanup_end(void);
|
||||
void nf_conntrack_init_end(void);
|
||||
void nf_conntrack_cleanup_end(void);
|
||||
|
||||
extern bool
|
||||
nf_ct_get_tuple(const struct sk_buff *skb,
|
||||
unsigned int nhoff,
|
||||
unsigned int dataoff,
|
||||
u_int16_t l3num,
|
||||
u_int8_t protonum,
|
||||
bool nf_ct_get_tuple(const struct sk_buff *skb, unsigned int nhoff,
|
||||
unsigned int dataoff, u_int16_t l3num, u_int8_t protonum,
|
||||
struct nf_conntrack_tuple *tuple,
|
||||
const struct nf_conntrack_l3proto *l3proto,
|
||||
const struct nf_conntrack_l4proto *l4proto);
|
||||
|
||||
extern bool
|
||||
nf_ct_invert_tuple(struct nf_conntrack_tuple *inverse,
|
||||
bool nf_ct_invert_tuple(struct nf_conntrack_tuple *inverse,
|
||||
const struct nf_conntrack_tuple *orig,
|
||||
const struct nf_conntrack_l3proto *l3proto,
|
||||
const struct nf_conntrack_l4proto *l4proto);
|
||||
|
||||
/* Find a connection corresponding to a tuple. */
|
||||
extern struct nf_conntrack_tuple_hash *
|
||||
struct nf_conntrack_tuple_hash *
|
||||
nf_conntrack_find_get(struct net *net, u16 zone,
|
||||
const struct nf_conntrack_tuple *tuple);
|
||||
|
||||
extern int __nf_conntrack_confirm(struct sk_buff *skb);
|
||||
int __nf_conntrack_confirm(struct sk_buff *skb);
|
||||
|
||||
/* Confirm a connection: returns NF_DROP if packet must be dropped. */
|
||||
static inline int nf_conntrack_confirm(struct sk_buff *skb)
|
||||
|
@ -68,10 +68,12 @@ struct nf_ct_event_notifier {
|
||||
int (*fcn)(unsigned int events, struct nf_ct_event *item);
|
||||
};
|
||||
|
||||
extern int nf_conntrack_register_notifier(struct net *net, struct nf_ct_event_notifier *nb);
|
||||
extern void nf_conntrack_unregister_notifier(struct net *net, struct nf_ct_event_notifier *nb);
|
||||
int nf_conntrack_register_notifier(struct net *net,
|
||||
struct nf_ct_event_notifier *nb);
|
||||
void nf_conntrack_unregister_notifier(struct net *net,
|
||||
struct nf_ct_event_notifier *nb);
|
||||
|
||||
extern void nf_ct_deliver_cached_events(struct nf_conn *ct);
|
||||
void nf_ct_deliver_cached_events(struct nf_conn *ct);
|
||||
|
||||
static inline void
|
||||
nf_conntrack_event_cache(enum ip_conntrack_events event, struct nf_conn *ct)
|
||||
@ -166,8 +168,10 @@ struct nf_exp_event_notifier {
|
||||
int (*fcn)(unsigned int events, struct nf_exp_event *item);
|
||||
};
|
||||
|
||||
extern int nf_ct_expect_register_notifier(struct net *net, struct nf_exp_event_notifier *nb);
|
||||
extern void nf_ct_expect_unregister_notifier(struct net *net, struct nf_exp_event_notifier *nb);
|
||||
int nf_ct_expect_register_notifier(struct net *net,
|
||||
struct nf_exp_event_notifier *nb);
|
||||
void nf_ct_expect_unregister_notifier(struct net *net,
|
||||
struct nf_exp_event_notifier *nb);
|
||||
|
||||
static inline void
|
||||
nf_ct_expect_event_report(enum ip_conntrack_expect_events event,
|
||||
@ -207,11 +211,11 @@ nf_ct_expect_event(enum ip_conntrack_expect_events event,
|
||||
nf_ct_expect_event_report(event, exp, 0, 0);
|
||||
}
|
||||
|
||||
extern int nf_conntrack_ecache_pernet_init(struct net *net);
|
||||
extern void nf_conntrack_ecache_pernet_fini(struct net *net);
|
||||
int nf_conntrack_ecache_pernet_init(struct net *net);
|
||||
void nf_conntrack_ecache_pernet_fini(struct net *net);
|
||||
|
||||
extern int nf_conntrack_ecache_init(void);
|
||||
extern void nf_conntrack_ecache_fini(void);
|
||||
int nf_conntrack_ecache_init(void);
|
||||
void nf_conntrack_ecache_fini(void);
|
||||
#else /* CONFIG_NF_CONNTRACK_EVENTS */
|
||||
|
||||
static inline void nf_conntrack_event_cache(enum ip_conntrack_events event,
|
||||
|
@ -73,7 +73,7 @@ static inline void *__nf_ct_ext_find(const struct nf_conn *ct, u8 id)
|
||||
((id##_TYPE *)__nf_ct_ext_find((ext), (id)))
|
||||
|
||||
/* Destroy all relationships */
|
||||
extern void __nf_ct_ext_destroy(struct nf_conn *ct);
|
||||
void __nf_ct_ext_destroy(struct nf_conn *ct);
|
||||
static inline void nf_ct_ext_destroy(struct nf_conn *ct)
|
||||
{
|
||||
if (ct->ext)
|
||||
|
@ -52,21 +52,24 @@ struct nf_conntrack_helper {
|
||||
unsigned int queue_num; /* For user-space helpers. */
|
||||
};
|
||||
|
||||
extern struct nf_conntrack_helper *
|
||||
__nf_conntrack_helper_find(const char *name, u16 l3num, u8 protonum);
|
||||
struct nf_conntrack_helper *__nf_conntrack_helper_find(const char *name,
|
||||
u16 l3num, u8 protonum);
|
||||
|
||||
extern struct nf_conntrack_helper *
|
||||
nf_conntrack_helper_try_module_get(const char *name, u16 l3num, u8 protonum);
|
||||
struct nf_conntrack_helper *nf_conntrack_helper_try_module_get(const char *name,
|
||||
u16 l3num,
|
||||
u8 protonum);
|
||||
|
||||
extern int nf_conntrack_helper_register(struct nf_conntrack_helper *);
|
||||
extern void nf_conntrack_helper_unregister(struct nf_conntrack_helper *);
|
||||
int nf_conntrack_helper_register(struct nf_conntrack_helper *);
|
||||
void nf_conntrack_helper_unregister(struct nf_conntrack_helper *);
|
||||
|
||||
extern struct nf_conn_help *nf_ct_helper_ext_add(struct nf_conn *ct, struct nf_conntrack_helper *helper, gfp_t gfp);
|
||||
struct nf_conn_help *nf_ct_helper_ext_add(struct nf_conn *ct,
|
||||
struct nf_conntrack_helper *helper,
|
||||
gfp_t gfp);
|
||||
|
||||
extern int __nf_ct_try_assign_helper(struct nf_conn *ct, struct nf_conn *tmpl,
|
||||
int __nf_ct_try_assign_helper(struct nf_conn *ct, struct nf_conn *tmpl,
|
||||
gfp_t flags);
|
||||
|
||||
extern void nf_ct_helper_destroy(struct nf_conn *ct);
|
||||
void nf_ct_helper_destroy(struct nf_conn *ct);
|
||||
|
||||
static inline struct nf_conn_help *nfct_help(const struct nf_conn *ct)
|
||||
{
|
||||
@ -82,14 +85,13 @@ static inline void *nfct_help_data(const struct nf_conn *ct)
|
||||
return (void *)help->data;
|
||||
}
|
||||
|
||||
extern int nf_conntrack_helper_pernet_init(struct net *net);
|
||||
extern void nf_conntrack_helper_pernet_fini(struct net *net);
|
||||
int nf_conntrack_helper_pernet_init(struct net *net);
|
||||
void nf_conntrack_helper_pernet_fini(struct net *net);
|
||||
|
||||
extern int nf_conntrack_helper_init(void);
|
||||
extern void nf_conntrack_helper_fini(void);
|
||||
int nf_conntrack_helper_init(void);
|
||||
void nf_conntrack_helper_fini(void);
|
||||
|
||||
extern int nf_conntrack_broadcast_help(struct sk_buff *skb,
|
||||
unsigned int protoff,
|
||||
int nf_conntrack_broadcast_help(struct sk_buff *skb, unsigned int protoff,
|
||||
struct nf_conn *ct,
|
||||
enum ip_conntrack_info ctinfo,
|
||||
unsigned int timeout);
|
||||
|
@ -77,17 +77,17 @@ struct nf_conntrack_l3proto {
|
||||
extern struct nf_conntrack_l3proto __rcu *nf_ct_l3protos[AF_MAX];
|
||||
|
||||
/* Protocol pernet registration. */
|
||||
extern int nf_ct_l3proto_pernet_register(struct net *net,
|
||||
int nf_ct_l3proto_pernet_register(struct net *net,
|
||||
struct nf_conntrack_l3proto *proto);
|
||||
extern void nf_ct_l3proto_pernet_unregister(struct net *net,
|
||||
void nf_ct_l3proto_pernet_unregister(struct net *net,
|
||||
struct nf_conntrack_l3proto *proto);
|
||||
|
||||
/* Protocol global registration. */
|
||||
extern int nf_ct_l3proto_register(struct nf_conntrack_l3proto *proto);
|
||||
extern void nf_ct_l3proto_unregister(struct nf_conntrack_l3proto *proto);
|
||||
int nf_ct_l3proto_register(struct nf_conntrack_l3proto *proto);
|
||||
void nf_ct_l3proto_unregister(struct nf_conntrack_l3proto *proto);
|
||||
|
||||
extern struct nf_conntrack_l3proto *nf_ct_l3proto_find_get(u_int16_t l3proto);
|
||||
extern void nf_ct_l3proto_put(struct nf_conntrack_l3proto *p);
|
||||
struct nf_conntrack_l3proto *nf_ct_l3proto_find_get(u_int16_t l3proto);
|
||||
void nf_ct_l3proto_put(struct nf_conntrack_l3proto *p);
|
||||
|
||||
/* Existing built-in protocols */
|
||||
extern struct nf_conntrack_l3proto nf_conntrack_l3proto_generic;
|
||||
|
@ -114,22 +114,22 @@ extern struct nf_conntrack_l4proto nf_conntrack_l4proto_generic;
|
||||
|
||||
#define MAX_NF_CT_PROTO 256
|
||||
|
||||
extern struct nf_conntrack_l4proto *
|
||||
__nf_ct_l4proto_find(u_int16_t l3proto, u_int8_t l4proto);
|
||||
struct nf_conntrack_l4proto *__nf_ct_l4proto_find(u_int16_t l3proto,
|
||||
u_int8_t l4proto);
|
||||
|
||||
extern struct nf_conntrack_l4proto *
|
||||
nf_ct_l4proto_find_get(u_int16_t l3proto, u_int8_t l4proto);
|
||||
extern void nf_ct_l4proto_put(struct nf_conntrack_l4proto *p);
|
||||
struct nf_conntrack_l4proto *nf_ct_l4proto_find_get(u_int16_t l3proto,
|
||||
u_int8_t l4proto);
|
||||
void nf_ct_l4proto_put(struct nf_conntrack_l4proto *p);
|
||||
|
||||
/* Protocol pernet registration. */
|
||||
extern int nf_ct_l4proto_pernet_register(struct net *net,
|
||||
int nf_ct_l4proto_pernet_register(struct net *net,
|
||||
struct nf_conntrack_l4proto *proto);
|
||||
extern void nf_ct_l4proto_pernet_unregister(struct net *net,
|
||||
void nf_ct_l4proto_pernet_unregister(struct net *net,
|
||||
struct nf_conntrack_l4proto *proto);
|
||||
|
||||
/* Protocol global registration. */
|
||||
extern int nf_ct_l4proto_register(struct nf_conntrack_l4proto *proto);
|
||||
extern void nf_ct_l4proto_unregister(struct nf_conntrack_l4proto *proto);
|
||||
int nf_ct_l4proto_register(struct nf_conntrack_l4proto *proto);
|
||||
void nf_ct_l4proto_unregister(struct nf_conntrack_l4proto *proto);
|
||||
|
||||
static inline void nf_ct_kfree_compat_sysctl_table(struct nf_proto_net *pn)
|
||||
{
|
||||
@ -140,11 +140,11 @@ static inline void nf_ct_kfree_compat_sysctl_table(struct nf_proto_net *pn)
|
||||
}
|
||||
|
||||
/* Generic netlink helpers */
|
||||
extern int nf_ct_port_tuple_to_nlattr(struct sk_buff *skb,
|
||||
int nf_ct_port_tuple_to_nlattr(struct sk_buff *skb,
|
||||
const struct nf_conntrack_tuple *tuple);
|
||||
extern int nf_ct_port_nlattr_to_tuple(struct nlattr *tb[],
|
||||
int nf_ct_port_nlattr_to_tuple(struct nlattr *tb[],
|
||||
struct nf_conntrack_tuple *t);
|
||||
extern int nf_ct_port_nlattr_tuple_size(void);
|
||||
int nf_ct_port_nlattr_tuple_size(void);
|
||||
extern const struct nla_policy nf_ct_port_nla_policy[];
|
||||
|
||||
#ifdef CONFIG_SYSCTL
|
||||
|
@ -30,22 +30,18 @@ static inline struct nf_conn_seqadj *nfct_seqadj_ext_add(struct nf_conn *ct)
|
||||
return nf_ct_ext_add(ct, NF_CT_EXT_SEQADJ, GFP_ATOMIC);
|
||||
}
|
||||
|
||||
extern int nf_ct_seqadj_init(struct nf_conn *ct, enum ip_conntrack_info ctinfo,
|
||||
int nf_ct_seqadj_init(struct nf_conn *ct, enum ip_conntrack_info ctinfo,
|
||||
s32 off);
|
||||
extern int nf_ct_seqadj_set(struct nf_conn *ct, enum ip_conntrack_info ctinfo,
|
||||
int nf_ct_seqadj_set(struct nf_conn *ct, enum ip_conntrack_info ctinfo,
|
||||
__be32 seq, s32 off);
|
||||
extern void nf_ct_tcp_seqadj_set(struct sk_buff *skb,
|
||||
struct nf_conn *ct,
|
||||
enum ip_conntrack_info ctinfo,
|
||||
s32 off);
|
||||
void nf_ct_tcp_seqadj_set(struct sk_buff *skb, struct nf_conn *ct,
|
||||
enum ip_conntrack_info ctinfo, s32 off);
|
||||
|
||||
extern int nf_ct_seq_adjust(struct sk_buff *skb,
|
||||
struct nf_conn *ct, enum ip_conntrack_info ctinfo,
|
||||
unsigned int protoff);
|
||||
extern s32 nf_ct_seq_offset(const struct nf_conn *ct, enum ip_conntrack_dir,
|
||||
u32 seq);
|
||||
int nf_ct_seq_adjust(struct sk_buff *skb, struct nf_conn *ct,
|
||||
enum ip_conntrack_info ctinfo, unsigned int protoff);
|
||||
s32 nf_ct_seq_offset(const struct nf_conn *ct, enum ip_conntrack_dir, u32 seq);
|
||||
|
||||
extern int nf_conntrack_seqadj_init(void);
|
||||
extern void nf_conntrack_seqadj_fini(void);
|
||||
int nf_conntrack_seqadj_init(void);
|
||||
void nf_conntrack_seqadj_fini(void);
|
||||
|
||||
#endif /* _NF_CONNTRACK_SEQADJ_H */
|
||||
|
@ -56,21 +56,19 @@ struct synproxy_options {
|
||||
|
||||
struct tcphdr;
|
||||
struct xt_synproxy_info;
|
||||
extern void synproxy_parse_options(const struct sk_buff *skb, unsigned int doff,
|
||||
void synproxy_parse_options(const struct sk_buff *skb, unsigned int doff,
|
||||
const struct tcphdr *th,
|
||||
struct synproxy_options *opts);
|
||||
extern unsigned int synproxy_options_size(const struct synproxy_options *opts);
|
||||
extern void synproxy_build_options(struct tcphdr *th,
|
||||
unsigned int synproxy_options_size(const struct synproxy_options *opts);
|
||||
void synproxy_build_options(struct tcphdr *th,
|
||||
const struct synproxy_options *opts);
|
||||
|
||||
extern void synproxy_init_timestamp_cookie(const struct xt_synproxy_info *info,
|
||||
void synproxy_init_timestamp_cookie(const struct xt_synproxy_info *info,
|
||||
struct synproxy_options *opts);
|
||||
extern void synproxy_check_timestamp_cookie(struct synproxy_options *opts);
|
||||
void synproxy_check_timestamp_cookie(struct synproxy_options *opts);
|
||||
|
||||
extern unsigned int synproxy_tstamp_adjust(struct sk_buff *skb,
|
||||
unsigned int protoff,
|
||||
struct tcphdr *th,
|
||||
struct nf_conn *ct,
|
||||
unsigned int synproxy_tstamp_adjust(struct sk_buff *skb, unsigned int protoff,
|
||||
struct tcphdr *th, struct nf_conn *ct,
|
||||
enum ip_conntrack_info ctinfo,
|
||||
const struct nf_conn_synproxy *synproxy);
|
||||
|
||||
|
@ -76,8 +76,8 @@ nf_ct_timeout_lookup(struct net *net, struct nf_conn *ct,
|
||||
}
|
||||
|
||||
#ifdef CONFIG_NF_CONNTRACK_TIMEOUT
|
||||
extern int nf_conntrack_timeout_init(void);
|
||||
extern void nf_conntrack_timeout_fini(void);
|
||||
int nf_conntrack_timeout_init(void);
|
||||
void nf_conntrack_timeout_fini(void);
|
||||
#else
|
||||
static inline int nf_conntrack_timeout_init(void)
|
||||
{
|
||||
|
@ -48,11 +48,11 @@ static inline void nf_ct_set_tstamp(struct net *net, bool enable)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_NF_CONNTRACK_TIMESTAMP
|
||||
extern int nf_conntrack_tstamp_pernet_init(struct net *net);
|
||||
extern void nf_conntrack_tstamp_pernet_fini(struct net *net);
|
||||
int nf_conntrack_tstamp_pernet_init(struct net *net);
|
||||
void nf_conntrack_tstamp_pernet_fini(struct net *net);
|
||||
|
||||
extern int nf_conntrack_tstamp_init(void);
|
||||
extern void nf_conntrack_tstamp_fini(void);
|
||||
int nf_conntrack_tstamp_init(void);
|
||||
void nf_conntrack_tstamp_fini(void);
|
||||
#else
|
||||
static inline int nf_conntrack_tstamp_pernet_init(struct net *net)
|
||||
{
|
||||
|
@ -41,12 +41,12 @@ struct nf_conn_nat {
|
||||
};
|
||||
|
||||
/* Set up the info structure to map into this range. */
|
||||
extern unsigned int nf_nat_setup_info(struct nf_conn *ct,
|
||||
unsigned int nf_nat_setup_info(struct nf_conn *ct,
|
||||
const struct nf_nat_range *range,
|
||||
enum nf_nat_manip_type maniptype);
|
||||
|
||||
/* Is this tuple already taken? (not by us)*/
|
||||
extern int nf_nat_used_tuple(const struct nf_conntrack_tuple *tuple,
|
||||
int nf_nat_used_tuple(const struct nf_conntrack_tuple *tuple,
|
||||
const struct nf_conn *ignored_conntrack);
|
||||
|
||||
static inline struct nf_conn_nat *nfct_nat(const struct nf_conn *ct)
|
||||
|
@ -7,12 +7,10 @@
|
||||
/* This header used to share core functionality between the standalone
|
||||
NAT module, and the compatibility layer's use of NAT for masquerading. */
|
||||
|
||||
extern unsigned int nf_nat_packet(struct nf_conn *ct,
|
||||
enum ip_conntrack_info ctinfo,
|
||||
unsigned int hooknum,
|
||||
struct sk_buff *skb);
|
||||
unsigned int nf_nat_packet(struct nf_conn *ct, enum ip_conntrack_info ctinfo,
|
||||
unsigned int hooknum, struct sk_buff *skb);
|
||||
|
||||
extern int nf_xfrm_me_harder(struct sk_buff *skb, unsigned int family);
|
||||
int nf_xfrm_me_harder(struct sk_buff *skb, unsigned int family);
|
||||
|
||||
static inline int nf_nat_initialized(struct nf_conn *ct,
|
||||
enum nf_nat_manip_type manip)
|
||||
|
@ -7,13 +7,10 @@
|
||||
struct sk_buff;
|
||||
|
||||
/* These return true or false. */
|
||||
extern int __nf_nat_mangle_tcp_packet(struct sk_buff *skb,
|
||||
struct nf_conn *ct,
|
||||
int __nf_nat_mangle_tcp_packet(struct sk_buff *skb, struct nf_conn *ct,
|
||||
enum ip_conntrack_info ctinfo,
|
||||
unsigned int protoff,
|
||||
unsigned int match_offset,
|
||||
unsigned int match_len,
|
||||
const char *rep_buffer,
|
||||
unsigned int protoff, unsigned int match_offset,
|
||||
unsigned int match_len, const char *rep_buffer,
|
||||
unsigned int rep_len, bool adjust);
|
||||
|
||||
static inline int nf_nat_mangle_tcp_packet(struct sk_buff *skb,
|
||||
@ -30,18 +27,14 @@ static inline int nf_nat_mangle_tcp_packet(struct sk_buff *skb,
|
||||
rep_buffer, rep_len, true);
|
||||
}
|
||||
|
||||
extern int nf_nat_mangle_udp_packet(struct sk_buff *skb,
|
||||
struct nf_conn *ct,
|
||||
int nf_nat_mangle_udp_packet(struct sk_buff *skb, struct nf_conn *ct,
|
||||
enum ip_conntrack_info ctinfo,
|
||||
unsigned int protoff,
|
||||
unsigned int match_offset,
|
||||
unsigned int match_len,
|
||||
const char *rep_buffer,
|
||||
unsigned int protoff, unsigned int match_offset,
|
||||
unsigned int match_len, const char *rep_buffer,
|
||||
unsigned int rep_len);
|
||||
|
||||
/* Setup NAT on this expected conntrack so it follows master, but goes
|
||||
* to port ct->master->saved_proto. */
|
||||
extern void nf_nat_follow_master(struct nf_conn *ct,
|
||||
struct nf_conntrack_expect *this);
|
||||
void nf_nat_follow_master(struct nf_conn *ct, struct nf_conntrack_expect *this);
|
||||
|
||||
#endif
|
||||
|
@ -35,18 +35,15 @@ struct nf_nat_l3proto {
|
||||
struct nf_nat_range *range);
|
||||
};
|
||||
|
||||
extern int nf_nat_l3proto_register(const struct nf_nat_l3proto *);
|
||||
extern void nf_nat_l3proto_unregister(const struct nf_nat_l3proto *);
|
||||
extern const struct nf_nat_l3proto *__nf_nat_l3proto_find(u8 l3proto);
|
||||
int nf_nat_l3proto_register(const struct nf_nat_l3proto *);
|
||||
void nf_nat_l3proto_unregister(const struct nf_nat_l3proto *);
|
||||
const struct nf_nat_l3proto *__nf_nat_l3proto_find(u8 l3proto);
|
||||
|
||||
extern int nf_nat_icmp_reply_translation(struct sk_buff *skb,
|
||||
struct nf_conn *ct,
|
||||
int nf_nat_icmp_reply_translation(struct sk_buff *skb, struct nf_conn *ct,
|
||||
enum ip_conntrack_info ctinfo,
|
||||
unsigned int hooknum);
|
||||
extern int nf_nat_icmpv6_reply_translation(struct sk_buff *skb,
|
||||
struct nf_conn *ct,
|
||||
int nf_nat_icmpv6_reply_translation(struct sk_buff *skb, struct nf_conn *ct,
|
||||
enum ip_conntrack_info ctinfo,
|
||||
unsigned int hooknum,
|
||||
unsigned int hdrlen);
|
||||
unsigned int hooknum, unsigned int hdrlen);
|
||||
|
||||
#endif /* _NF_NAT_L3PROTO_H */
|
||||
|
@ -42,10 +42,11 @@ struct nf_nat_l4proto {
|
||||
};
|
||||
|
||||
/* Protocol registration. */
|
||||
extern int nf_nat_l4proto_register(u8 l3proto, const struct nf_nat_l4proto *l4proto);
|
||||
extern void nf_nat_l4proto_unregister(u8 l3proto, const struct nf_nat_l4proto *l4proto);
|
||||
int nf_nat_l4proto_register(u8 l3proto, const struct nf_nat_l4proto *l4proto);
|
||||
void nf_nat_l4proto_unregister(u8 l3proto,
|
||||
const struct nf_nat_l4proto *l4proto);
|
||||
|
||||
extern const struct nf_nat_l4proto *__nf_nat_l4proto_find(u8 l3proto, u8 l4proto);
|
||||
const struct nf_nat_l4proto *__nf_nat_l4proto_find(u8 l3proto, u8 l4proto);
|
||||
|
||||
/* Built-in protocols. */
|
||||
extern const struct nf_nat_l4proto nf_nat_l4proto_tcp;
|
||||
@ -54,19 +55,18 @@ extern const struct nf_nat_l4proto nf_nat_l4proto_icmp;
|
||||
extern const struct nf_nat_l4proto nf_nat_l4proto_icmpv6;
|
||||
extern const struct nf_nat_l4proto nf_nat_l4proto_unknown;
|
||||
|
||||
extern bool nf_nat_l4proto_in_range(const struct nf_conntrack_tuple *tuple,
|
||||
bool nf_nat_l4proto_in_range(const struct nf_conntrack_tuple *tuple,
|
||||
enum nf_nat_manip_type maniptype,
|
||||
const union nf_conntrack_man_proto *min,
|
||||
const union nf_conntrack_man_proto *max);
|
||||
|
||||
extern void nf_nat_l4proto_unique_tuple(const struct nf_nat_l3proto *l3proto,
|
||||
void nf_nat_l4proto_unique_tuple(const struct nf_nat_l3proto *l3proto,
|
||||
struct nf_conntrack_tuple *tuple,
|
||||
const struct nf_nat_range *range,
|
||||
enum nf_nat_manip_type maniptype,
|
||||
const struct nf_conn *ct,
|
||||
u16 *rover);
|
||||
const struct nf_conn *ct, u16 *rover);
|
||||
|
||||
extern int nf_nat_l4proto_nlattr_to_range(struct nlattr *tb[],
|
||||
int nf_nat_l4proto_nlattr_to_range(struct nlattr *tb[],
|
||||
struct nf_nat_range *range);
|
||||
|
||||
#endif /*_NF_NAT_L4PROTO_H*/
|
||||
|
@ -28,7 +28,7 @@ struct nf_queue_handler {
|
||||
|
||||
void nf_register_queue_handler(const struct nf_queue_handler *qh);
|
||||
void nf_unregister_queue_handler(void);
|
||||
extern void nf_reinject(struct nf_queue_entry *entry, unsigned int verdict);
|
||||
void nf_reinject(struct nf_queue_entry *entry, unsigned int verdict);
|
||||
|
||||
bool nf_queue_entry_get_refs(struct nf_queue_entry *entry);
|
||||
void nf_queue_entry_release_refs(struct nf_queue_entry *entry);
|
||||
|
@ -16,7 +16,7 @@ struct xt_rateest {
|
||||
struct rcu_head rcu;
|
||||
};
|
||||
|
||||
extern struct xt_rateest *xt_rateest_lookup(const char *name);
|
||||
extern void xt_rateest_put(struct xt_rateest *est);
|
||||
struct xt_rateest *xt_rateest_lookup(const char *name);
|
||||
void xt_rateest_put(struct xt_rateest *est);
|
||||
|
||||
#endif /* _XT_RATEEST_H */
|
||||
|
Loading…
Reference in New Issue
Block a user