diff options
| author | Patrick McHardy <kaber@trash.net> | 2006-12-03 01:09:57 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2006-12-03 01:09:57 -0500 |
| commit | 9fafcd7b203229c3f3893a475741afc27e276306 (patch) | |
| tree | cc1c5051142c35dee2c584c97892624cb701bf20 /include | |
| parent | f09943fefe6b702e40893d35b4f10fd1064037fe (diff) | |
[NETFILTER]: nf_conntrack/nf_nat: add SIP helper port
Add IPv4 and IPv6 capable nf_conntrack port of the SIP conntrack/NAT helper.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/netfilter/nf_conntrack_sip.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/include/linux/netfilter/nf_conntrack_sip.h b/include/linux/netfilter/nf_conntrack_sip.h new file mode 100644 index 000000000000..bb7f2041db74 --- /dev/null +++ b/include/linux/netfilter/nf_conntrack_sip.h | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | #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 | |||
| 8 | enum 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 | |||
| 24 | extern unsigned int (*nf_nat_sip_hook)(struct sk_buff **pskb, | ||
| 25 | enum ip_conntrack_info ctinfo, | ||
| 26 | struct nf_conn *ct, | ||
| 27 | const char **dptr); | ||
| 28 | extern unsigned int (*nf_nat_sdp_hook)(struct sk_buff **pskb, | ||
| 29 | enum ip_conntrack_info ctinfo, | ||
| 30 | struct nf_conntrack_expect *exp, | ||
| 31 | const char *dptr); | ||
| 32 | |||
| 33 | extern 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); | ||
| 36 | extern int ct_sip_lnlen(const char *line, const char *limit); | ||
| 37 | extern 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__ */ | ||
