aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2008-10-08 05:35:00 -0400
committerPatrick McHardy <kaber@trash.net>2008-10-08 05:35:00 -0400
commit76108cea065cda58366d16a7eb6ca90d717a1396 (patch)
treec4fc31d490c902f2c2478a6344ee988dccc6286f
parentbe713a443ee019489890e93654557916fbf72612 (diff)
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>
-rw-r--r--include/linux/netfilter.h30
-rw-r--r--include/linux/netfilter/x_tables.h28
-rw-r--r--include/net/netfilter/nf_conntrack_core.h2
-rw-r--r--include/net/netfilter/nf_conntrack_expect.h2
-rw-r--r--include/net/netfilter/nf_conntrack_l4proto.h4
-rw-r--r--include/net/netfilter/nf_log.h8
-rw-r--r--include/net/netfilter/nf_queue.h6
-rw-r--r--net/bridge/br_netfilter.c4
-rw-r--r--net/bridge/netfilter/ebt_log.c2
-rw-r--r--net/bridge/netfilter/ebt_ulog.c2
-rw-r--r--net/ipv4/netfilter/ipt_LOG.c2
-rw-r--r--net/ipv4/netfilter/ipt_ULOG.c2
-rw-r--r--net/ipv4/netfilter/nf_conntrack_proto_icmp.c4
-rw-r--r--net/ipv6/netfilter/ip6t_LOG.c2
-rw-r--r--net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c4
-rw-r--r--net/netfilter/core.c4
-rw-r--r--net/netfilter/nf_conntrack_core.c6
-rw-r--r--net/netfilter/nf_conntrack_expect.c2
-rw-r--r--net/netfilter/nf_conntrack_h323_main.c3
-rw-r--r--net/netfilter/nf_conntrack_proto_dccp.c4
-rw-r--r--net/netfilter/nf_conntrack_proto_generic.c2
-rw-r--r--net/netfilter/nf_conntrack_proto_gre.c2
-rw-r--r--net/netfilter/nf_conntrack_proto_sctp.c2
-rw-r--r--net/netfilter/nf_conntrack_proto_tcp.c6
-rw-r--r--net/netfilter/nf_conntrack_proto_udp.c4
-rw-r--r--net/netfilter/nf_conntrack_proto_udplite.c4
-rw-r--r--net/netfilter/nf_internals.h4
-rw-r--r--net/netfilter/nf_log.c6
-rw-r--r--net/netfilter/nf_queue.c10
-rw-r--r--net/netfilter/nf_sockopt.c15
-rw-r--r--net/netfilter/nfnetlink_log.c4
-rw-r--r--net/netfilter/x_tables.c47
-rw-r--r--net/netfilter/xt_connlimit.c2
-rw-r--r--net/netfilter/xt_conntrack.c8
-rw-r--r--net/netfilter/xt_hashlimit.c11
35 files changed, 127 insertions, 121 deletions
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h
index 0c5eb7ed8b3f..8c83d2e23bde 100644
--- a/include/linux/netfilter.h
+++ b/include/linux/netfilter.h
@@ -92,8 +92,8 @@ struct nf_hook_ops
92 /* User fills in from here down. */ 92 /* User fills in from here down. */
93 nf_hookfn *hook; 93 nf_hookfn *hook;
94 struct module *owner; 94 struct module *owner;
95 int pf; 95 u_int8_t pf;
96 int hooknum; 96 unsigned int hooknum;
97 /* Hooks are ordered in ascending priority. */ 97 /* Hooks are ordered in ascending priority. */
98 int priority; 98 int priority;
99}; 99};
@@ -102,7 +102,7 @@ struct nf_sockopt_ops
102{ 102{
103 struct list_head list; 103 struct list_head list;
104 104
105 int pf; 105 u_int8_t pf;
106 106
107 /* Non-inclusive ranges: use 0/0/NULL to never get called. */ 107 /* Non-inclusive ranges: use 0/0/NULL to never get called. */
108 int set_optmin; 108 int set_optmin;
@@ -140,7 +140,7 @@ extern struct ctl_path nf_net_ipv4_netfilter_sysctl_path[];
140 140
141extern struct list_head nf_hooks[NPROTO][NF_MAX_HOOKS]; 141extern struct list_head nf_hooks[NPROTO][NF_MAX_HOOKS];
142 142
143int nf_hook_slow(int pf, unsigned int hook, struct sk_buff *skb, 143int nf_hook_slow(u_int8_t pf, unsigned int hook, struct sk_buff *skb,
144 struct net_device *indev, struct net_device *outdev, 144 struct net_device *indev, struct net_device *outdev,
145 int (*okfn)(struct sk_buff *), int thresh); 145 int (*okfn)(struct sk_buff *), int thresh);
146 146
@@ -151,7 +151,7 @@ int nf_hook_slow(int pf, unsigned int hook, struct sk_buff *skb,
151 * okfn must be invoked by the caller in this case. Any other return 151 * okfn must be invoked by the caller in this case. Any other return
152 * value indicates the packet has been consumed by the hook. 152 * value indicates the packet has been consumed by the hook.
153 */ 153 */
154static inline int nf_hook_thresh(int pf, unsigned int hook, 154static inline int nf_hook_thresh(u_int8_t pf, unsigned int hook,
155 struct sk_buff *skb, 155 struct sk_buff *skb,
156 struct net_device *indev, 156 struct net_device *indev,
157 struct net_device *outdev, 157 struct net_device *outdev,
@@ -167,7 +167,7 @@ static inline int nf_hook_thresh(int pf, unsigned int hook,
167 return nf_hook_slow(pf, hook, skb, indev, outdev, okfn, thresh); 167 return nf_hook_slow(pf, hook, skb, indev, outdev, okfn, thresh);
168} 168}
169 169
170static inline int nf_hook(int pf, unsigned int hook, struct sk_buff *skb, 170static inline int nf_hook(u_int8_t pf, unsigned int hook, struct sk_buff *skb,
171 struct net_device *indev, struct net_device *outdev, 171 struct net_device *indev, struct net_device *outdev,
172 int (*okfn)(struct sk_buff *)) 172 int (*okfn)(struct sk_buff *))
173{ 173{
@@ -212,14 +212,14 @@ __ret;})
212 NF_HOOK_THRESH(pf, hook, skb, indev, outdev, okfn, INT_MIN) 212 NF_HOOK_THRESH(pf, hook, skb, indev, outdev, okfn, INT_MIN)
213 213
214/* Call setsockopt() */ 214/* Call setsockopt() */
215int nf_setsockopt(struct sock *sk, int pf, int optval, char __user *opt, 215int nf_setsockopt(struct sock *sk, u_int8_t pf, int optval, char __user *opt,
216 int len); 216 int len);
217int nf_getsockopt(struct sock *sk, int pf, int optval, char __user *opt, 217int nf_getsockopt(struct sock *sk, u_int8_t pf, int optval, char __user *opt,
218 int *len); 218 int *len);
219 219
220int compat_nf_setsockopt(struct sock *sk, int pf, int optval, 220int compat_nf_setsockopt(struct sock *sk, u_int8_t pf, int optval,
221 char __user *opt, int len); 221 char __user *opt, int len);
222int compat_nf_getsockopt(struct sock *sk, int pf, int optval, 222int compat_nf_getsockopt(struct sock *sk, u_int8_t pf, int optval,
223 char __user *opt, int *len); 223 char __user *opt, int *len);
224 224
225/* Call this before modifying an existing packet: ensures it is 225/* Call this before modifying an existing packet: ensures it is
@@ -292,7 +292,7 @@ extern void nf_unregister_afinfo(const struct nf_afinfo *afinfo);
292extern void (*ip_nat_decode_session)(struct sk_buff *, struct flowi *); 292extern void (*ip_nat_decode_session)(struct sk_buff *, struct flowi *);
293 293
294static inline void 294static inline void
295nf_nat_decode_session(struct sk_buff *skb, struct flowi *fl, int family) 295nf_nat_decode_session(struct sk_buff *skb, struct flowi *fl, u_int8_t family)
296{ 296{
297#ifdef CONFIG_NF_NAT_NEEDED 297#ifdef CONFIG_NF_NAT_NEEDED
298 void (*decodefn)(struct sk_buff *, struct flowi *); 298 void (*decodefn)(struct sk_buff *, struct flowi *);
@@ -315,7 +315,7 @@ extern struct proc_dir_entry *proc_net_netfilter;
315#else /* !CONFIG_NETFILTER */ 315#else /* !CONFIG_NETFILTER */
316#define NF_HOOK(pf, hook, skb, indev, outdev, okfn) (okfn)(skb) 316#define NF_HOOK(pf, hook, skb, indev, outdev, okfn) (okfn)(skb)
317#define NF_HOOK_COND(pf, hook, skb, indev, outdev, okfn, cond) (okfn)(skb) 317#define NF_HOOK_COND(pf, hook, skb, indev, outdev, okfn, cond) (okfn)(skb)
318static inline int nf_hook_thresh(int pf, unsigned int hook, 318static inline int nf_hook_thresh(u_int8_t pf, unsigned int hook,
319 struct sk_buff *skb, 319 struct sk_buff *skb,
320 struct net_device *indev, 320 struct net_device *indev,
321 struct net_device *outdev, 321 struct net_device *outdev,
@@ -324,7 +324,7 @@ static inline int nf_hook_thresh(int pf, unsigned int hook,
324{ 324{
325 return okfn(skb); 325 return okfn(skb);
326} 326}
327static inline int nf_hook(int pf, unsigned int hook, struct sk_buff *skb, 327static inline int nf_hook(u_int8_t pf, unsigned int hook, struct sk_buff *skb,
328 struct net_device *indev, struct net_device *outdev, 328 struct net_device *indev, struct net_device *outdev,
329 int (*okfn)(struct sk_buff *)) 329 int (*okfn)(struct sk_buff *))
330{ 330{
@@ -332,7 +332,9 @@ static inline int nf_hook(int pf, unsigned int hook, struct sk_buff *skb,
332} 332}
333struct flowi; 333struct flowi;
334static inline void 334static inline void
335nf_nat_decode_session(struct sk_buff *skb, struct flowi *fl, int family) {} 335nf_nat_decode_session(struct sk_buff *skb, struct flowi *fl, u_int8_t family)
336{
337}
336#endif /*CONFIG_NETFILTER*/ 338#endif /*CONFIG_NETFILTER*/
337 339
338#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) 340#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h
index 2326296b6f25..6989b22716e6 100644
--- a/include/linux/netfilter/x_tables.h
+++ b/include/linux/netfilter/x_tables.h
@@ -292,7 +292,7 @@ struct xt_table
292 /* Set this to THIS_MODULE if you are a module, otherwise NULL */ 292 /* Set this to THIS_MODULE if you are a module, otherwise NULL */
293 struct module *me; 293 struct module *me;
294 294
295 int af; /* address/protocol family */ 295 u_int8_t af; /* address/protocol family */
296}; 296};
297 297
298#include <linux/netfilter_ipv4.h> 298#include <linux/netfilter_ipv4.h>
@@ -346,19 +346,19 @@ extern struct xt_table_info *xt_replace_table(struct xt_table *table,
346 struct xt_table_info *newinfo, 346 struct xt_table_info *newinfo,
347 int *error); 347 int *error);
348 348
349extern struct xt_match *xt_find_match(int af, const char *name, u8 revision); 349extern struct xt_match *xt_find_match(u8 af, const char *name, u8 revision);
350extern struct xt_target *xt_find_target(int af, const char *name, u8 revision); 350extern struct xt_target *xt_find_target(u8 af, const char *name, u8 revision);
351extern struct xt_target *xt_request_find_target(int af, const char *name, 351extern struct xt_target *xt_request_find_target(u8 af, const char *name,
352 u8 revision); 352 u8 revision);
353extern int xt_find_revision(int af, const char *name, u8 revision, int target, 353extern int xt_find_revision(u8 af, const char *name, u8 revision,
354 int *err); 354 int target, int *err);
355 355
356extern struct xt_table *xt_find_table_lock(struct net *net, int af, 356extern struct xt_table *xt_find_table_lock(struct net *net, u_int8_t af,
357 const char *name); 357 const char *name);
358extern void xt_table_unlock(struct xt_table *t); 358extern void xt_table_unlock(struct xt_table *t);
359 359
360extern int xt_proto_init(struct net *net, int af); 360extern int xt_proto_init(struct net *net, u_int8_t af);
361extern void xt_proto_fini(struct net *net, int af); 361extern void xt_proto_fini(struct net *net, u_int8_t af);
362 362
363extern struct xt_table_info *xt_alloc_table_info(unsigned int size); 363extern struct xt_table_info *xt_alloc_table_info(unsigned int size);
364extern void xt_free_table_info(struct xt_table_info *info); 364extern void xt_free_table_info(struct xt_table_info *info);
@@ -423,12 +423,12 @@ struct compat_xt_counters_info
423#define COMPAT_XT_ALIGN(s) (((s) + (__alignof__(struct compat_xt_counters)-1)) \ 423#define COMPAT_XT_ALIGN(s) (((s) + (__alignof__(struct compat_xt_counters)-1)) \
424 & ~(__alignof__(struct compat_xt_counters)-1)) 424 & ~(__alignof__(struct compat_xt_counters)-1))
425 425
426extern void xt_compat_lock(int af); 426extern void xt_compat_lock(u_int8_t af);
427extern void xt_compat_unlock(int af); 427extern void xt_compat_unlock(u_int8_t af);
428 428
429extern int xt_compat_add_offset(int af, unsigned int offset, short delta); 429extern int xt_compat_add_offset(u_int8_t af, unsigned int offset, short delta);
430extern void xt_compat_flush_offsets(int af); 430extern void xt_compat_flush_offsets(u_int8_t af);
431extern short xt_compat_calc_jump(int af, unsigned int offset); 431extern short xt_compat_calc_jump(u_int8_t af, unsigned int offset);
432 432
433extern int xt_compat_match_offset(const struct xt_match *match); 433extern int xt_compat_match_offset(const struct xt_match *match);
434extern int xt_compat_match_from_user(struct xt_entry_match *m, 434extern int xt_compat_match_from_user(struct xt_entry_match *m,
diff --git a/include/net/netfilter/nf_conntrack_core.h b/include/net/netfilter/nf_conntrack_core.h
index a81771210934..05760d6a706e 100644
--- a/include/net/netfilter/nf_conntrack_core.h
+++ b/include/net/netfilter/nf_conntrack_core.h
@@ -20,7 +20,7 @@
20/* This header is used to share core functionality between the 20/* This header is used to share core functionality between the
21 standalone connection tracking module, and the compatibility layer's use 21 standalone connection tracking module, and the compatibility layer's use
22 of connection tracking. */ 22 of connection tracking. */
23extern unsigned int nf_conntrack_in(int pf, 23extern unsigned int nf_conntrack_in(u_int8_t pf,
24 unsigned int hooknum, 24 unsigned int hooknum,
25 struct sk_buff *skb); 25 struct sk_buff *skb);
26 26
diff --git a/include/net/netfilter/nf_conntrack_expect.h b/include/net/netfilter/nf_conntrack_expect.h
index dfdf4b459475..4c4d894cb9b5 100644
--- a/include/net/netfilter/nf_conntrack_expect.h
+++ b/include/net/netfilter/nf_conntrack_expect.h
@@ -86,7 +86,7 @@ void nf_ct_unexpect_related(struct nf_conntrack_expect *exp);
86/* Allocate space for an expectation: this is mandatory before calling 86/* Allocate space for an expectation: this is mandatory before calling
87 nf_ct_expect_related. You will have to call put afterwards. */ 87 nf_ct_expect_related. You will have to call put afterwards. */
88struct nf_conntrack_expect *nf_ct_expect_alloc(struct nf_conn *me); 88struct nf_conntrack_expect *nf_ct_expect_alloc(struct nf_conn *me);
89void nf_ct_expect_init(struct nf_conntrack_expect *, unsigned int, int, 89void nf_ct_expect_init(struct nf_conntrack_expect *, unsigned int, u_int8_t,
90 const union nf_inet_addr *, 90 const union nf_inet_addr *,
91 const union nf_inet_addr *, 91 const union nf_inet_addr *,
92 u_int8_t, const __be16 *, const __be16 *); 92 u_int8_t, const __be16 *, const __be16 *);
diff --git a/include/net/netfilter/nf_conntrack_l4proto.h b/include/net/netfilter/nf_conntrack_l4proto.h
index 723df9d1cc35..d4376e97bae8 100644
--- a/include/net/netfilter/nf_conntrack_l4proto.h
+++ b/include/net/netfilter/nf_conntrack_l4proto.h
@@ -39,7 +39,7 @@ struct nf_conntrack_l4proto
39 const struct sk_buff *skb, 39 const struct sk_buff *skb,
40 unsigned int dataoff, 40 unsigned int dataoff,
41 enum ip_conntrack_info ctinfo, 41 enum ip_conntrack_info ctinfo,
42 int pf, 42 u_int8_t pf,
43 unsigned int hooknum); 43 unsigned int hooknum);
44 44
45 /* Called when a new connection for this protocol found; 45 /* Called when a new connection for this protocol found;
@@ -52,7 +52,7 @@ struct nf_conntrack_l4proto
52 52
53 int (*error)(struct sk_buff *skb, unsigned int dataoff, 53 int (*error)(struct sk_buff *skb, unsigned int dataoff,
54 enum ip_conntrack_info *ctinfo, 54 enum ip_conntrack_info *ctinfo,
55 int pf, unsigned int hooknum); 55 u_int8_t pf, unsigned int hooknum);
56 56
57 /* Print out the per-protocol part of the tuple. Return like seq_* */ 57 /* Print out the per-protocol part of the tuple. Return like seq_* */
58 int (*print_tuple)(struct seq_file *s, 58 int (*print_tuple)(struct seq_file *s,
diff --git a/include/net/netfilter/nf_log.h b/include/net/netfilter/nf_log.h
index 8c6b5ae45534..7182c06974f4 100644
--- a/include/net/netfilter/nf_log.h
+++ b/include/net/netfilter/nf_log.h
@@ -28,7 +28,7 @@ struct nf_loginfo {
28 } u; 28 } u;
29}; 29};
30 30
31typedef void nf_logfn(unsigned int pf, 31typedef void nf_logfn(u_int8_t pf,
32 unsigned int hooknum, 32 unsigned int hooknum,
33 const struct sk_buff *skb, 33 const struct sk_buff *skb,
34 const struct net_device *in, 34 const struct net_device *in,
@@ -43,12 +43,12 @@ struct nf_logger {
43}; 43};
44 44
45/* Function to register/unregister log function. */ 45/* Function to register/unregister log function. */
46int nf_log_register(int pf, const struct nf_logger *logger); 46int nf_log_register(u_int8_t pf, const struct nf_logger *logger);
47void nf_log_unregister(const struct nf_logger *logger); 47void nf_log_unregister(const struct nf_logger *logger);
48void nf_log_unregister_pf(int pf); 48void nf_log_unregister_pf(u_int8_t pf);
49 49
50/* Calls the registered backend logging function */ 50/* Calls the registered backend logging function */
51void nf_log_packet(int pf, 51void nf_log_packet(u_int8_t pf,
52 unsigned int hooknum, 52 unsigned int hooknum,
53 const struct sk_buff *skb, 53 const struct sk_buff *skb,
54 const struct net_device *in, 54 const struct net_device *in,
diff --git a/include/net/netfilter/nf_queue.h b/include/net/netfilter/nf_queue.h
index d030044e9235..252fd1010b77 100644
--- a/include/net/netfilter/nf_queue.h
+++ b/include/net/netfilter/nf_queue.h
@@ -8,7 +8,7 @@ struct nf_queue_entry {
8 unsigned int id; 8 unsigned int id;
9 9
10 struct nf_hook_ops *elem; 10 struct nf_hook_ops *elem;
11 int pf; 11 u_int8_t pf;
12 unsigned int hook; 12 unsigned int hook;
13 struct net_device *indev; 13 struct net_device *indev;
14 struct net_device *outdev; 14 struct net_device *outdev;
@@ -24,9 +24,9 @@ struct nf_queue_handler {
24 char *name; 24 char *name;
25}; 25};
26 26
27extern int nf_register_queue_handler(int pf, 27extern int nf_register_queue_handler(u_int8_t pf,
28 const struct nf_queue_handler *qh); 28 const struct nf_queue_handler *qh);
29extern int nf_unregister_queue_handler(int pf, 29extern int nf_unregister_queue_handler(u_int8_t pf,
30 const struct nf_queue_handler *qh); 30 const struct nf_queue_handler *qh);
31extern void nf_unregister_queue_handlers(const struct nf_queue_handler *qh); 31extern void nf_unregister_queue_handlers(const struct nf_queue_handler *qh);
32extern void nf_reinject(struct nf_queue_entry *entry, unsigned int verdict); 32extern void nf_reinject(struct nf_queue_entry *entry, unsigned int verdict);
diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c
index 6a9a6cd74b1e..a4abed5b4c44 100644
--- a/net/bridge/br_netfilter.c
+++ b/net/bridge/br_netfilter.c
@@ -657,7 +657,7 @@ static unsigned int br_nf_forward_ip(unsigned int hook, struct sk_buff *skb,
657{ 657{
658 struct nf_bridge_info *nf_bridge; 658 struct nf_bridge_info *nf_bridge;
659 struct net_device *parent; 659 struct net_device *parent;
660 int pf; 660 u_int8_t pf;
661 661
662 if (!skb->nf_bridge) 662 if (!skb->nf_bridge)
663 return NF_ACCEPT; 663 return NF_ACCEPT;
@@ -791,7 +791,7 @@ static unsigned int br_nf_post_routing(unsigned int hook, struct sk_buff *skb,
791{ 791{
792 struct nf_bridge_info *nf_bridge = skb->nf_bridge; 792 struct nf_bridge_info *nf_bridge = skb->nf_bridge;
793 struct net_device *realoutdev = bridge_parent(skb->dev); 793 struct net_device *realoutdev = bridge_parent(skb->dev);
794 int pf; 794 u_int8_t pf;
795 795
796#ifdef CONFIG_NETFILTER_DEBUG 796#ifdef CONFIG_NETFILTER_DEBUG
797 /* Be very paranoid. This probably won't happen anymore, but let's 797 /* Be very paranoid. This probably won't happen anymore, but let's
diff --git a/net/bridge/netfilter/ebt_log.c b/net/bridge/netfilter/ebt_log.c
index 2f430d4ae911..3770cd8a7b3a 100644
--- a/net/bridge/netfilter/ebt_log.c
+++ b/net/bridge/netfilter/ebt_log.c
@@ -84,7 +84,7 @@ print_ports(const struct sk_buff *skb, uint8_t protocol, int offset)
84 84
85#define myNIPQUAD(a) a[0], a[1], a[2], a[3] 85#define myNIPQUAD(a) a[0], a[1], a[2], a[3]
86static void 86static void
87ebt_log_packet(unsigned int pf, unsigned int hooknum, 87ebt_log_packet(u_int8_t pf, unsigned int hooknum,
88 const struct sk_buff *skb, const struct net_device *in, 88 const struct sk_buff *skb, const struct net_device *in,
89 const struct net_device *out, const struct nf_loginfo *loginfo, 89 const struct net_device *out, const struct nf_loginfo *loginfo,
90 const char *prefix) 90 const char *prefix)
diff --git a/net/bridge/netfilter/ebt_ulog.c b/net/bridge/netfilter/ebt_ulog.c
index 2d4c9ef909fc..c84bda61afba 100644
--- a/net/bridge/netfilter/ebt_ulog.c
+++ b/net/bridge/netfilter/ebt_ulog.c
@@ -223,7 +223,7 @@ alloc_failure:
223} 223}
224 224
225/* this function is registered with the netfilter core */ 225/* this function is registered with the netfilter core */
226static void ebt_log_packet(unsigned int pf, unsigned int hooknum, 226static void ebt_log_packet(u_int8_t pf, unsigned int hooknum,
227 const struct sk_buff *skb, const struct net_device *in, 227 const struct sk_buff *skb, const struct net_device *in,
228 const struct net_device *out, const struct nf_loginfo *li, 228 const struct net_device *out, const struct nf_loginfo *li,
229 const char *prefix) 229 const char *prefix)
diff --git a/net/ipv4/netfilter/ipt_LOG.c b/net/ipv4/netfilter/ipt_LOG.c
index 0af14137137b..9330ba3577e1 100644
--- a/net/ipv4/netfilter/ipt_LOG.c
+++ b/net/ipv4/netfilter/ipt_LOG.c
@@ -375,7 +375,7 @@ static struct nf_loginfo default_loginfo = {
375}; 375};
376 376
377static void 377static void
378ipt_log_packet(unsigned int pf, 378ipt_log_packet(u_int8_t pf,
379 unsigned int hooknum, 379 unsigned int hooknum,
380 const struct sk_buff *skb, 380 const struct sk_buff *skb,
381 const struct net_device *in, 381 const struct net_device *in,
diff --git a/net/ipv4/netfilter/ipt_ULOG.c b/net/ipv4/netfilter/ipt_ULOG.c
index b192756c6d0d..d8241e6b077b 100644
--- a/net/ipv4/netfilter/ipt_ULOG.c
+++ b/net/ipv4/netfilter/ipt_ULOG.c
@@ -292,7 +292,7 @@ ulog_tg(struct sk_buff *skb, const struct net_device *in,
292 return XT_CONTINUE; 292 return XT_CONTINUE;
293} 293}
294 294
295static void ipt_logfn(unsigned int pf, 295static void ipt_logfn(u_int8_t pf,
296 unsigned int hooknum, 296 unsigned int hooknum,
297 const struct sk_buff *skb, 297 const struct sk_buff *skb,
298 const struct net_device *in, 298 const struct net_device *in,
diff --git a/net/ipv4/netfilter/nf_conntrack_proto_icmp.c b/net/ipv4/netfilter/nf_conntrack_proto_icmp.c
index 97791048fa9b..da8edcdaef32 100644
--- a/net/ipv4/netfilter/nf_conntrack_proto_icmp.c
+++ b/net/ipv4/netfilter/nf_conntrack_proto_icmp.c
@@ -79,7 +79,7 @@ static int icmp_packet(struct nf_conn *ct,
79 const struct sk_buff *skb, 79 const struct sk_buff *skb,
80 unsigned int dataoff, 80 unsigned int dataoff,
81 enum ip_conntrack_info ctinfo, 81 enum ip_conntrack_info ctinfo,
82 int pf, 82 u_int8_t pf,
83 unsigned int hooknum) 83 unsigned int hooknum)
84{ 84{
85 /* Try to delete connection immediately after all replies: 85 /* Try to delete connection immediately after all replies:
@@ -173,7 +173,7 @@ icmp_error_message(struct sk_buff *skb,
173/* Small and modified version of icmp_rcv */ 173/* Small and modified version of icmp_rcv */
174static int 174static int
175icmp_error(struct sk_buff *skb, unsigned int dataoff, 175icmp_error(struct sk_buff *skb, unsigned int dataoff,
176 enum ip_conntrack_info *ctinfo, int pf, unsigned int hooknum) 176 enum ip_conntrack_info *ctinfo, u_int8_t pf, unsigned int hooknum)
177{ 177{
178 const struct icmphdr *icmph; 178 const struct icmphdr *icmph;
179 struct icmphdr _ih; 179 struct icmphdr _ih;
diff --git a/net/ipv6/netfilter/ip6t_LOG.c b/net/ipv6/netfilter/ip6t_LOG.c
index 3a2316974f83..0716f8afa0bc 100644
--- a/net/ipv6/netfilter/ip6t_LOG.c
+++ b/net/ipv6/netfilter/ip6t_LOG.c
@@ -385,7 +385,7 @@ static struct nf_loginfo default_loginfo = {
385}; 385};
386 386
387static void 387static void
388ip6t_log_packet(unsigned int pf, 388ip6t_log_packet(u_int8_t pf,
389 unsigned int hooknum, 389 unsigned int hooknum,
390 const struct sk_buff *skb, 390 const struct sk_buff *skb,
391 const struct net_device *in, 391 const struct net_device *in,
diff --git a/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c b/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c
index 14d47d833545..5756f30ebc68 100644
--- a/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c
+++ b/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c
@@ -81,7 +81,7 @@ static int icmpv6_packet(struct nf_conn *ct,
81 const struct sk_buff *skb, 81 const struct sk_buff *skb,
82 unsigned int dataoff, 82 unsigned int dataoff,
83 enum ip_conntrack_info ctinfo, 83 enum ip_conntrack_info ctinfo,
84 int pf, 84 u_int8_t pf,
85 unsigned int hooknum) 85 unsigned int hooknum)
86{ 86{
87 /* Try to delete connection immediately after all replies: 87 /* Try to delete connection immediately after all replies:
@@ -173,7 +173,7 @@ icmpv6_error_message(struct sk_buff *skb,
173 173
174static int 174static int
175icmpv6_error(struct sk_buff *skb, unsigned int dataoff, 175icmpv6_error(struct sk_buff *skb, unsigned int dataoff,
176 enum ip_conntrack_info *ctinfo, int pf, unsigned int hooknum) 176 enum ip_conntrack_info *ctinfo, u_int8_t pf, unsigned int hooknum)
177{ 177{
178 const struct icmp6hdr *icmp6h; 178 const struct icmp6hdr *icmp6h;
179 struct icmp6hdr _ih; 179 struct icmp6hdr _ih;
diff --git a/net/netfilter/core.c b/net/netfilter/core.c
index 292fa28146fb..26b8f489d7a2 100644
--- a/net/netfilter/core.c
+++ b/net/netfilter/core.c
@@ -113,7 +113,7 @@ EXPORT_SYMBOL(nf_unregister_hooks);
113 113
114unsigned int nf_iterate(struct list_head *head, 114unsigned int nf_iterate(struct list_head *head,
115 struct sk_buff *skb, 115 struct sk_buff *skb,
116 int hook, 116 unsigned int hook,
117 const struct net_device *indev, 117 const struct net_device *indev,
118 const struct net_device *outdev, 118 const struct net_device *outdev,
119 struct list_head **i, 119 struct list_head **i,
@@ -155,7 +155,7 @@ unsigned int nf_iterate(struct list_head *head,
155 155
156/* Returns 1 if okfn() needs to be executed by the caller, 156/* Returns 1 if okfn() needs to be executed by the caller,
157 * -EPERM for NF_DROP, 0 otherwise. */ 157 * -EPERM for NF_DROP, 0 otherwise. */
158int nf_hook_slow(int pf, unsigned int hook, struct sk_buff *skb, 158int nf_hook_slow(u_int8_t pf, unsigned int hook, struct sk_buff *skb,
159 struct net_device *indev, 159 struct net_device *indev,
160 struct net_device *outdev, 160 struct net_device *outdev,
161 int (*okfn)(struct sk_buff *), 161 int (*okfn)(struct sk_buff *),
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index 9d1830da8e84..6aaf64b5dede 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -665,7 +665,7 @@ resolve_normal_ct(struct sk_buff *skb,
665} 665}
666 666
667unsigned int 667unsigned int
668nf_conntrack_in(int pf, unsigned int hooknum, struct sk_buff *skb) 668nf_conntrack_in(u_int8_t pf, unsigned int hooknum, struct sk_buff *skb)
669{ 669{
670 struct nf_conn *ct; 670 struct nf_conn *ct;
671 enum ip_conntrack_info ctinfo; 671 enum ip_conntrack_info ctinfo;
@@ -683,7 +683,7 @@ nf_conntrack_in(int pf, unsigned int hooknum, struct sk_buff *skb)
683 } 683 }
684 684
685 /* rcu_read_lock()ed by nf_hook_slow */ 685 /* rcu_read_lock()ed by nf_hook_slow */
686 l3proto = __nf_ct_l3proto_find((u_int16_t)pf); 686 l3proto = __nf_ct_l3proto_find(pf);
687 ret = l3proto->get_l4proto(skb, skb_network_offset(skb), 687 ret = l3proto->get_l4proto(skb, skb_network_offset(skb),
688 &dataoff, &protonum); 688 &dataoff, &protonum);
689 if (ret <= 0) { 689 if (ret <= 0) {
@@ -693,7 +693,7 @@ nf_conntrack_in(int pf, unsigned int hooknum, struct sk_buff *skb)
693 return -ret; 693 return -ret;
694 } 694 }
695 695
696 l4proto = __nf_ct_l4proto_find((u_int16_t)pf, protonum); 696 l4proto = __nf_ct_l4proto_find(pf, protonum);
697 697
698 /* It may be an special packet, error, unclean... 698 /* It may be an special packet, error, unclean...
699 * inverse of the return code tells to the netfilter 699 * inverse of the return code tells to the netfilter
diff --git a/net/netfilter/nf_conntrack_expect.c b/net/netfilter/nf_conntrack_expect.c
index e8f0dead267f..990fa12f2ee5 100644
--- a/net/netfilter/nf_conntrack_expect.c
+++ b/net/netfilter/nf_conntrack_expect.c
@@ -241,7 +241,7 @@ struct nf_conntrack_expect *nf_ct_expect_alloc(struct nf_conn *me)
241EXPORT_SYMBOL_GPL(nf_ct_expect_alloc); 241EXPORT_SYMBOL_GPL(nf_ct_expect_alloc);
242 242
243void nf_ct_expect_init(struct nf_conntrack_expect *exp, unsigned int class, 243void nf_ct_expect_init(struct nf_conntrack_expect *exp, unsigned int class,
244 int family, 244 u_int8_t family,
245 const union nf_inet_addr *saddr, 245 const union nf_inet_addr *saddr,
246 const union nf_inet_addr *daddr, 246 const union nf_inet_addr *daddr,
247 u_int8_t proto, const __be16 *src, const __be16 *dst) 247 u_int8_t proto, const __be16 *src, const __be16 *dst)
diff --git a/net/netfilter/nf_conntrack_h323_main.c b/net/netfilter/nf_conntrack_h323_main.c
index 2f83c158934d..5dc0478108ae 100644
--- a/net/netfilter/nf_conntrack_h323_main.c
+++ b/net/netfilter/nf_conntrack_h323_main.c
@@ -709,7 +709,8 @@ static int expect_h245(struct sk_buff *skb, struct nf_conn *ct,
709/* If the calling party is on the same side of the forward-to party, 709/* If the calling party is on the same side of the forward-to party,
710 * we don't need to track the second call */ 710 * we don't need to track the second call */
711static int callforward_do_filter(const union nf_inet_addr *src, 711static int callforward_do_filter(const union nf_inet_addr *src,
712 const union nf_inet_addr *dst, int family) 712 const union nf_inet_addr *dst,
713 u_int8_t family)
713{ 714{
714 const struct nf_afinfo *afinfo; 715 const struct nf_afinfo *afinfo;
715 struct flowi fl1, fl2; 716 struct flowi fl1, fl2;
diff --git a/net/netfilter/nf_conntrack_proto_dccp.c b/net/netfilter/nf_conntrack_proto_dccp.c
index e7866dd3cde6..edc30358dc19 100644
--- a/net/netfilter/nf_conntrack_proto_dccp.c
+++ b/net/netfilter/nf_conntrack_proto_dccp.c
@@ -461,7 +461,7 @@ static u64 dccp_ack_seq(const struct dccp_hdr *dh)
461 461
462static int dccp_packet(struct nf_conn *ct, const struct sk_buff *skb, 462static int dccp_packet(struct nf_conn *ct, const struct sk_buff *skb,
463 unsigned int dataoff, enum ip_conntrack_info ctinfo, 463 unsigned int dataoff, enum ip_conntrack_info ctinfo,
464 int pf, unsigned int hooknum) 464 u_int8_t pf, unsigned int hooknum)
465{ 465{
466 enum ip_conntrack_dir dir = CTINFO2DIR(ctinfo); 466 enum ip_conntrack_dir dir = CTINFO2DIR(ctinfo);
467 struct dccp_hdr _dh, *dh; 467 struct dccp_hdr _dh, *dh;
@@ -546,7 +546,7 @@ static int dccp_packet(struct nf_conn *ct, const struct sk_buff *skb,
546} 546}
547 547
548static int dccp_error(struct sk_buff *skb, unsigned int dataoff, 548static int dccp_error(struct sk_buff *skb, unsigned int dataoff,
549 enum ip_conntrack_info *ctinfo, int pf, 549 enum ip_conntrack_info *ctinfo, u_int8_t pf,
550 unsigned int hooknum) 550 unsigned int hooknum)
551{ 551{
552 struct dccp_hdr _dh, *dh; 552 struct dccp_hdr _dh, *dh;
diff --git a/net/netfilter/nf_conntrack_proto_generic.c b/net/netfilter/nf_conntrack_proto_generic.c
index e31b0e7bd0b1..dbe680af85d2 100644
--- a/net/netfilter/nf_conntrack_proto_generic.c
+++ b/net/netfilter/nf_conntrack_proto_generic.c
@@ -45,7 +45,7 @@ static int packet(struct nf_conn *ct,
45 const struct sk_buff *skb, 45 const struct sk_buff *skb,
46 unsigned int dataoff, 46 unsigned int dataoff,
47 enum ip_conntrack_info ctinfo, 47 enum ip_conntrack_info ctinfo,
48 int pf, 48 u_int8_t pf,
49 unsigned int hooknum) 49 unsigned int hooknum)
50{ 50{
51 nf_ct_refresh_acct(ct, ctinfo, skb, nf_ct_generic_timeout); 51 nf_ct_refresh_acct(ct, ctinfo, skb, nf_ct_generic_timeout);
diff --git a/net/netfilter/nf_conntrack_proto_gre.c b/net/netfilter/nf_conntrack_proto_gre.c
index 9bd03967fea4..c5a78220fa38 100644
--- a/net/netfilter/nf_conntrack_proto_gre.c
+++ b/net/netfilter/nf_conntrack_proto_gre.c
@@ -219,7 +219,7 @@ static int gre_packet(struct nf_conn *ct,
219 const struct sk_buff *skb, 219 const struct sk_buff *skb,
220 unsigned int dataoff, 220 unsigned int dataoff,
221 enum ip_conntrack_info ctinfo, 221 enum ip_conntrack_info ctinfo,
222 int pf, 222 u_int8_t pf,
223 unsigned int hooknum) 223 unsigned int hooknum)
224{ 224{
225 /* If we've seen traffic both ways, this is a GRE connection. 225 /* If we've seen traffic both ways, this is a GRE connection.
diff --git a/net/netfilter/nf_conntrack_proto_sctp.c b/net/netfilter/nf_conntrack_proto_sctp.c
index 30aa5b94a771..b5a90596d3f4 100644
--- a/net/netfilter/nf_conntrack_proto_sctp.c
+++ b/net/netfilter/nf_conntrack_proto_sctp.c
@@ -287,7 +287,7 @@ static int sctp_packet(struct nf_conn *ct,
287 const struct sk_buff *skb, 287 const struct sk_buff *skb,
288 unsigned int dataoff, 288 unsigned int dataoff,
289 enum ip_conntrack_info ctinfo, 289 enum ip_conntrack_info ctinfo,
290 int pf, 290 u_int8_t pf,
291 unsigned int hooknum) 291 unsigned int hooknum)
292{ 292{
293 enum sctp_conntrack new_state, old_state; 293 enum sctp_conntrack new_state, old_state;
diff --git a/net/netfilter/nf_conntrack_proto_tcp.c b/net/netfilter/nf_conntrack_proto_tcp.c
index 6f61261888ef..539a8202025c 100644
--- a/net/netfilter/nf_conntrack_proto_tcp.c
+++ b/net/netfilter/nf_conntrack_proto_tcp.c
@@ -486,7 +486,7 @@ static bool tcp_in_window(const struct nf_conn *ct,
486 const struct sk_buff *skb, 486 const struct sk_buff *skb,
487 unsigned int dataoff, 487 unsigned int dataoff,
488 const struct tcphdr *tcph, 488 const struct tcphdr *tcph,
489 int pf) 489 u_int8_t pf)
490{ 490{
491 struct ip_ct_tcp_state *sender = &state->seen[dir]; 491 struct ip_ct_tcp_state *sender = &state->seen[dir];
492 struct ip_ct_tcp_state *receiver = &state->seen[!dir]; 492 struct ip_ct_tcp_state *receiver = &state->seen[!dir];
@@ -749,7 +749,7 @@ static const u8 tcp_valid_flags[(TH_FIN|TH_SYN|TH_RST|TH_ACK|TH_URG) + 1] =
749static int tcp_error(struct sk_buff *skb, 749static int tcp_error(struct sk_buff *skb,
750 unsigned int dataoff, 750 unsigned int dataoff,
751 enum ip_conntrack_info *ctinfo, 751 enum ip_conntrack_info *ctinfo,
752 int pf, 752 u_int8_t pf,
753 unsigned int hooknum) 753 unsigned int hooknum)
754{ 754{
755 const struct tcphdr *th; 755 const struct tcphdr *th;
@@ -804,7 +804,7 @@ static int tcp_packet(struct nf_conn *ct,
804 const struct sk_buff *skb, 804 const struct sk_buff *skb,
805 unsigned int dataoff, 805 unsigned int dataoff,
806 enum ip_conntrack_info ctinfo, 806 enum ip_conntrack_info ctinfo,
807 int pf, 807 u_int8_t pf,
808 unsigned int hooknum) 808 unsigned int hooknum)
809{ 809{
810 struct nf_conntrack_tuple *tuple; 810 struct nf_conntrack_tuple *tuple;
diff --git a/net/netfilter/nf_conntrack_proto_udp.c b/net/netfilter/nf_conntrack_proto_udp.c
index 8b21762e65de..2a965c4a0eac 100644
--- a/net/netfilter/nf_conntrack_proto_udp.c
+++ b/net/netfilter/nf_conntrack_proto_udp.c
@@ -66,7 +66,7 @@ static int udp_packet(struct nf_conn *ct,
66 const struct sk_buff *skb, 66 const struct sk_buff *skb,
67 unsigned int dataoff, 67 unsigned int dataoff,
68 enum ip_conntrack_info ctinfo, 68 enum ip_conntrack_info ctinfo,
69 int pf, 69 u_int8_t pf,
70 unsigned int hooknum) 70 unsigned int hooknum)
71{ 71{
72 /* If we've seen traffic both ways, this is some kind of UDP 72 /* If we've seen traffic both ways, this is some kind of UDP
@@ -91,7 +91,7 @@ static bool udp_new(struct nf_conn *ct, const struct sk_buff *skb,
91 91
92static int udp_error(struct sk_buff *skb, unsigned int dataoff, 92static int udp_error(struct sk_buff *skb, unsigned int dataoff,
93 enum ip_conntrack_info *ctinfo, 93 enum ip_conntrack_info *ctinfo,
94 int pf, 94 u_int8_t pf,
95 unsigned int hooknum) 95 unsigned int hooknum)
96{ 96{
97 unsigned int udplen = skb->len - dataoff; 97 unsigned int udplen = skb->len - dataoff;
diff --git a/net/netfilter/nf_conntrack_proto_udplite.c b/net/netfilter/nf_conntrack_proto_udplite.c
index 1fa62f3c24f1..4fb6c8d83a84 100644
--- a/net/netfilter/nf_conntrack_proto_udplite.c
+++ b/net/netfilter/nf_conntrack_proto_udplite.c
@@ -65,7 +65,7 @@ static int udplite_packet(struct nf_conn *ct,
65 const struct sk_buff *skb, 65 const struct sk_buff *skb,
66 unsigned int dataoff, 66 unsigned int dataoff,
67 enum ip_conntrack_info ctinfo, 67 enum ip_conntrack_info ctinfo,
68 int pf, 68 u_int8_t pf,
69 unsigned int hooknum) 69 unsigned int hooknum)
70{ 70{
71 /* If we've seen traffic both ways, this is some kind of UDP 71 /* If we've seen traffic both ways, this is some kind of UDP
@@ -91,7 +91,7 @@ static bool udplite_new(struct nf_conn *ct, const struct sk_buff *skb,
91 91
92static int udplite_error(struct sk_buff *skb, unsigned int dataoff, 92static int udplite_error(struct sk_buff *skb, unsigned int dataoff,
93 enum ip_conntrack_info *ctinfo, 93 enum ip_conntrack_info *ctinfo,
94 int pf, 94 u_int8_t pf,
95 unsigned int hooknum) 95 unsigned int hooknum)
96{ 96{
97 unsigned int udplen = skb->len - dataoff; 97 unsigned int udplen = skb->len - dataoff;
diff --git a/net/netfilter/nf_internals.h b/net/netfilter/nf_internals.h
index 196269c1e586..bf6609978af7 100644
--- a/net/netfilter/nf_internals.h
+++ b/net/netfilter/nf_internals.h
@@ -15,7 +15,7 @@
15/* core.c */ 15/* core.c */
16extern unsigned int nf_iterate(struct list_head *head, 16extern unsigned int nf_iterate(struct list_head *head,
17 struct sk_buff *skb, 17 struct sk_buff *skb,
18 int hook, 18 unsigned int hook,
19 const struct net_device *indev, 19 const struct net_device *indev,
20 const struct net_device *outdev, 20 const struct net_device *outdev,
21 struct list_head **i, 21 struct list_head **i,
@@ -25,7 +25,7 @@ extern unsigned int nf_iterate(struct list_head *head,
25/* nf_queue.c */ 25/* nf_queue.c */
26extern int nf_queue(struct sk_buff *skb, 26extern int nf_queue(struct sk_buff *skb,
27 struct list_head *elem, 27 struct list_head *elem,
28 int pf, unsigned int hook, 28 u_int8_t pf, unsigned int hook,
29 struct net_device *indev, 29 struct net_device *indev,
30 struct net_device *outdev, 30 struct net_device *outdev,
31 int (*okfn)(struct sk_buff *), 31 int (*okfn)(struct sk_buff *),
diff --git a/net/netfilter/nf_log.c b/net/netfilter/nf_log.c
index 9fda6ee95a31..5c2f73320154 100644
--- a/net/netfilter/nf_log.c
+++ b/net/netfilter/nf_log.c
@@ -20,7 +20,7 @@ static DEFINE_MUTEX(nf_log_mutex);
20 20
21/* return EBUSY if somebody else is registered, EEXIST if the same logger 21/* return EBUSY if somebody else is registered, EEXIST if the same logger
22 * is registred, 0 on success. */ 22 * is registred, 0 on success. */
23int nf_log_register(int pf, const struct nf_logger *logger) 23int nf_log_register(u_int8_t pf, const struct nf_logger *logger)
24{ 24{
25 int ret; 25 int ret;
26 26
@@ -45,7 +45,7 @@ int nf_log_register(int pf, const struct nf_logger *logger)
45} 45}
46EXPORT_SYMBOL(nf_log_register); 46EXPORT_SYMBOL(nf_log_register);
47 47
48void nf_log_unregister_pf(int pf) 48void nf_log_unregister_pf(u_int8_t pf)
49{ 49{
50 if (pf >= NPROTO) 50 if (pf >= NPROTO)
51 return; 51 return;
@@ -73,7 +73,7 @@ void nf_log_unregister(const struct nf_logger *logger)
73} 73}
74EXPORT_SYMBOL(nf_log_unregister); 74EXPORT_SYMBOL(nf_log_unregister);
75 75
76void nf_log_packet(int pf, 76void nf_log_packet(u_int8_t pf,
77 unsigned int hooknum, 77 unsigned int hooknum,
78 const struct sk_buff *skb, 78 const struct sk_buff *skb,
79 const struct net_device *in, 79 const struct net_device *in,
diff --git a/net/netfilter/nf_queue.c b/net/netfilter/nf_queue.c
index 582ec3efc8a5..f285086f6292 100644
--- a/net/netfilter/nf_queue.c
+++ b/net/netfilter/nf_queue.c
@@ -22,7 +22,7 @@ static DEFINE_MUTEX(queue_handler_mutex);
22 22
23/* return EBUSY when somebody else is registered, return EEXIST if the 23/* return EBUSY when somebody else is registered, return EEXIST if the
24 * same handler is registered, return 0 in case of success. */ 24 * same handler is registered, return 0 in case of success. */
25int nf_register_queue_handler(int pf, const struct nf_queue_handler *qh) 25int nf_register_queue_handler(u_int8_t pf, const struct nf_queue_handler *qh)
26{ 26{
27 int ret; 27 int ret;
28 28
@@ -45,7 +45,7 @@ int nf_register_queue_handler(int pf, const struct nf_queue_handler *qh)
45EXPORT_SYMBOL(nf_register_queue_handler); 45EXPORT_SYMBOL(nf_register_queue_handler);
46 46
47/* The caller must flush their queue before this */ 47/* The caller must flush their queue before this */
48int nf_unregister_queue_handler(int pf, const struct nf_queue_handler *qh) 48int nf_unregister_queue_handler(u_int8_t pf, const struct nf_queue_handler *qh)
49{ 49{
50 if (pf >= NPROTO) 50 if (pf >= NPROTO)
51 return -EINVAL; 51 return -EINVAL;
@@ -67,7 +67,7 @@ EXPORT_SYMBOL(nf_unregister_queue_handler);
67 67
68void nf_unregister_queue_handlers(const struct nf_queue_handler *qh) 68void nf_unregister_queue_handlers(const struct nf_queue_handler *qh)
69{ 69{
70 int pf; 70 u_int8_t pf;
71 71
72 mutex_lock(&queue_handler_mutex); 72 mutex_lock(&queue_handler_mutex);
73 for (pf = 0; pf < NPROTO; pf++) { 73 for (pf = 0; pf < NPROTO; pf++) {
@@ -107,7 +107,7 @@ static void nf_queue_entry_release_refs(struct nf_queue_entry *entry)
107 */ 107 */
108static int __nf_queue(struct sk_buff *skb, 108static int __nf_queue(struct sk_buff *skb,
109 struct list_head *elem, 109 struct list_head *elem,
110 int pf, unsigned int hook, 110 u_int8_t pf, unsigned int hook,
111 struct net_device *indev, 111 struct net_device *indev,
112 struct net_device *outdev, 112 struct net_device *outdev,
113 int (*okfn)(struct sk_buff *), 113 int (*okfn)(struct sk_buff *),
@@ -191,7 +191,7 @@ err:
191 191
192int nf_queue(struct sk_buff *skb, 192int nf_queue(struct sk_buff *skb,
193 struct list_head *elem, 193 struct list_head *elem,
194 int pf, unsigned int hook, 194 u_int8_t pf, unsigned int hook,
195 struct net_device *indev, 195 struct net_device *indev,
196 struct net_device *outdev, 196 struct net_device *outdev,
197 int (*okfn)(struct sk_buff *), 197 int (*okfn)(struct sk_buff *),
diff --git a/net/netfilter/nf_sockopt.c b/net/netfilter/nf_sockopt.c
index 01489681fa96..f9b46de6a3db 100644
--- a/net/netfilter/nf_sockopt.c
+++ b/net/netfilter/nf_sockopt.c
@@ -60,7 +60,7 @@ void nf_unregister_sockopt(struct nf_sockopt_ops *reg)
60} 60}
61EXPORT_SYMBOL(nf_unregister_sockopt); 61EXPORT_SYMBOL(nf_unregister_sockopt);
62 62
63static struct nf_sockopt_ops *nf_sockopt_find(struct sock *sk, int pf, 63static struct nf_sockopt_ops *nf_sockopt_find(struct sock *sk, u_int8_t pf,
64 int val, int get) 64 int val, int get)
65{ 65{
66 struct nf_sockopt_ops *ops; 66 struct nf_sockopt_ops *ops;
@@ -96,7 +96,7 @@ out:
96} 96}
97 97
98/* Call get/setsockopt() */ 98/* Call get/setsockopt() */
99static int nf_sockopt(struct sock *sk, int pf, int val, 99static int nf_sockopt(struct sock *sk, u_int8_t pf, int val,
100 char __user *opt, int *len, int get) 100 char __user *opt, int *len, int get)
101{ 101{
102 struct nf_sockopt_ops *ops; 102 struct nf_sockopt_ops *ops;
@@ -115,21 +115,22 @@ static int nf_sockopt(struct sock *sk, int pf, int val,
115 return ret; 115 return ret;
116} 116}
117 117
118int nf_setsockopt(struct sock *sk, int pf, int val, char __user *opt, 118int nf_setsockopt(struct sock *sk, u_int8_t pf, int val, char __user *opt,
119 int len) 119 int len)
120{ 120{
121 return nf_sockopt(sk, pf, val, opt, &len, 0); 121 return nf_sockopt(sk, pf, val, opt, &len, 0);
122} 122}
123EXPORT_SYMBOL(nf_setsockopt); 123EXPORT_SYMBOL(nf_setsockopt);
124 124
125int nf_getsockopt(struct sock *sk, int pf, int val, char __user *opt, int *len) 125int nf_getsockopt(struct sock *sk, u_int8_t pf, int val, char __user *opt,
126 int *len)
126{ 127{
127 return nf_sockopt(sk, pf, val, opt, len, 1); 128 return nf_sockopt(sk, pf, val, opt, len, 1);
128} 129}
129EXPORT_SYMBOL(nf_getsockopt); 130EXPORT_SYMBOL(nf_getsockopt);
130 131
131#ifdef CONFIG_COMPAT 132#ifdef CONFIG_COMPAT
132static int compat_nf_sockopt(struct sock *sk, int pf, int val, 133static int compat_nf_sockopt(struct sock *sk, u_int8_t pf, int val,
133 char __user *opt, int *len, int get) 134 char __user *opt, int *len, int get)
134{ 135{
135 struct nf_sockopt_ops *ops; 136 struct nf_sockopt_ops *ops;
@@ -155,14 +156,14 @@ static int compat_nf_sockopt(struct sock *sk, int pf, int val,
155 return ret; 156 return ret;
156} 157}
157 158
158int compat_nf_setsockopt(struct sock *sk, int pf, 159int compat_nf_setsockopt(struct sock *sk, u_int8_t pf,
159 int val, char __user *opt, int len) 160 int val, char __user *opt, int len)
160{ 161{
161 return compat_nf_sockopt(sk, pf, val, opt, &len, 0); 162 return compat_nf_sockopt(sk, pf, val, opt, &len, 0);
162} 163}
163EXPORT_SYMBOL(compat_nf_setsockopt); 164EXPORT_SYMBOL(compat_nf_setsockopt);
164 165
165int compat_nf_getsockopt(struct sock *sk, int pf, 166int compat_nf_getsockopt(struct sock *sk, u_int8_t pf,
166 int val, char __user *opt, int *len) 167 int val, char __user *opt, int *len)
167{ 168{
168 return compat_nf_sockopt(sk, pf, val, opt, len, 1); 169 return compat_nf_sockopt(sk, pf, val, opt, len, 1);
diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c
index 9a35b57ab76d..41e0105d3828 100644
--- a/net/netfilter/nfnetlink_log.c
+++ b/net/netfilter/nfnetlink_log.c
@@ -359,7 +359,7 @@ static inline int
359__build_packet_message(struct nfulnl_instance *inst, 359__build_packet_message(struct nfulnl_instance *inst,
360 const struct sk_buff *skb, 360 const struct sk_buff *skb,
361 unsigned int data_len, 361 unsigned int data_len,
362 unsigned int pf, 362 u_int8_t pf,
363 unsigned int hooknum, 363 unsigned int hooknum,
364 const struct net_device *indev, 364 const struct net_device *indev,
365 const struct net_device *outdev, 365 const struct net_device *outdev,
@@ -534,7 +534,7 @@ static struct nf_loginfo default_loginfo = {
534 534
535/* log handler for internal netfilter logging api */ 535/* log handler for internal netfilter logging api */
536static void 536static void
537nfulnl_log_packet(unsigned int pf, 537nfulnl_log_packet(u_int8_t pf,
538 unsigned int hooknum, 538 unsigned int hooknum,
539 const struct sk_buff *skb, 539 const struct sk_buff *skb,
540 const struct net_device *in, 540 const struct net_device *in,
diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c
index 5d75cd86ebb3..cf2f3e90cef9 100644
--- a/net/netfilter/x_tables.c
+++ b/net/netfilter/x_tables.c
@@ -68,7 +68,8 @@ static const char *const xt_prefix[NPROTO] = {
68int 68int
69xt_register_target(struct xt_target *target) 69xt_register_target(struct xt_target *target)
70{ 70{
71 int ret, af = target->family; 71 u_int8_t af = target->family;
72 int ret;
72 73
73 ret = mutex_lock_interruptible(&xt[af].mutex); 74 ret = mutex_lock_interruptible(&xt[af].mutex);
74 if (ret != 0) 75 if (ret != 0)
@@ -82,7 +83,7 @@ EXPORT_SYMBOL(xt_register_target);
82void 83void
83xt_unregister_target(struct xt_target *target) 84xt_unregister_target(struct xt_target *target)
84{ 85{
85 int af = target->family; 86 u_int8_t af = target->family;
86 87
87 mutex_lock(&xt[af].mutex); 88 mutex_lock(&xt[af].mutex);
88 list_del(&target->list); 89 list_del(&target->list);
@@ -123,7 +124,8 @@ EXPORT_SYMBOL(xt_unregister_targets);
123int 124int
124xt_register_match(struct xt_match *match) 125xt_register_match(struct xt_match *match)
125{ 126{
126 int ret, af = match->family; 127 u_int8_t af = match->family;
128 int ret;
127 129
128 ret = mutex_lock_interruptible(&xt[af].mutex); 130 ret = mutex_lock_interruptible(&xt[af].mutex);
129 if (ret != 0) 131 if (ret != 0)
@@ -139,7 +141,7 @@ EXPORT_SYMBOL(xt_register_match);
139void 141void
140xt_unregister_match(struct xt_match *match) 142xt_unregister_match(struct xt_match *match)
141{ 143{
142 int af = match->family; 144 u_int8_t af = match->family;
143 145
144 mutex_lock(&xt[af].mutex); 146 mutex_lock(&xt[af].mutex);
145 list_del(&match->list); 147 list_del(&match->list);
@@ -185,7 +187,7 @@ EXPORT_SYMBOL(xt_unregister_matches);
185 */ 187 */
186 188
187/* Find match, grabs ref. Returns ERR_PTR() on error. */ 189/* Find match, grabs ref. Returns ERR_PTR() on error. */
188struct xt_match *xt_find_match(int af, const char *name, u8 revision) 190struct xt_match *xt_find_match(u8 af, const char *name, u8 revision)
189{ 191{
190 struct xt_match *m; 192 struct xt_match *m;
191 int err = 0; 193 int err = 0;
@@ -210,7 +212,7 @@ struct xt_match *xt_find_match(int af, const char *name, u8 revision)
210EXPORT_SYMBOL(xt_find_match); 212EXPORT_SYMBOL(xt_find_match);
211 213
212/* Find target, grabs ref. Returns ERR_PTR() on error. */ 214/* Find target, grabs ref. Returns ERR_PTR() on error. */
213struct xt_target *xt_find_target(int af, const char *name, u8 revision) 215struct xt_target *xt_find_target(u8 af, const char *name, u8 revision)
214{ 216{
215 struct xt_target *t; 217 struct xt_target *t;
216 int err = 0; 218 int err = 0;
@@ -234,7 +236,7 @@ struct xt_target *xt_find_target(int af, const char *name, u8 revision)
234} 236}
235EXPORT_SYMBOL(xt_find_target); 237EXPORT_SYMBOL(xt_find_target);
236 238
237struct xt_target *xt_request_find_target(int af, const char *name, u8 revision) 239struct xt_target *xt_request_find_target(u8 af, const char *name, u8 revision)
238{ 240{
239 struct xt_target *target; 241 struct xt_target *target;
240 242
@@ -246,7 +248,7 @@ struct xt_target *xt_request_find_target(int af, const char *name, u8 revision)
246} 248}
247EXPORT_SYMBOL_GPL(xt_request_find_target); 249EXPORT_SYMBOL_GPL(xt_request_find_target);
248 250
249static int match_revfn(int af, const char *name, u8 revision, int *bestp) 251static int match_revfn(u8 af, const char *name, u8 revision, int *bestp)
250{ 252{
251 const struct xt_match *m; 253 const struct xt_match *m;
252 int have_rev = 0; 254 int have_rev = 0;
@@ -262,7 +264,7 @@ static int match_revfn(int af, const char *name, u8 revision, int *bestp)
262 return have_rev; 264 return have_rev;
263} 265}
264 266
265static int target_revfn(int af, const char *name, u8 revision, int *bestp) 267static int target_revfn(u8 af, const char *name, u8 revision, int *bestp)
266{ 268{
267 const struct xt_target *t; 269 const struct xt_target *t;
268 int have_rev = 0; 270 int have_rev = 0;
@@ -279,7 +281,7 @@ static int target_revfn(int af, const char *name, u8 revision, int *bestp)
279} 281}
280 282
281/* Returns true or false (if no such extension at all) */ 283/* Returns true or false (if no such extension at all) */
282int xt_find_revision(int af, const char *name, u8 revision, int target, 284int xt_find_revision(u8 af, const char *name, u8 revision, int target,
283 int *err) 285 int *err)
284{ 286{
285 int have_rev, best = -1; 287 int have_rev, best = -1;
@@ -337,7 +339,7 @@ int xt_check_match(const struct xt_match *match, unsigned short family,
337EXPORT_SYMBOL_GPL(xt_check_match); 339EXPORT_SYMBOL_GPL(xt_check_match);
338 340
339#ifdef CONFIG_COMPAT 341#ifdef CONFIG_COMPAT
340int xt_compat_add_offset(int af, unsigned int offset, short delta) 342int xt_compat_add_offset(u_int8_t af, unsigned int offset, short delta)
341{ 343{
342 struct compat_delta *tmp; 344 struct compat_delta *tmp;
343 345
@@ -359,7 +361,7 @@ int xt_compat_add_offset(int af, unsigned int offset, short delta)
359} 361}
360EXPORT_SYMBOL_GPL(xt_compat_add_offset); 362EXPORT_SYMBOL_GPL(xt_compat_add_offset);
361 363
362void xt_compat_flush_offsets(int af) 364void xt_compat_flush_offsets(u_int8_t af)
363{ 365{
364 struct compat_delta *tmp, *next; 366 struct compat_delta *tmp, *next;
365 367
@@ -373,7 +375,7 @@ void xt_compat_flush_offsets(int af)
373} 375}
374EXPORT_SYMBOL_GPL(xt_compat_flush_offsets); 376EXPORT_SYMBOL_GPL(xt_compat_flush_offsets);
375 377
376short xt_compat_calc_jump(int af, unsigned int offset) 378short xt_compat_calc_jump(u_int8_t af, unsigned int offset)
377{ 379{
378 struct compat_delta *tmp; 380 struct compat_delta *tmp;
379 short delta; 381 short delta;
@@ -590,7 +592,8 @@ void xt_free_table_info(struct xt_table_info *info)
590EXPORT_SYMBOL(xt_free_table_info); 592EXPORT_SYMBOL(xt_free_table_info);
591 593
592/* Find table by name, grabs mutex & ref. Returns ERR_PTR() on error. */ 594/* Find table by name, grabs mutex & ref. Returns ERR_PTR() on error. */
593struct xt_table *xt_find_table_lock(struct net *net, int af, const char *name) 595struct xt_table *xt_find_table_lock(struct net *net, u_int8_t af,
596 const char *name)
594{ 597{
595 struct xt_table *t; 598 struct xt_table *t;
596 599
@@ -612,13 +615,13 @@ void xt_table_unlock(struct xt_table *table)
612EXPORT_SYMBOL_GPL(xt_table_unlock); 615EXPORT_SYMBOL_GPL(xt_table_unlock);
613 616
614#ifdef CONFIG_COMPAT 617#ifdef CONFIG_COMPAT
615void xt_compat_lock(int af) 618void xt_compat_lock(u_int8_t af)
616{ 619{
617 mutex_lock(&xt[af].compat_mutex); 620 mutex_lock(&xt[af].compat_mutex);
618} 621}
619EXPORT_SYMBOL_GPL(xt_compat_lock); 622EXPORT_SYMBOL_GPL(xt_compat_lock);
620 623
621void xt_compat_unlock(int af) 624void xt_compat_unlock(u_int8_t af)
622{ 625{
623 mutex_unlock(&xt[af].compat_mutex); 626 mutex_unlock(&xt[af].compat_mutex);
624} 627}
@@ -722,13 +725,13 @@ EXPORT_SYMBOL_GPL(xt_unregister_table);
722#ifdef CONFIG_PROC_FS 725#ifdef CONFIG_PROC_FS
723struct xt_names_priv { 726struct xt_names_priv {
724 struct seq_net_private p; 727 struct seq_net_private p;
725 int af; 728 u_int8_t af;
726}; 729};
727static void *xt_table_seq_start(struct seq_file *seq, loff_t *pos) 730static void *xt_table_seq_start(struct seq_file *seq, loff_t *pos)
728{ 731{
729 struct xt_names_priv *priv = seq->private; 732 struct xt_names_priv *priv = seq->private;
730 struct net *net = seq_file_net(seq); 733 struct net *net = seq_file_net(seq);
731 int af = priv->af; 734 u_int8_t af = priv->af;
732 735
733 mutex_lock(&xt[af].mutex); 736 mutex_lock(&xt[af].mutex);
734 return seq_list_start(&net->xt.tables[af], *pos); 737 return seq_list_start(&net->xt.tables[af], *pos);
@@ -738,7 +741,7 @@ static void *xt_table_seq_next(struct seq_file *seq, void *v, loff_t *pos)
738{ 741{
739 struct xt_names_priv *priv = seq->private; 742 struct xt_names_priv *priv = seq->private;
740 struct net *net = seq_file_net(seq); 743 struct net *net = seq_file_net(seq);
741 int af = priv->af; 744 u_int8_t af = priv->af;
742 745
743 return seq_list_next(v, &net->xt.tables[af], pos); 746 return seq_list_next(v, &net->xt.tables[af], pos);
744} 747}
@@ -746,7 +749,7 @@ static void *xt_table_seq_next(struct seq_file *seq, void *v, loff_t *pos)
746static void xt_table_seq_stop(struct seq_file *seq, void *v) 749static void xt_table_seq_stop(struct seq_file *seq, void *v)
747{ 750{
748 struct xt_names_priv *priv = seq->private; 751 struct xt_names_priv *priv = seq->private;
749 int af = priv->af; 752 u_int8_t af = priv->af;
750 753
751 mutex_unlock(&xt[af].mutex); 754 mutex_unlock(&xt[af].mutex);
752} 755}
@@ -922,7 +925,7 @@ static const struct file_operations xt_target_ops = {
922 925
923#endif /* CONFIG_PROC_FS */ 926#endif /* CONFIG_PROC_FS */
924 927
925int xt_proto_init(struct net *net, int af) 928int xt_proto_init(struct net *net, u_int8_t af)
926{ 929{
927#ifdef CONFIG_PROC_FS 930#ifdef CONFIG_PROC_FS
928 char buf[XT_FUNCTION_MAXNAMELEN]; 931 char buf[XT_FUNCTION_MAXNAMELEN];
@@ -974,7 +977,7 @@ out:
974} 977}
975EXPORT_SYMBOL_GPL(xt_proto_init); 978EXPORT_SYMBOL_GPL(xt_proto_init);
976 979
977void xt_proto_fini(struct net *net, int af) 980void xt_proto_fini(struct net *net, u_int8_t af)
978{ 981{
979#ifdef CONFIG_PROC_FS 982#ifdef CONFIG_PROC_FS
980 char buf[XT_FUNCTION_MAXNAMELEN]; 983 char buf[XT_FUNCTION_MAXNAMELEN];
diff --git a/net/netfilter/xt_connlimit.c b/net/netfilter/xt_connlimit.c
index 70907f6baac3..1655e2cf25c4 100644
--- a/net/netfilter/xt_connlimit.c
+++ b/net/netfilter/xt_connlimit.c
@@ -82,7 +82,7 @@ static inline bool already_closed(const struct nf_conn *conn)
82static inline unsigned int 82static inline unsigned int
83same_source_net(const union nf_inet_addr *addr, 83same_source_net(const union nf_inet_addr *addr,
84 const union nf_inet_addr *mask, 84 const union nf_inet_addr *mask,
85 const union nf_inet_addr *u3, unsigned int family) 85 const union nf_inet_addr *u3, u_int8_t family)
86{ 86{
87 if (family == AF_INET) { 87 if (family == AF_INET) {
88 return (addr->ip & mask->ip) == (u3->ip & mask->ip); 88 return (addr->ip & mask->ip) == (u3->ip & mask->ip);
diff --git a/net/netfilter/xt_conntrack.c b/net/netfilter/xt_conntrack.c
index d61412f58ef7..28a42a3fbff7 100644
--- a/net/netfilter/xt_conntrack.c
+++ b/net/netfilter/xt_conntrack.c
@@ -133,7 +133,7 @@ conntrack_addrcmp(const union nf_inet_addr *kaddr,
133static inline bool 133static inline bool
134conntrack_mt_origsrc(const struct nf_conn *ct, 134conntrack_mt_origsrc(const struct nf_conn *ct,
135 const struct xt_conntrack_mtinfo1 *info, 135 const struct xt_conntrack_mtinfo1 *info,
136 unsigned int family) 136 u_int8_t family)
137{ 137{
138 return conntrack_addrcmp(&ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.u3, 138 return conntrack_addrcmp(&ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.u3,
139 &info->origsrc_addr, &info->origsrc_mask, family); 139 &info->origsrc_addr, &info->origsrc_mask, family);
@@ -142,7 +142,7 @@ conntrack_mt_origsrc(const struct nf_conn *ct,
142static inline bool 142static inline bool
143conntrack_mt_origdst(const struct nf_conn *ct, 143conntrack_mt_origdst(const struct nf_conn *ct,
144 const struct xt_conntrack_mtinfo1 *info, 144 const struct xt_conntrack_mtinfo1 *info,
145 unsigned int family) 145 u_int8_t family)
146{ 146{
147 return conntrack_addrcmp(&ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.u3, 147 return conntrack_addrcmp(&ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.u3,
148 &info->origdst_addr, &info->origdst_mask, family); 148 &info->origdst_addr, &info->origdst_mask, family);
@@ -151,7 +151,7 @@ conntrack_mt_origdst(const struct nf_conn *ct,
151static inline bool 151static inline bool
152conntrack_mt_replsrc(const struct nf_conn *ct, 152conntrack_mt_replsrc(const struct nf_conn *ct,
153 const struct xt_conntrack_mtinfo1 *info, 153 const struct xt_conntrack_mtinfo1 *info,
154 unsigned int family) 154 u_int8_t family)
155{ 155{
156 return conntrack_addrcmp(&ct->tuplehash[IP_CT_DIR_REPLY].tuple.src.u3, 156 return conntrack_addrcmp(&ct->tuplehash[IP_CT_DIR_REPLY].tuple.src.u3,
157 &info->replsrc_addr, &info->replsrc_mask, family); 157 &info->replsrc_addr, &info->replsrc_mask, family);
@@ -160,7 +160,7 @@ conntrack_mt_replsrc(const struct nf_conn *ct,
160static inline bool 160static inline bool
161conntrack_mt_repldst(const struct nf_conn *ct, 161conntrack_mt_repldst(const struct nf_conn *ct,
162 const struct xt_conntrack_mtinfo1 *info, 162 const struct xt_conntrack_mtinfo1 *info,
163 unsigned int family) 163 u_int8_t family)
164{ 164{
165 return conntrack_addrcmp(&ct->tuplehash[IP_CT_DIR_REPLY].tuple.dst.u3, 165 return conntrack_addrcmp(&ct->tuplehash[IP_CT_DIR_REPLY].tuple.dst.u3,
166 &info->repldst_addr, &info->repldst_mask, family); 166 &info->repldst_addr, &info->repldst_mask, family);
diff --git a/net/netfilter/xt_hashlimit.c b/net/netfilter/xt_hashlimit.c
index d9418a267812..0c9268fd2e10 100644
--- a/net/netfilter/xt_hashlimit.c
+++ b/net/netfilter/xt_hashlimit.c
@@ -80,7 +80,7 @@ struct dsthash_ent {
80struct xt_hashlimit_htable { 80struct xt_hashlimit_htable {
81 struct hlist_node node; /* global list of all htables */ 81 struct hlist_node node; /* global list of all htables */
82 atomic_t use; 82 atomic_t use;
83 int family; 83 u_int8_t family;
84 84
85 struct hashlimit_cfg1 cfg; /* config */ 85 struct hashlimit_cfg1 cfg; /* config */
86 86
@@ -185,7 +185,7 @@ dsthash_free(struct xt_hashlimit_htable *ht, struct dsthash_ent *ent)
185} 185}
186static void htable_gc(unsigned long htlong); 186static void htable_gc(unsigned long htlong);
187 187
188static int htable_create_v0(struct xt_hashlimit_info *minfo, int family) 188static int htable_create_v0(struct xt_hashlimit_info *minfo, u_int8_t family)
189{ 189{
190 struct xt_hashlimit_htable *hinfo; 190 struct xt_hashlimit_htable *hinfo;
191 unsigned int size; 191 unsigned int size;
@@ -258,8 +258,7 @@ static int htable_create_v0(struct xt_hashlimit_info *minfo, int family)
258 return 0; 258 return 0;
259} 259}
260 260
261static int htable_create(struct xt_hashlimit_mtinfo1 *minfo, 261static int htable_create(struct xt_hashlimit_mtinfo1 *minfo, u_int8_t family)
262 unsigned int family)
263{ 262{
264 struct xt_hashlimit_htable *hinfo; 263 struct xt_hashlimit_htable *hinfo;
265 unsigned int size; 264 unsigned int size;
@@ -378,7 +377,7 @@ static void htable_destroy(struct xt_hashlimit_htable *hinfo)
378} 377}
379 378
380static struct xt_hashlimit_htable *htable_find_get(const char *name, 379static struct xt_hashlimit_htable *htable_find_get(const char *name,
381 int family) 380 u_int8_t family)
382{ 381{
383 struct xt_hashlimit_htable *hinfo; 382 struct xt_hashlimit_htable *hinfo;
384 struct hlist_node *pos; 383 struct hlist_node *pos;
@@ -901,7 +900,7 @@ static void dl_seq_stop(struct seq_file *s, void *v)
901 spin_unlock_bh(&htable->lock); 900 spin_unlock_bh(&htable->lock);
902} 901}
903 902
904static int dl_seq_real_show(struct dsthash_ent *ent, int family, 903static int dl_seq_real_show(struct dsthash_ent *ent, u_int8_t family,
905 struct seq_file *s) 904 struct seq_file *s)
906{ 905{
907 /* recalculate to show accurate numbers */ 906 /* recalculate to show accurate numbers */