Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
nf_conntrack_h323.h
Go to the documentation of this file.
1 #ifndef _NF_CONNTRACK_H323_H
2 #define _NF_CONNTRACK_H323_H
3 
4 #ifdef __KERNEL__
5 
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 */
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, unsigned int protoff,
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, unsigned int protoff,
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 int protoff, 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 int protoff, 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 int protoff, unsigned char **data,
63  int dataoff,
64  H245_TransportAddress *taddr,
65  __be16 port, __be16 rtp_port,
66  struct nf_conntrack_expect *rtp_exp,
67  struct nf_conntrack_expect *rtcp_exp);
68 extern int (*nat_t120_hook) (struct sk_buff *skb, struct nf_conn *ct,
69  enum ip_conntrack_info ctinfo,
70  unsigned int protoff,
71  unsigned char **data, int dataoff,
73  struct nf_conntrack_expect *exp);
74 extern int (*nat_h245_hook) (struct sk_buff *skb, struct nf_conn *ct,
75  enum ip_conntrack_info ctinfo,
76  unsigned int protoff,
77  unsigned char **data, int dataoff,
79  struct nf_conntrack_expect *exp);
80 extern int (*nat_callforwarding_hook) (struct sk_buff *skb,
81  struct nf_conn *ct,
82  enum ip_conntrack_info ctinfo,
83  unsigned int protoff,
84  unsigned char **data, int dataoff,
85  TransportAddress *taddr,
86  __be16 port,
87  struct nf_conntrack_expect *exp);
88 extern int (*nat_q931_hook) (struct sk_buff *skb, struct nf_conn *ct,
89  enum ip_conntrack_info ctinfo,
90  unsigned int protoff,
91  unsigned char **data, TransportAddress *taddr,
92  int idx, __be16 port,
93  struct nf_conntrack_expect *exp);
94 
95 #endif
96 
97 #endif