diff options
| author | Herbert Xu <herbert@gondor.apana.org.au> | 2007-10-15 03:53:15 -0400 |
|---|---|---|
| committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-15 15:26:29 -0400 |
| commit | 3db05fea51cdb162cfa8f69e9cfb9e228919d2a9 (patch) | |
| tree | 0d0e4c18cdf2dcb7321035f6614628a2ddfb502d /include/net | |
| parent | 2ca7b0ac022aa0158599178fe1056b1ba9ec8b97 (diff) | |
[NETFILTER]: Replace sk_buff ** with sk_buff *
With all the users of the double pointers removed, this patch mops up by
finally replacing all occurances of sk_buff ** in the netfilter API by
sk_buff *.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
| -rw-r--r-- | include/net/ip_vs.h | 12 | ||||
| -rw-r--r-- | include/net/netfilter/nf_conntrack_core.h | 10 | ||||
| -rw-r--r-- | include/net/netfilter/nf_conntrack_helper.h | 2 | ||||
| -rw-r--r-- | include/net/netfilter/nf_nat_core.h | 4 | ||||
| -rw-r--r-- | include/net/netfilter/nf_nat_helper.h | 6 | ||||
| -rw-r--r-- | include/net/netfilter/nf_nat_protocol.h | 2 | ||||
| -rw-r--r-- | include/net/netfilter/nf_nat_rule.h | 2 |
7 files changed, 19 insertions, 19 deletions
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index 5da3b4a40a..41870564df 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h | |||
| @@ -464,10 +464,10 @@ struct ip_vs_protocol { | |||
| 464 | unsigned int proto_off, | 464 | unsigned int proto_off, |
| 465 | int inverse); | 465 | int inverse); |
| 466 | 466 | ||
| 467 | int (*snat_handler)(struct sk_buff **pskb, | 467 | int (*snat_handler)(struct sk_buff *skb, |
| 468 | struct ip_vs_protocol *pp, struct ip_vs_conn *cp); | 468 | struct ip_vs_protocol *pp, struct ip_vs_conn *cp); |
| 469 | 469 | ||
| 470 | int (*dnat_handler)(struct sk_buff **pskb, | 470 | int (*dnat_handler)(struct sk_buff *skb, |
| 471 | struct ip_vs_protocol *pp, struct ip_vs_conn *cp); | 471 | struct ip_vs_protocol *pp, struct ip_vs_conn *cp); |
| 472 | 472 | ||
| 473 | int (*csum_check)(struct sk_buff *skb, struct ip_vs_protocol *pp); | 473 | int (*csum_check)(struct sk_buff *skb, struct ip_vs_protocol *pp); |
| @@ -654,11 +654,11 @@ struct ip_vs_app | |||
| 654 | 654 | ||
| 655 | /* output hook: return false if can't linearize. diff set for TCP. */ | 655 | /* output hook: return false if can't linearize. diff set for TCP. */ |
| 656 | int (*pkt_out)(struct ip_vs_app *, struct ip_vs_conn *, | 656 | int (*pkt_out)(struct ip_vs_app *, struct ip_vs_conn *, |
| 657 | struct sk_buff **, int *diff); | 657 | struct sk_buff *, int *diff); |
| 658 | 658 | ||
| 659 | /* input hook: return false if can't linearize. diff set for TCP. */ | 659 | /* input hook: return false if can't linearize. diff set for TCP. */ |
| 660 | int (*pkt_in)(struct ip_vs_app *, struct ip_vs_conn *, | 660 | int (*pkt_in)(struct ip_vs_app *, struct ip_vs_conn *, |
| 661 | struct sk_buff **, int *diff); | 661 | struct sk_buff *, int *diff); |
| 662 | 662 | ||
| 663 | /* ip_vs_app initializer */ | 663 | /* ip_vs_app initializer */ |
| 664 | int (*init_conn)(struct ip_vs_app *, struct ip_vs_conn *); | 664 | int (*init_conn)(struct ip_vs_app *, struct ip_vs_conn *); |
| @@ -832,8 +832,8 @@ register_ip_vs_app_inc(struct ip_vs_app *app, __u16 proto, __u16 port); | |||
| 832 | extern int ip_vs_app_inc_get(struct ip_vs_app *inc); | 832 | extern int ip_vs_app_inc_get(struct ip_vs_app *inc); |
| 833 | extern void ip_vs_app_inc_put(struct ip_vs_app *inc); | 833 | extern void ip_vs_app_inc_put(struct ip_vs_app *inc); |
| 834 | 834 | ||
| 835 | extern int ip_vs_app_pkt_out(struct ip_vs_conn *, struct sk_buff **pskb); | 835 | extern int ip_vs_app_pkt_out(struct ip_vs_conn *, struct sk_buff *skb); |
| 836 | extern int ip_vs_app_pkt_in(struct ip_vs_conn *, struct sk_buff **pskb); | 836 | extern int ip_vs_app_pkt_in(struct ip_vs_conn *, struct sk_buff *skb); |
| 837 | extern int ip_vs_skb_replace(struct sk_buff *skb, gfp_t pri, | 837 | extern int ip_vs_skb_replace(struct sk_buff *skb, gfp_t pri, |
| 838 | char *o_buf, int o_len, char *n_buf, int n_len); | 838 | char *o_buf, int o_len, char *n_buf, int n_len); |
| 839 | extern int ip_vs_app_init(void); | 839 | extern int ip_vs_app_init(void); |
diff --git a/include/net/netfilter/nf_conntrack_core.h b/include/net/netfilter/nf_conntrack_core.h index 4056f5f08d..a532e7b5ed 100644 --- a/include/net/netfilter/nf_conntrack_core.h +++ b/include/net/netfilter/nf_conntrack_core.h | |||
| @@ -22,7 +22,7 @@ | |||
| 22 | of connection tracking. */ | 22 | of connection tracking. */ |
| 23 | extern unsigned int nf_conntrack_in(int pf, | 23 | extern unsigned int nf_conntrack_in(int pf, |
| 24 | unsigned int hooknum, | 24 | unsigned int hooknum, |
| 25 | struct sk_buff **pskb); | 25 | struct sk_buff *skb); |
| 26 | 26 | ||
| 27 | extern int nf_conntrack_init(void); | 27 | extern int nf_conntrack_init(void); |
| 28 | extern void nf_conntrack_cleanup(void); | 28 | extern void nf_conntrack_cleanup(void); |
| @@ -60,17 +60,17 @@ nf_ct_invert_tuple(struct nf_conntrack_tuple *inverse, | |||
| 60 | extern struct nf_conntrack_tuple_hash * | 60 | extern struct nf_conntrack_tuple_hash * |
| 61 | nf_conntrack_find_get(const struct nf_conntrack_tuple *tuple); | 61 | nf_conntrack_find_get(const struct nf_conntrack_tuple *tuple); |
| 62 | 62 | ||
| 63 | extern int __nf_conntrack_confirm(struct sk_buff **pskb); | 63 | extern int __nf_conntrack_confirm(struct sk_buff *skb); |
| 64 | 64 | ||
| 65 | /* Confirm a connection: returns NF_DROP if packet must be dropped. */ | 65 | /* Confirm a connection: returns NF_DROP if packet must be dropped. */ |
| 66 | static inline int nf_conntrack_confirm(struct sk_buff **pskb) | 66 | static inline int nf_conntrack_confirm(struct sk_buff *skb) |
| 67 | { | 67 | { |
| 68 | struct nf_conn *ct = (struct nf_conn *)(*pskb)->nfct; | 68 | struct nf_conn *ct = (struct nf_conn *)skb->nfct; |
| 69 | int ret = NF_ACCEPT; | 69 | int ret = NF_ACCEPT; |
| 70 | 70 | ||
| 71 | if (ct) { | 71 | if (ct) { |
| 72 | if (!nf_ct_is_confirmed(ct) && !nf_ct_is_dying(ct)) | 72 | if (!nf_ct_is_confirmed(ct) && !nf_ct_is_dying(ct)) |
| 73 | ret = __nf_conntrack_confirm(pskb); | 73 | ret = __nf_conntrack_confirm(skb); |
| 74 | nf_ct_deliver_cached_events(ct); | 74 | nf_ct_deliver_cached_events(ct); |
| 75 | } | 75 | } |
| 76 | return ret; | 76 | return ret; |
diff --git a/include/net/netfilter/nf_conntrack_helper.h b/include/net/netfilter/nf_conntrack_helper.h index 0dcc4c828c..d7b2d5483a 100644 --- a/include/net/netfilter/nf_conntrack_helper.h +++ b/include/net/netfilter/nf_conntrack_helper.h | |||
| @@ -29,7 +29,7 @@ struct nf_conntrack_helper | |||
| 29 | 29 | ||
| 30 | /* Function to call when data passes; return verdict, or -1 to | 30 | /* Function to call when data passes; return verdict, or -1 to |
| 31 | invalidate. */ | 31 | invalidate. */ |
| 32 | int (*help)(struct sk_buff **pskb, | 32 | int (*help)(struct sk_buff *skb, |
| 33 | unsigned int protoff, | 33 | unsigned int protoff, |
| 34 | struct nf_conn *ct, | 34 | struct nf_conn *ct, |
| 35 | enum ip_conntrack_info conntrackinfo); | 35 | enum ip_conntrack_info conntrackinfo); |
diff --git a/include/net/netfilter/nf_nat_core.h b/include/net/netfilter/nf_nat_core.h index c3cd127ba4..f29eeb9777 100644 --- a/include/net/netfilter/nf_nat_core.h +++ b/include/net/netfilter/nf_nat_core.h | |||
| @@ -10,12 +10,12 @@ | |||
| 10 | extern unsigned int nf_nat_packet(struct nf_conn *ct, | 10 | extern unsigned int nf_nat_packet(struct nf_conn *ct, |
| 11 | enum ip_conntrack_info ctinfo, | 11 | enum ip_conntrack_info ctinfo, |
| 12 | unsigned int hooknum, | 12 | unsigned int hooknum, |
| 13 | struct sk_buff **pskb); | 13 | struct sk_buff *skb); |
| 14 | 14 | ||
| 15 | extern int nf_nat_icmp_reply_translation(struct nf_conn *ct, | 15 | extern int nf_nat_icmp_reply_translation(struct nf_conn *ct, |
| 16 | enum ip_conntrack_info ctinfo, | 16 | enum ip_conntrack_info ctinfo, |
| 17 | unsigned int hooknum, | 17 | unsigned int hooknum, |
| 18 | struct sk_buff **pskb); | 18 | struct sk_buff *skb); |
| 19 | 19 | ||
| 20 | static inline int nf_nat_initialized(struct nf_conn *ct, | 20 | static inline int nf_nat_initialized(struct nf_conn *ct, |
| 21 | enum nf_nat_manip_type manip) | 21 | enum nf_nat_manip_type manip) |
diff --git a/include/net/netfilter/nf_nat_helper.h b/include/net/netfilter/nf_nat_helper.h index ec98ecf95f..58dd226879 100644 --- a/include/net/netfilter/nf_nat_helper.h +++ b/include/net/netfilter/nf_nat_helper.h | |||
| @@ -7,21 +7,21 @@ | |||
| 7 | struct sk_buff; | 7 | struct sk_buff; |
| 8 | 8 | ||
| 9 | /* These return true or false. */ | 9 | /* These return true or false. */ |
| 10 | extern int nf_nat_mangle_tcp_packet(struct sk_buff **skb, | 10 | extern int nf_nat_mangle_tcp_packet(struct sk_buff *skb, |
| 11 | struct nf_conn *ct, | 11 | struct nf_conn *ct, |
| 12 | enum ip_conntrack_info ctinfo, | 12 | enum ip_conntrack_info ctinfo, |
| 13 | unsigned int match_offset, | 13 | unsigned int match_offset, |
| 14 | unsigned int match_len, | 14 | unsigned int match_len, |
| 15 | const char *rep_buffer, | 15 | const char *rep_buffer, |
| 16 | unsigned int rep_len); | 16 | unsigned int rep_len); |
| 17 | extern int nf_nat_mangle_udp_packet(struct sk_buff **skb, | 17 | extern int nf_nat_mangle_udp_packet(struct sk_buff *skb, |
| 18 | struct nf_conn *ct, | 18 | struct nf_conn *ct, |
| 19 | enum ip_conntrack_info ctinfo, | 19 | enum ip_conntrack_info ctinfo, |
| 20 | unsigned int match_offset, | 20 | unsigned int match_offset, |
| 21 | unsigned int match_len, | 21 | unsigned int match_len, |
| 22 | const char *rep_buffer, | 22 | const char *rep_buffer, |
| 23 | unsigned int rep_len); | 23 | unsigned int rep_len); |
| 24 | extern int nf_nat_seq_adjust(struct sk_buff **pskb, | 24 | extern int nf_nat_seq_adjust(struct sk_buff *skb, |
| 25 | struct nf_conn *ct, | 25 | struct nf_conn *ct, |
| 26 | enum ip_conntrack_info ctinfo); | 26 | enum ip_conntrack_info ctinfo); |
| 27 | 27 | ||
diff --git a/include/net/netfilter/nf_nat_protocol.h b/include/net/netfilter/nf_nat_protocol.h index 14c7b2d726..04578bfe23 100644 --- a/include/net/netfilter/nf_nat_protocol.h +++ b/include/net/netfilter/nf_nat_protocol.h | |||
| @@ -18,7 +18,7 @@ struct nf_nat_protocol | |||
| 18 | 18 | ||
| 19 | /* Translate a packet to the target according to manip type. | 19 | /* Translate a packet to the target according to manip type. |
| 20 | Return true if succeeded. */ | 20 | Return true if succeeded. */ |
| 21 | int (*manip_pkt)(struct sk_buff **pskb, | 21 | int (*manip_pkt)(struct sk_buff *skb, |
| 22 | unsigned int iphdroff, | 22 | unsigned int iphdroff, |
| 23 | const struct nf_conntrack_tuple *tuple, | 23 | const struct nf_conntrack_tuple *tuple, |
| 24 | enum nf_nat_manip_type maniptype); | 24 | enum nf_nat_manip_type maniptype); |
diff --git a/include/net/netfilter/nf_nat_rule.h b/include/net/netfilter/nf_nat_rule.h index f9743187d5..75d1825031 100644 --- a/include/net/netfilter/nf_nat_rule.h +++ b/include/net/netfilter/nf_nat_rule.h | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | 6 | ||
| 7 | extern int nf_nat_rule_init(void) __init; | 7 | extern int nf_nat_rule_init(void) __init; |
| 8 | extern void nf_nat_rule_cleanup(void); | 8 | extern void nf_nat_rule_cleanup(void); |
| 9 | extern int nf_nat_rule_find(struct sk_buff **pskb, | 9 | extern int nf_nat_rule_find(struct sk_buff *skb, |
| 10 | unsigned int hooknum, | 10 | unsigned int hooknum, |
| 11 | const struct net_device *in, | 11 | const struct net_device *in, |
| 12 | const struct net_device *out, | 12 | const struct net_device *out, |
