]> git.karo-electronics.de Git - karo-tx-linux.git/blob - include/linux/netfilter_ipv4/ip_conntrack_sip.h
2a15eb51fd6b885c8b25a2785b5a12dcb299812f
[karo-tx-linux.git] / include / linux / netfilter_ipv4 / ip_conntrack_sip.h
1 #ifndef __IP_CONNTRACK_SIP_H__
2 #define __IP_CONNTRACK_SIP_H__
3 #ifdef __KERNEL__
4
5 #define SIP_PORT        5060
6 #define SIP_TIMEOUT     3600
7
8 enum sip_header_pos {
9         POS_REQ_HEADER,
10         POS_VIA,
11         POS_CONTACT,
12         POS_CONTENT,
13         POS_MEDIA,
14         POS_OWNER,
15         POS_CONNECTION,
16         POS_SDP_HEADER,
17 };
18
19 extern unsigned int (*ip_nat_sip_hook)(struct sk_buff **pskb,
20                                        enum ip_conntrack_info ctinfo,
21                                        struct ip_conntrack *ct,
22                                        const char **dptr);
23 extern unsigned int (*ip_nat_sdp_hook)(struct sk_buff **pskb,
24                                        enum ip_conntrack_info ctinfo,
25                                        struct ip_conntrack_expect *exp,
26                                        const char *dptr);
27
28 extern int ct_sip_get_info(const char *dptr, size_t dlen,
29                            unsigned int *matchoff,
30                            unsigned int *matchlen,
31                            enum sip_header_pos pos);
32 extern int ct_sip_lnlen(const char *line, const char *limit);
33 extern const char *ct_sip_search(const char *needle, const char *haystack,
34                                  size_t needle_len, size_t haystack_len);
35 #endif /* __KERNEL__ */
36 #endif /* __IP_CONNTRACK_SIP_H__ */