aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2008-03-25 23:22:20 -0400
committerDavid S. Miller <davem@davemloft.net>2008-03-25 23:22:20 -0400
commit30f33e6dee80c6ded917f978e4f377d1069d519d (patch)
tree95bd9e8356d37aa3f7c7edc6f6637fc05d8b3b8d /include
parent7d3dd043b69b10f5abe9c785ab82cc6627898fcd (diff)
[NETFILTER]: nf_conntrack_sip: support method specific request/response handling
Add support for per-method request/response handlers and perform SDP parsing for INVITE/UPDATE requests and for all informational and successful responses. 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.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/netfilter/nf_conntrack_sip.h b/include/linux/netfilter/nf_conntrack_sip.h
index 68a0d6a41733..da93e80804c2 100644
--- a/include/linux/netfilter/nf_conntrack_sip.h
+++ b/include/linux/netfilter/nf_conntrack_sip.h
@@ -5,6 +5,25 @@
5#define SIP_PORT 5060 5#define SIP_PORT 5060
6#define SIP_TIMEOUT 3600 6#define SIP_TIMEOUT 3600
7 7
8struct sip_handler {
9 const char *method;
10 unsigned int len;
11 int (*request)(struct sk_buff *skb,
12 const char **dptr, unsigned int *datalen,
13 unsigned int cseq);
14 int (*response)(struct sk_buff *skb,
15 const char **dptr, unsigned int *datalen,
16 unsigned int cseq, unsigned int code);
17};
18
19#define SIP_HANDLER(__method, __request, __response) \
20{ \
21 .method = (__method), \
22 .len = sizeof(__method) - 1, \
23 .request = (__request), \
24 .response = (__response), \
25}
26
8struct sip_header { 27struct sip_header {
9 const char *name; 28 const char *name;
10 const char *cname; 29 const char *cname;
@@ -35,6 +54,7 @@ struct sip_header {
35 __SIP_HDR(__name, NULL, __search, __match) 54 __SIP_HDR(__name, NULL, __search, __match)
36 55
37enum sip_header_types { 56enum sip_header_types {
57 SIP_HDR_CSEQ,
38 SIP_HDR_FROM, 58 SIP_HDR_FROM,
39 SIP_HDR_TO, 59 SIP_HDR_TO,
40 SIP_HDR_CONTACT, 60 SIP_HDR_CONTACT,