aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMartin Josefsson <gandalf@wlug.westbo.se>2006-11-28 20:35:06 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 00:31:09 -0500
commit605dcad6c85226e6d43387917b329d65b95cef39 (patch)
treee18d19e93a9c1dcf268fb1ed8e91246c3440ba5b /include
parente2b7606cdb602a4f69c02cfc8bebe9c63b595e24 (diff)
[NETFILTER]: nf_conntrack: rename struct nf_conntrack_protocol
Rename 'struct nf_conntrack_protocol' to 'struct nf_conntrack_l4proto' in order to help distinguish it from 'struct nf_conntrack_l3proto'. It gets rather confusing with 'nf_conntrack_protocol'. Signed-off-by: Martin Josefsson <gandalf@wlug.westbo.se> Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/netfilter/nf_conntrack_core.h10
-rw-r--r--include/net/netfilter/nf_conntrack_l3proto.h4
-rw-r--r--include/net/netfilter/nf_conntrack_l4proto.h (renamed from include/net/netfilter/nf_conntrack_protocol.h)36
3 files changed, 25 insertions, 25 deletions
diff --git a/include/net/netfilter/nf_conntrack_core.h b/include/net/netfilter/nf_conntrack_core.h
index 4676b492d635..7fdc72c01356 100644
--- a/include/net/netfilter/nf_conntrack_core.h
+++ b/include/net/netfilter/nf_conntrack_core.h
@@ -14,7 +14,7 @@
14 14
15#include <linux/netfilter.h> 15#include <linux/netfilter.h>
16#include <net/netfilter/nf_conntrack_l3proto.h> 16#include <net/netfilter/nf_conntrack_l3proto.h>
17#include <net/netfilter/nf_conntrack_protocol.h> 17#include <net/netfilter/nf_conntrack_l4proto.h>
18#include <net/netfilter/nf_conntrack_ecache.h> 18#include <net/netfilter/nf_conntrack_ecache.h>
19 19
20/* This header is used to share core functionality between the 20/* This header is used to share core functionality between the
@@ -32,7 +32,7 @@ extern struct nf_conntrack_l3proto *nf_ct_find_l3proto(u_int16_t pf);
32/* Like above, but you already have conntrack read lock. */ 32/* Like above, but you already have conntrack read lock. */
33extern struct nf_conntrack_l3proto *__nf_ct_find_l3proto(u_int16_t l3proto); 33extern struct nf_conntrack_l3proto *__nf_ct_find_l3proto(u_int16_t l3proto);
34 34
35struct nf_conntrack_protocol; 35struct nf_conntrack_l4proto;
36 36
37extern int 37extern int
38nf_ct_get_tuple(const struct sk_buff *skb, 38nf_ct_get_tuple(const struct sk_buff *skb,
@@ -42,13 +42,13 @@ nf_ct_get_tuple(const struct sk_buff *skb,
42 u_int8_t protonum, 42 u_int8_t protonum,
43 struct nf_conntrack_tuple *tuple, 43 struct nf_conntrack_tuple *tuple,
44 const struct nf_conntrack_l3proto *l3proto, 44 const struct nf_conntrack_l3proto *l3proto,
45 const struct nf_conntrack_protocol *protocol); 45 const struct nf_conntrack_l4proto *l4proto);
46 46
47extern int 47extern int
48nf_ct_invert_tuple(struct nf_conntrack_tuple *inverse, 48nf_ct_invert_tuple(struct nf_conntrack_tuple *inverse,
49 const struct nf_conntrack_tuple *orig, 49 const struct nf_conntrack_tuple *orig,
50 const struct nf_conntrack_l3proto *l3proto, 50 const struct nf_conntrack_l3proto *l3proto,
51 const struct nf_conntrack_protocol *protocol); 51 const struct nf_conntrack_l4proto *l4proto);
52 52
53/* Find a connection corresponding to a tuple. */ 53/* Find a connection corresponding to a tuple. */
54extern struct nf_conntrack_tuple_hash * 54extern struct nf_conntrack_tuple_hash *
@@ -76,7 +76,7 @@ extern void __nf_conntrack_attach(struct sk_buff *nskb, struct sk_buff *skb);
76int 76int
77print_tuple(struct seq_file *s, const struct nf_conntrack_tuple *tuple, 77print_tuple(struct seq_file *s, const struct nf_conntrack_tuple *tuple,
78 struct nf_conntrack_l3proto *l3proto, 78 struct nf_conntrack_l3proto *l3proto,
79 struct nf_conntrack_protocol *proto); 79 struct nf_conntrack_l4proto *proto);
80 80
81extern struct list_head *nf_conntrack_hash; 81extern struct list_head *nf_conntrack_hash;
82extern struct list_head nf_conntrack_expect_list; 82extern struct list_head nf_conntrack_expect_list;
diff --git a/include/net/netfilter/nf_conntrack_l3proto.h b/include/net/netfilter/nf_conntrack_l3proto.h
index dac43b15a5b0..ffe23a1e0b97 100644
--- a/include/net/netfilter/nf_conntrack_l3proto.h
+++ b/include/net/netfilter/nf_conntrack_l3proto.h
@@ -96,13 +96,13 @@ extern void nf_ct_l3proto_put(struct nf_conntrack_l3proto *p);
96/* Existing built-in protocols */ 96/* Existing built-in protocols */
97extern struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv4; 97extern struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv4;
98extern struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv6; 98extern struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv6;
99extern struct nf_conntrack_l3proto nf_conntrack_generic_l3proto; 99extern struct nf_conntrack_l3proto nf_conntrack_l3proto_generic;
100 100
101static inline struct nf_conntrack_l3proto * 101static inline struct nf_conntrack_l3proto *
102__nf_ct_l3proto_find(u_int16_t l3proto) 102__nf_ct_l3proto_find(u_int16_t l3proto)
103{ 103{
104 if (unlikely(l3proto >= AF_MAX)) 104 if (unlikely(l3proto >= AF_MAX))
105 return &nf_conntrack_generic_l3proto; 105 return &nf_conntrack_l3proto_generic;
106 return nf_ct_l3protos[l3proto]; 106 return nf_ct_l3protos[l3proto];
107} 107}
108 108
diff --git a/include/net/netfilter/nf_conntrack_protocol.h b/include/net/netfilter/nf_conntrack_l4proto.h
index 1f33737fcea5..0c6babd54396 100644
--- a/include/net/netfilter/nf_conntrack_protocol.h
+++ b/include/net/netfilter/nf_conntrack_l4proto.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Header for use in defining a given protocol for connection tracking. 2 * Header for use in defining a given L4 protocol for connection tracking.
3 * 3 *
4 * 16 Dec 2003: Yasuyuki Kozakai @USAGI <yasuyuki.kozakai@toshiba.co.jp> 4 * 16 Dec 2003: Yasuyuki Kozakai @USAGI <yasuyuki.kozakai@toshiba.co.jp>
5 * - generalized L3 protocol dependent part. 5 * - generalized L3 protocol dependent part.
@@ -7,14 +7,14 @@
7 * Derived from include/linux/netfiter_ipv4/ip_conntrack_protcol.h 7 * Derived from include/linux/netfiter_ipv4/ip_conntrack_protcol.h
8 */ 8 */
9 9
10#ifndef _NF_CONNTRACK_PROTOCOL_H 10#ifndef _NF_CONNTRACK_L4PROTO_H
11#define _NF_CONNTRACK_PROTOCOL_H 11#define _NF_CONNTRACK_L4PROTO_H
12#include <net/netfilter/nf_conntrack.h> 12#include <net/netfilter/nf_conntrack.h>
13 13
14struct seq_file; 14struct seq_file;
15struct nfattr; 15struct nfattr;
16 16
17struct nf_conntrack_protocol 17struct nf_conntrack_l4proto
18{ 18{
19 /* Next pointer. */ 19 /* Next pointer. */
20 struct list_head list; 20 struct list_head list;
@@ -22,8 +22,8 @@ struct nf_conntrack_protocol
22 /* L3 Protocol number. */ 22 /* L3 Protocol number. */
23 u_int16_t l3proto; 23 u_int16_t l3proto;
24 24
25 /* Protocol number. */ 25 /* L4 Protocol number. */
26 u_int8_t proto; 26 u_int8_t l4proto;
27 27
28 /* Protocol name */ 28 /* Protocol name */
29 const char *name; 29 const char *name;
@@ -84,25 +84,25 @@ struct nf_conntrack_protocol
84}; 84};
85 85
86/* Existing built-in protocols */ 86/* Existing built-in protocols */
87extern struct nf_conntrack_protocol nf_conntrack_protocol_tcp6; 87extern struct nf_conntrack_l4proto nf_conntrack_l4proto_tcp6;
88extern struct nf_conntrack_protocol nf_conntrack_protocol_udp4; 88extern struct nf_conntrack_l4proto nf_conntrack_l4proto_udp4;
89extern struct nf_conntrack_protocol nf_conntrack_protocol_udp6; 89extern struct nf_conntrack_l4proto nf_conntrack_l4proto_udp6;
90extern struct nf_conntrack_protocol nf_conntrack_generic_protocol; 90extern struct nf_conntrack_l4proto nf_conntrack_l4proto_generic;
91 91
92#define MAX_NF_CT_PROTO 256 92#define MAX_NF_CT_PROTO 256
93extern struct nf_conntrack_protocol **nf_ct_protos[PF_MAX]; 93extern struct nf_conntrack_l4proto **nf_ct_protos[PF_MAX];
94 94
95extern struct nf_conntrack_protocol * 95extern struct nf_conntrack_l4proto *
96__nf_ct_proto_find(u_int16_t l3proto, u_int8_t protocol); 96__nf_ct_l4proto_find(u_int16_t l3proto, u_int8_t l4proto);
97 97
98extern struct nf_conntrack_protocol * 98extern struct nf_conntrack_l4proto *
99nf_ct_proto_find_get(u_int16_t l3proto, u_int8_t protocol); 99nf_ct_l4proto_find_get(u_int16_t l3proto, u_int8_t protocol);
100 100
101extern void nf_ct_proto_put(struct nf_conntrack_protocol *p); 101extern void nf_ct_l4proto_put(struct nf_conntrack_l4proto *p);
102 102
103/* Protocol registration. */ 103/* Protocol registration. */
104extern int nf_conntrack_protocol_register(struct nf_conntrack_protocol *proto); 104extern int nf_conntrack_l4proto_register(struct nf_conntrack_l4proto *proto);
105extern void nf_conntrack_protocol_unregister(struct nf_conntrack_protocol *proto); 105extern void nf_conntrack_l4proto_unregister(struct nf_conntrack_l4proto *proto);
106 106
107/* Generic netlink helpers */ 107/* Generic netlink helpers */
108extern int nf_ct_port_tuple_to_nfattr(struct sk_buff *skb, 108extern int nf_ct_port_tuple_to_nfattr(struct sk_buff *skb,