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 32 extern int get_h225_addr(struct nf_conn *ct, unsigned char *data, 33 TransportAddress *taddr, 34 union nf_inet_addr *addr, __be16 *port); 35 extern void nf_conntrack_h245_expect(struct nf_conn *new, 36 struct nf_conntrack_expect *this); 37 extern void nf_conntrack_q931_expect(struct nf_conn *new, 38 struct nf_conntrack_expect *this); 39 extern int (*set_h245_addr_hook) (struct sk_buff *skb, 40 unsigned char **data, int dataoff, 41 H245_TransportAddress *taddr, 42 union nf_inet_addr *addr, 43 __be16 port); 44 extern int (*set_h225_addr_hook) (struct sk_buff *skb, 45 unsigned char **data, int dataoff, 46 TransportAddress *taddr, 47 union nf_inet_addr *addr, 48 __be16 port); 49 extern int (*set_sig_addr_hook) (struct sk_buff *skb, 50 struct nf_conn *ct, 51 enum ip_conntrack_info ctinfo, 52 unsigned char **data, 53 TransportAddress *taddr, int count); 54 extern int (*set_ras_addr_hook) (struct sk_buff *skb, 55 struct nf_conn *ct, 56 enum ip_conntrack_info ctinfo, 57 unsigned char **data, 58 TransportAddress *taddr, int count); 59 extern int (*nat_rtp_rtcp_hook) (struct sk_buff *skb, 60 struct nf_conn *ct, 61 enum ip_conntrack_info ctinfo, 62 unsigned char **data, int dataoff, 63 H245_TransportAddress *taddr, 64 __be16 port, __be16 rtp_port, 65 struct nf_conntrack_expect *rtp_exp, 66 struct nf_conntrack_expect *rtcp_exp); 67 extern int (*nat_t120_hook) (struct sk_buff *skb, struct nf_conn *ct, 68 enum ip_conntrack_info ctinfo, 69 unsigned char **data, int dataoff, 70 H245_TransportAddress *taddr, __be16 port, 71 struct nf_conntrack_expect *exp); 72 extern int (*nat_h245_hook) (struct sk_buff *skb, struct nf_conn *ct, 73 enum ip_conntrack_info ctinfo, 74 unsigned char **data, int dataoff, 75 TransportAddress *taddr, __be16 port, 76 struct nf_conntrack_expect *exp); 77 extern int (*nat_callforwarding_hook) (struct sk_buff *skb, 78 struct nf_conn *ct, 79 enum ip_conntrack_info ctinfo, 80 unsigned char **data, int dataoff, 81 TransportAddress *taddr, 82 __be16 port, 83 struct nf_conntrack_expect *exp); 84 extern int (*nat_q931_hook) (struct sk_buff *skb, struct nf_conn *ct, 85 enum ip_conntrack_info ctinfo, 86 unsigned char **data, TransportAddress *taddr, 87 int idx, __be16 port, 88 struct nf_conntrack_expect *exp); 89 90 #endif 91 92 #endif 93