Jing Min Zhao | 5e35941d | 2006-03-20 23:41:17 -0800 | [diff] [blame] | 1 | #ifndef _IP_CONNTRACK_H323_H |
| 2 | #define _IP_CONNTRACK_H323_H |
| 3 | |
| 4 | #ifdef __KERNEL__ |
| 5 | |
Jing Min Zhao | 48bfee5 | 2006-04-06 14:13:42 -0700 | [diff] [blame] | 6 | #include <linux/netfilter_ipv4/ip_conntrack_helper_h323_asn1.h> |
| 7 | |
Jing Min Zhao | 5e35941d | 2006-03-20 23:41:17 -0800 | [diff] [blame] | 8 | #define RAS_PORT 1719 |
| 9 | #define Q931_PORT 1720 |
| 10 | #define H323_RTP_CHANNEL_MAX 4 /* Audio, video, FAX and other */ |
| 11 | |
| 12 | /* This structure exists only once per master */ |
| 13 | struct ip_ct_h323_master { |
| 14 | |
| 15 | /* Original and NATed Q.931 or H.245 signal ports */ |
| 16 | u_int16_t sig_port[IP_CT_DIR_MAX]; |
| 17 | |
| 18 | /* Original and NATed RTP ports */ |
| 19 | u_int16_t rtp_port[H323_RTP_CHANNEL_MAX][IP_CT_DIR_MAX]; |
| 20 | |
| 21 | union { |
| 22 | /* RAS connection timeout */ |
| 23 | u_int32_t timeout; |
| 24 | |
| 25 | /* Next TPKT length (for separate TPKT header and data) */ |
| 26 | u_int16_t tpkt_len[IP_CT_DIR_MAX]; |
| 27 | }; |
| 28 | }; |
| 29 | |
Jing Min Zhao | 48bfee5 | 2006-04-06 14:13:42 -0700 | [diff] [blame] | 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 | |
Jing Min Zhao | 5e35941d | 2006-03-20 23:41:17 -0800 | [diff] [blame] | 80 | #endif |
| 81 | |
| 82 | #endif |