Patrick McHardy | f587de0 | 2006-12-02 22:08:46 -0800 | [diff] [blame] | 1 | #ifndef _NF_CONNTRACK_H323_H |
| 2 | #define _NF_CONNTRACK_H323_H |
| 3 | |
| 4 | #ifdef __KERNEL__ |
| 5 | |
| 6 | #include <linux/netfilter/nf_conntrack_h323_asn1.h> |
| 7 | |
| 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 nf_ct_h323_master { |
| 14 | |
| 15 | /* Original and NATed Q.931 or H.245 signal ports */ |
| 16 | __be16 sig_port[IP_CT_DIR_MAX]; |
| 17 | |
| 18 | /* Original and NATed RTP ports */ |
| 19 | __be16 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 | |
| 30 | struct nf_conn; |
| 31 | |
Joe Perches | a0f4ecf | 2013-09-26 14:48:15 -0700 | [diff] [blame] | 32 | int get_h225_addr(struct nf_conn *ct, unsigned char *data, |
| 33 | TransportAddress *taddr, union nf_inet_addr *addr, |
| 34 | __be16 *port); |
| 35 | void nf_conntrack_h245_expect(struct nf_conn *new, |
| 36 | struct nf_conntrack_expect *this); |
| 37 | void nf_conntrack_q931_expect(struct nf_conn *new, |
| 38 | struct nf_conntrack_expect *this); |
Patrick McHardy | 051966c | 2012-08-26 19:14:04 +0200 | [diff] [blame] | 39 | extern int (*set_h245_addr_hook) (struct sk_buff *skb, unsigned int protoff, |
Patrick McHardy | f587de0 | 2006-12-02 22:08:46 -0800 | [diff] [blame] | 40 | unsigned char **data, int dataoff, |
| 41 | H245_TransportAddress *taddr, |
Jan Engelhardt | 643a2c1 | 2007-12-17 22:43:50 -0800 | [diff] [blame] | 42 | union nf_inet_addr *addr, |
Patrick McHardy | f587de0 | 2006-12-02 22:08:46 -0800 | [diff] [blame] | 43 | __be16 port); |
Patrick McHardy | 051966c | 2012-08-26 19:14:04 +0200 | [diff] [blame] | 44 | extern int (*set_h225_addr_hook) (struct sk_buff *skb, unsigned int protoff, |
Patrick McHardy | f587de0 | 2006-12-02 22:08:46 -0800 | [diff] [blame] | 45 | unsigned char **data, int dataoff, |
| 46 | TransportAddress *taddr, |
Jan Engelhardt | 643a2c1 | 2007-12-17 22:43:50 -0800 | [diff] [blame] | 47 | union nf_inet_addr *addr, |
Patrick McHardy | f587de0 | 2006-12-02 22:08:46 -0800 | [diff] [blame] | 48 | __be16 port); |
Herbert Xu | 3db05fe | 2007-10-15 00:53:15 -0700 | [diff] [blame] | 49 | extern int (*set_sig_addr_hook) (struct sk_buff *skb, |
Patrick McHardy | f587de0 | 2006-12-02 22:08:46 -0800 | [diff] [blame] | 50 | struct nf_conn *ct, |
| 51 | enum ip_conntrack_info ctinfo, |
Patrick McHardy | 051966c | 2012-08-26 19:14:04 +0200 | [diff] [blame] | 52 | unsigned int protoff, unsigned char **data, |
Patrick McHardy | f587de0 | 2006-12-02 22:08:46 -0800 | [diff] [blame] | 53 | TransportAddress *taddr, int count); |
Herbert Xu | 3db05fe | 2007-10-15 00:53:15 -0700 | [diff] [blame] | 54 | extern int (*set_ras_addr_hook) (struct sk_buff *skb, |
Patrick McHardy | f587de0 | 2006-12-02 22:08:46 -0800 | [diff] [blame] | 55 | struct nf_conn *ct, |
| 56 | enum ip_conntrack_info ctinfo, |
Patrick McHardy | 051966c | 2012-08-26 19:14:04 +0200 | [diff] [blame] | 57 | unsigned int protoff, unsigned char **data, |
Patrick McHardy | f587de0 | 2006-12-02 22:08:46 -0800 | [diff] [blame] | 58 | TransportAddress *taddr, int count); |
Herbert Xu | 3db05fe | 2007-10-15 00:53:15 -0700 | [diff] [blame] | 59 | extern int (*nat_rtp_rtcp_hook) (struct sk_buff *skb, |
Patrick McHardy | f587de0 | 2006-12-02 22:08:46 -0800 | [diff] [blame] | 60 | struct nf_conn *ct, |
| 61 | enum ip_conntrack_info ctinfo, |
Patrick McHardy | 051966c | 2012-08-26 19:14:04 +0200 | [diff] [blame] | 62 | unsigned int protoff, unsigned char **data, |
| 63 | int dataoff, |
Patrick McHardy | f587de0 | 2006-12-02 22:08:46 -0800 | [diff] [blame] | 64 | H245_TransportAddress *taddr, |
| 65 | __be16 port, __be16 rtp_port, |
| 66 | struct nf_conntrack_expect *rtp_exp, |
| 67 | struct nf_conntrack_expect *rtcp_exp); |
Herbert Xu | 3db05fe | 2007-10-15 00:53:15 -0700 | [diff] [blame] | 68 | extern int (*nat_t120_hook) (struct sk_buff *skb, struct nf_conn *ct, |
Patrick McHardy | f587de0 | 2006-12-02 22:08:46 -0800 | [diff] [blame] | 69 | enum ip_conntrack_info ctinfo, |
Patrick McHardy | 051966c | 2012-08-26 19:14:04 +0200 | [diff] [blame] | 70 | unsigned int protoff, |
Patrick McHardy | f587de0 | 2006-12-02 22:08:46 -0800 | [diff] [blame] | 71 | unsigned char **data, int dataoff, |
| 72 | H245_TransportAddress *taddr, __be16 port, |
| 73 | struct nf_conntrack_expect *exp); |
Herbert Xu | 3db05fe | 2007-10-15 00:53:15 -0700 | [diff] [blame] | 74 | extern int (*nat_h245_hook) (struct sk_buff *skb, struct nf_conn *ct, |
Patrick McHardy | f587de0 | 2006-12-02 22:08:46 -0800 | [diff] [blame] | 75 | enum ip_conntrack_info ctinfo, |
Patrick McHardy | 051966c | 2012-08-26 19:14:04 +0200 | [diff] [blame] | 76 | unsigned int protoff, |
Patrick McHardy | f587de0 | 2006-12-02 22:08:46 -0800 | [diff] [blame] | 77 | unsigned char **data, int dataoff, |
| 78 | TransportAddress *taddr, __be16 port, |
| 79 | struct nf_conntrack_expect *exp); |
Herbert Xu | 3db05fe | 2007-10-15 00:53:15 -0700 | [diff] [blame] | 80 | extern int (*nat_callforwarding_hook) (struct sk_buff *skb, |
Patrick McHardy | f587de0 | 2006-12-02 22:08:46 -0800 | [diff] [blame] | 81 | struct nf_conn *ct, |
| 82 | enum ip_conntrack_info ctinfo, |
Patrick McHardy | 051966c | 2012-08-26 19:14:04 +0200 | [diff] [blame] | 83 | unsigned int protoff, |
Patrick McHardy | f587de0 | 2006-12-02 22:08:46 -0800 | [diff] [blame] | 84 | unsigned char **data, int dataoff, |
| 85 | TransportAddress *taddr, |
| 86 | __be16 port, |
| 87 | struct nf_conntrack_expect *exp); |
Herbert Xu | 3db05fe | 2007-10-15 00:53:15 -0700 | [diff] [blame] | 88 | extern int (*nat_q931_hook) (struct sk_buff *skb, struct nf_conn *ct, |
Patrick McHardy | f587de0 | 2006-12-02 22:08:46 -0800 | [diff] [blame] | 89 | enum ip_conntrack_info ctinfo, |
Patrick McHardy | 051966c | 2012-08-26 19:14:04 +0200 | [diff] [blame] | 90 | unsigned int protoff, |
Patrick McHardy | f587de0 | 2006-12-02 22:08:46 -0800 | [diff] [blame] | 91 | unsigned char **data, TransportAddress *taddr, |
| 92 | int idx, __be16 port, |
| 93 | struct nf_conntrack_expect *exp); |
| 94 | |
| 95 | #endif |
| 96 | |
| 97 | #endif |