diff options
| author | Jing Min Zhao <zhaojingmin@users.sourceforge.net> | 2006-04-06 17:13:42 -0400 |
|---|---|---|
| committer | David S. Miller <davem@sunset.davemloft.net> | 2006-04-10 01:25:35 -0400 |
| commit | 48bfee5fad0e46f4f18d46285efceba39e897482 (patch) | |
| tree | f527020c7163d519fdc6fd6d38f9473b6ce739bf | |
| parent | 32292a7ff1d9306841a8da6ea286847b1070cc6a (diff) | |
[NETFILTER]: H.323 helper: move some function prototypes to ip_conntrack_h323.h
Move prototypes of NAT callbacks to ip_conntrack_h323.h. Because the
use of typedefs as arguments, some header files need to be moved as
well.
Signed-off-by: Jing Min Zhao <zhaojingmin@users.sourceforge.net>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
| -rw-r--r-- | include/linux/netfilter_ipv4/ip_conntrack_h323.h | 52 | ||||
| -rw-r--r-- | include/linux/netfilter_ipv4/ip_conntrack_helper_h323_asn1.h (renamed from net/ipv4/netfilter/ip_conntrack_helper_h323_asn1.h) | 0 | ||||
| -rw-r--r-- | include/linux/netfilter_ipv4/ip_conntrack_helper_h323_types.h (renamed from net/ipv4/netfilter/ip_conntrack_helper_h323_types.h) | 0 | ||||
| -rw-r--r-- | net/ipv4/netfilter/ip_conntrack_helper_h323.c | 2 | ||||
| -rw-r--r-- | net/ipv4/netfilter/ip_conntrack_helper_h323_asn1.c | 2 | ||||
| -rw-r--r-- | net/ipv4/netfilter/ip_nat_helper_h323.c | 53 |
6 files changed, 53 insertions, 56 deletions
diff --git a/include/linux/netfilter_ipv4/ip_conntrack_h323.h b/include/linux/netfilter_ipv4/ip_conntrack_h323.h index 0987cea538..eace86bd2a 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack_h323.h +++ b/include/linux/netfilter_ipv4/ip_conntrack_h323.h | |||
| @@ -3,6 +3,8 @@ | |||
| 3 | 3 | ||
| 4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
| 5 | 5 | ||
| 6 | #include <linux/netfilter_ipv4/ip_conntrack_helper_h323_asn1.h> | ||
| 7 | |||
| 6 | #define RAS_PORT 1719 | 8 | #define RAS_PORT 1719 |
| 7 | #define Q931_PORT 1720 | 9 | #define Q931_PORT 1720 |
| 8 | #define H323_RTP_CHANNEL_MAX 4 /* Audio, video, FAX and other */ | 10 | #define H323_RTP_CHANNEL_MAX 4 /* Audio, video, FAX and other */ |
| @@ -25,6 +27,56 @@ struct ip_ct_h323_master { | |||
| 25 | }; | 27 | }; |
| 26 | }; | 28 | }; |
| 27 | 29 | ||
| 30 | struct ip_conntrack_expect; | ||
| 31 | |||
| 32 | extern int get_h225_addr(unsigned char *data, TransportAddress * addr, | ||
| 33 | u_int32_t * ip, u_int16_t * port); | ||
| 34 | extern void ip_conntrack_h245_expect(struct ip_conntrack *new, | ||
| 35 | struct ip_conntrack_expect *this); | ||
| 36 | extern void ip_conntrack_q931_expect(struct ip_conntrack *new, | ||
| 37 | struct ip_conntrack_expect *this); | ||
| 38 | extern int (*set_h245_addr_hook) (struct sk_buff ** pskb, | ||
| 39 | unsigned char **data, int dataoff, | ||
| 40 | H245_TransportAddress * addr, | ||
| 41 | u_int32_t ip, u_int16_t port); | ||
| 42 | extern int (*set_h225_addr_hook) (struct sk_buff ** pskb, | ||
| 43 | unsigned char **data, int dataoff, | ||
| 44 | TransportAddress * addr, | ||
| 45 | u_int32_t ip, u_int16_t port); | ||
| 46 | extern int (*set_sig_addr_hook) (struct sk_buff ** pskb, | ||
| 47 | struct ip_conntrack * ct, | ||
| 48 | enum ip_conntrack_info ctinfo, | ||
| 49 | unsigned char **data, | ||
| 50 | TransportAddress * addr, int count); | ||
| 51 | extern int (*set_ras_addr_hook) (struct sk_buff ** pskb, | ||
| 52 | struct ip_conntrack * ct, | ||
| 53 | enum ip_conntrack_info ctinfo, | ||
| 54 | unsigned char **data, | ||
| 55 | TransportAddress * addr, int count); | ||
| 56 | extern int (*nat_rtp_rtcp_hook) (struct sk_buff ** pskb, | ||
| 57 | struct ip_conntrack * ct, | ||
| 58 | enum ip_conntrack_info ctinfo, | ||
| 59 | unsigned char **data, int dataoff, | ||
| 60 | H245_TransportAddress * addr, | ||
| 61 | u_int16_t port, u_int16_t rtp_port, | ||
| 62 | struct ip_conntrack_expect * rtp_exp, | ||
| 63 | struct ip_conntrack_expect * rtcp_exp); | ||
| 64 | extern int (*nat_t120_hook) (struct sk_buff ** pskb, struct ip_conntrack * ct, | ||
| 65 | enum ip_conntrack_info ctinfo, | ||
| 66 | unsigned char **data, int dataoff, | ||
| 67 | H245_TransportAddress * addr, u_int16_t port, | ||
| 68 | struct ip_conntrack_expect * exp); | ||
| 69 | extern int (*nat_h245_hook) (struct sk_buff ** pskb, struct ip_conntrack * ct, | ||
| 70 | enum ip_conntrack_info ctinfo, | ||
| 71 | unsigned char **data, int dataoff, | ||
| 72 | TransportAddress * addr, u_int16_t port, | ||
| 73 | struct ip_conntrack_expect * exp); | ||
| 74 | extern int (*nat_q931_hook) (struct sk_buff ** pskb, struct ip_conntrack * ct, | ||
| 75 | enum ip_conntrack_info ctinfo, | ||
| 76 | unsigned char **data, TransportAddress * addr, | ||
| 77 | int idx, u_int16_t port, | ||
| 78 | struct ip_conntrack_expect * exp); | ||
| 79 | |||
| 28 | #endif | 80 | #endif |
| 29 | 81 | ||
| 30 | #endif | 82 | #endif |
diff --git a/net/ipv4/netfilter/ip_conntrack_helper_h323_asn1.h b/include/linux/netfilter_ipv4/ip_conntrack_helper_h323_asn1.h index 0bd828081c..0bd828081c 100644 --- a/net/ipv4/netfilter/ip_conntrack_helper_h323_asn1.h +++ b/include/linux/netfilter_ipv4/ip_conntrack_helper_h323_asn1.h | |||
diff --git a/net/ipv4/netfilter/ip_conntrack_helper_h323_types.h b/include/linux/netfilter_ipv4/ip_conntrack_helper_h323_types.h index cc98f7aa5a..cc98f7aa5a 100644 --- a/net/ipv4/netfilter/ip_conntrack_helper_h323_types.h +++ b/include/linux/netfilter_ipv4/ip_conntrack_helper_h323_types.h | |||
diff --git a/net/ipv4/netfilter/ip_conntrack_helper_h323.c b/net/ipv4/netfilter/ip_conntrack_helper_h323.c index daeb1395fa..fc817fd46c 100644 --- a/net/ipv4/netfilter/ip_conntrack_helper_h323.c +++ b/net/ipv4/netfilter/ip_conntrack_helper_h323.c | |||
| @@ -54,8 +54,6 @@ | |||
| 54 | #include <linux/netfilter_ipv4/ip_conntrack_h323.h> | 54 | #include <linux/netfilter_ipv4/ip_conntrack_h323.h> |
| 55 | #include <linux/moduleparam.h> | 55 | #include <linux/moduleparam.h> |
| 56 | 56 | ||
| 57 | #include "ip_conntrack_helper_h323_asn1.h" | ||
| 58 | |||
| 59 | #if 0 | 57 | #if 0 |
| 60 | #define DEBUGP printk | 58 | #define DEBUGP printk |
| 61 | #else | 59 | #else |
diff --git a/net/ipv4/netfilter/ip_conntrack_helper_h323_asn1.c b/net/ipv4/netfilter/ip_conntrack_helper_h323_asn1.c index afa525129b..48078002e4 100644 --- a/net/ipv4/netfilter/ip_conntrack_helper_h323_asn1.c +++ b/net/ipv4/netfilter/ip_conntrack_helper_h323_asn1.c | |||
| @@ -15,7 +15,7 @@ | |||
| 15 | #else | 15 | #else |
| 16 | #include <stdio.h> | 16 | #include <stdio.h> |
| 17 | #endif | 17 | #endif |
| 18 | #include "ip_conntrack_helper_h323_asn1.h" | 18 | #include <linux/netfilter_ipv4/ip_conntrack_helper_h323_asn1.h> |
| 19 | 19 | ||
| 20 | /* Trace Flag */ | 20 | /* Trace Flag */ |
| 21 | #ifndef H323_TRACE | 21 | #ifndef H323_TRACE |
diff --git a/net/ipv4/netfilter/ip_nat_helper_h323.c b/net/ipv4/netfilter/ip_nat_helper_h323.c index a0bc883928..6f19c20b34 100644 --- a/net/ipv4/netfilter/ip_nat_helper_h323.c +++ b/net/ipv4/netfilter/ip_nat_helper_h323.c | |||
| @@ -41,65 +41,12 @@ | |||
| 41 | #include <linux/netfilter_ipv4/ip_conntrack_h323.h> | 41 | #include <linux/netfilter_ipv4/ip_conntrack_h323.h> |
| 42 | #include <linux/netfilter_ipv4/ip_conntrack_helper.h> | 42 | #include <linux/netfilter_ipv4/ip_conntrack_helper.h> |
| 43 | 43 | ||
| 44 | #include "ip_conntrack_helper_h323_asn1.h" | ||
| 45 | |||
| 46 | #if 0 | 44 | #if 0 |
| 47 | #define DEBUGP printk | 45 | #define DEBUGP printk |
| 48 | #else | 46 | #else |
| 49 | #define DEBUGP(format, args...) | 47 | #define DEBUGP(format, args...) |
| 50 | #endif | 48 | #endif |
| 51 | 49 | ||
| 52 | extern int get_h245_addr(unsigned char *data, H245_TransportAddress * addr, | ||
| 53 | u_int32_t * ip, u_int16_t * port); | ||
| 54 | extern int get_h225_addr(unsigned char *data, TransportAddress * addr, | ||
| 55 | u_int32_t * ip, u_int16_t * port); | ||
| 56 | extern void ip_conntrack_h245_expect(struct ip_conntrack *new, | ||
| 57 | struct ip_conntrack_expect *this); | ||
| 58 | extern void ip_conntrack_q931_expect(struct ip_conntrack *new, | ||
| 59 | struct ip_conntrack_expect *this); | ||
| 60 | extern int (*set_h245_addr_hook) (struct sk_buff ** pskb, | ||
| 61 | unsigned char **data, int dataoff, | ||
| 62 | H245_TransportAddress * addr, | ||
| 63 | u_int32_t ip, u_int16_t port); | ||
| 64 | extern int (*set_h225_addr_hook) (struct sk_buff ** pskb, | ||
| 65 | unsigned char **data, int dataoff, | ||
| 66 | TransportAddress * addr, | ||
| 67 | u_int32_t ip, u_int16_t port); | ||
| 68 | extern int (*set_sig_addr_hook) (struct sk_buff ** pskb, | ||
| 69 | struct ip_conntrack * ct, | ||
| 70 | enum ip_conntrack_info ctinfo, | ||
| 71 | unsigned char **data, | ||
| 72 | TransportAddress * addr, int count); | ||
| 73 | extern int (*set_ras_addr_hook) (struct sk_buff ** pskb, | ||
| 74 | struct ip_conntrack * ct, | ||
| 75 | enum ip_conntrack_info ctinfo, | ||
| 76 | unsigned char **data, | ||
| 77 | TransportAddress * addr, int count); | ||
| 78 | extern int (*nat_rtp_rtcp_hook) (struct sk_buff ** pskb, | ||
| 79 | struct ip_conntrack * ct, | ||
| 80 | enum ip_conntrack_info ctinfo, | ||
| 81 | unsigned char **data, int dataoff, | ||
| 82 | H245_TransportAddress * addr, | ||
| 83 | u_int16_t port, u_int16_t rtp_port, | ||
| 84 | struct ip_conntrack_expect * rtp_exp, | ||
| 85 | struct ip_conntrack_expect * rtcp_exp); | ||
| 86 | extern int (*nat_t120_hook) (struct sk_buff ** pskb, struct ip_conntrack * ct, | ||
| 87 | enum ip_conntrack_info ctinfo, | ||
| 88 | unsigned char **data, int dataoff, | ||
| 89 | H245_TransportAddress * addr, u_int16_t port, | ||
| 90 | struct ip_conntrack_expect * exp); | ||
| 91 | extern int (*nat_h245_hook) (struct sk_buff ** pskb, struct ip_conntrack * ct, | ||
| 92 | enum ip_conntrack_info ctinfo, | ||
| 93 | unsigned char **data, int dataoff, | ||
| 94 | TransportAddress * addr, u_int16_t port, | ||
| 95 | struct ip_conntrack_expect * exp); | ||
| 96 | extern int (*nat_q931_hook) (struct sk_buff ** pskb, struct ip_conntrack * ct, | ||
| 97 | enum ip_conntrack_info ctinfo, | ||
| 98 | unsigned char **data, TransportAddress * addr, | ||
| 99 | int idx, u_int16_t port, | ||
| 100 | struct ip_conntrack_expect * exp); | ||
| 101 | |||
| 102 | |||
| 103 | /****************************************************************************/ | 50 | /****************************************************************************/ |
| 104 | static int set_addr(struct sk_buff **pskb, | 51 | static int set_addr(struct sk_buff **pskb, |
| 105 | unsigned char **data, int dataoff, | 52 | unsigned char **data, int dataoff, |
