netfilter: Use unsigned types for hooknum and pf vars
and (try to) consistently use u_int8_t for the L3 family. Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: Patrick McHardy <kaber@trash.net>
This commit is contained in:
committed by
Patrick McHardy
parent
be713a443e
commit
76108cea06
@@ -20,7 +20,7 @@
|
||||
/* 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(int pf,
|
||||
extern unsigned int nf_conntrack_in(u_int8_t pf,
|
||||
unsigned int hooknum,
|
||||
struct sk_buff *skb);
|
||||
|
||||
|
@@ -86,7 +86,7 @@ void nf_ct_unexpect_related(struct nf_conntrack_expect *exp);
|
||||
/* Allocate space for an expectation: this is mandatory before calling
|
||||
nf_ct_expect_related. You will have to call put afterwards. */
|
||||
struct nf_conntrack_expect *nf_ct_expect_alloc(struct nf_conn *me);
|
||||
void nf_ct_expect_init(struct nf_conntrack_expect *, unsigned int, int,
|
||||
void nf_ct_expect_init(struct nf_conntrack_expect *, unsigned int, u_int8_t,
|
||||
const union nf_inet_addr *,
|
||||
const union nf_inet_addr *,
|
||||
u_int8_t, const __be16 *, const __be16 *);
|
||||
|
@@ -39,7 +39,7 @@ struct nf_conntrack_l4proto
|
||||
const struct sk_buff *skb,
|
||||
unsigned int dataoff,
|
||||
enum ip_conntrack_info ctinfo,
|
||||
int pf,
|
||||
u_int8_t pf,
|
||||
unsigned int hooknum);
|
||||
|
||||
/* Called when a new connection for this protocol found;
|
||||
@@ -52,7 +52,7 @@ struct nf_conntrack_l4proto
|
||||
|
||||
int (*error)(struct sk_buff *skb, unsigned int dataoff,
|
||||
enum ip_conntrack_info *ctinfo,
|
||||
int pf, unsigned int hooknum);
|
||||
u_int8_t pf, unsigned int hooknum);
|
||||
|
||||
/* Print out the per-protocol part of the tuple. Return like seq_* */
|
||||
int (*print_tuple)(struct seq_file *s,
|
||||
|
@@ -28,7 +28,7 @@ struct nf_loginfo {
|
||||
} u;
|
||||
};
|
||||
|
||||
typedef void nf_logfn(unsigned int pf,
|
||||
typedef void nf_logfn(u_int8_t pf,
|
||||
unsigned int hooknum,
|
||||
const struct sk_buff *skb,
|
||||
const struct net_device *in,
|
||||
@@ -43,12 +43,12 @@ struct nf_logger {
|
||||
};
|
||||
|
||||
/* Function to register/unregister log function. */
|
||||
int nf_log_register(int pf, const struct nf_logger *logger);
|
||||
int nf_log_register(u_int8_t pf, const struct nf_logger *logger);
|
||||
void nf_log_unregister(const struct nf_logger *logger);
|
||||
void nf_log_unregister_pf(int pf);
|
||||
void nf_log_unregister_pf(u_int8_t pf);
|
||||
|
||||
/* Calls the registered backend logging function */
|
||||
void nf_log_packet(int pf,
|
||||
void nf_log_packet(u_int8_t pf,
|
||||
unsigned int hooknum,
|
||||
const struct sk_buff *skb,
|
||||
const struct net_device *in,
|
||||
|
@@ -8,7 +8,7 @@ struct nf_queue_entry {
|
||||
unsigned int id;
|
||||
|
||||
struct nf_hook_ops *elem;
|
||||
int pf;
|
||||
u_int8_t pf;
|
||||
unsigned int hook;
|
||||
struct net_device *indev;
|
||||
struct net_device *outdev;
|
||||
@@ -24,9 +24,9 @@ struct nf_queue_handler {
|
||||
char *name;
|
||||
};
|
||||
|
||||
extern int nf_register_queue_handler(int pf,
|
||||
extern int nf_register_queue_handler(u_int8_t pf,
|
||||
const struct nf_queue_handler *qh);
|
||||
extern int nf_unregister_queue_handler(int pf,
|
||||
extern int nf_unregister_queue_handler(u_int8_t pf,
|
||||
const struct nf_queue_handler *qh);
|
||||
extern void nf_unregister_queue_handlers(const struct nf_queue_handler *qh);
|
||||
extern void nf_reinject(struct nf_queue_entry *entry, unsigned int verdict);
|
||||
|
Reference in New Issue
Block a user