blob: 9fff19779bd5ee5a6b3eb6290b1af22fe1c5f415 [file] [log] [blame]
Patrick McHardy9fafcd72006-12-02 22:09:57 -08001#ifndef __NF_CONNTRACK_SIP_H__
2#define __NF_CONNTRACK_SIP_H__
3#ifdef __KERNEL__
4
5#define SIP_PORT 5060
6#define SIP_TIMEOUT 3600
7
8enum sip_header_pos {
9 POS_REG_REQ_URI,
10 POS_REQ_URI,
11 POS_FROM,
12 POS_TO,
13 POS_VIA,
14 POS_CONTACT,
15 POS_CONTENT,
16 POS_MEDIA,
17 POS_OWNER_IP4,
18 POS_CONNECTION_IP4,
19 POS_OWNER_IP6,
20 POS_CONNECTION_IP6,
21 POS_SDP_HEADER,
22};
23
Herbert Xu3db05fe2007-10-15 00:53:15 -070024extern unsigned int (*nf_nat_sip_hook)(struct sk_buff *skb,
Patrick McHardy9fafcd72006-12-02 22:09:57 -080025 enum ip_conntrack_info ctinfo,
26 struct nf_conn *ct,
27 const char **dptr);
Herbert Xu3db05fe2007-10-15 00:53:15 -070028extern unsigned int (*nf_nat_sdp_hook)(struct sk_buff *skb,
Patrick McHardy9fafcd72006-12-02 22:09:57 -080029 enum ip_conntrack_info ctinfo,
30 struct nf_conntrack_expect *exp,
31 const char *dptr);
32
33extern int ct_sip_get_info(struct nf_conn *ct, const char *dptr, size_t dlen,
34 unsigned int *matchoff, unsigned int *matchlen,
35 enum sip_header_pos pos);
36extern int ct_sip_lnlen(const char *line, const char *limit);
37extern const char *ct_sip_search(const char *needle, const char *haystack,
38 size_t needle_len, size_t haystack_len,
39 int case_sensitive);
40#endif /* __KERNEL__ */
41#endif /* __NF_CONNTRACK_SIP_H__ */