2 * RTSP extension for IP connection tracking.
3 * (C) 2003 by Tom Marshall <tmarshall at real.com>
4 * based on ip_conntrack_irc.h
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
11 #ifndef _IP_CONNTRACK_RTSP_H
12 #define _IP_CONNTRACK_RTSP_H
14 //#define IP_NF_RTSP_DEBUG 1
15 #define IP_NF_RTSP_VERSION "0.6.21"
18 /* port block types */
20 pb_single
, /* client_port=x */
21 pb_range
, /* client_port=x-y */
22 pb_discon
/* client_port=x/y (rtspbis) */
25 /* We record seq number and length of rtsp headers here, all in host order. */
28 * This structure is per expected connection. It is a member of struct
29 * ip_conntrack_expect. The TCP SEQ for the conntrack expect is stored
30 * there and we are expected to only store the length of the data which
31 * needs replaced. If a packet contains multiple RTSP messages, we create
32 * one expected connection per message.
34 * We use these variables to mark the entire header block. This may seem
35 * like overkill, but the nature of RTSP requires it. A header may appear
36 * multiple times in a message. We must treat two Transport headers the
37 * same as one Transport header with two entries.
39 struct ip_ct_rtsp_expect
41 u_int32_t len
; /* length of header block */
42 portblock_t pbtype
; /* Type of port block that was requested */
43 u_int16_t loport
; /* Port that was requested, low or first */
44 u_int16_t hiport
; /* Port that was requested, high or second */
46 uint method
; /* RTSP method */
47 uint cseq
; /* CSeq from request */
51 extern unsigned int (*nf_nat_rtsp_hook
)(struct sk_buff
*skb
,
52 enum ip_conntrack_info ctinfo
,
53 unsigned int matchoff
, unsigned int matchlen
,
54 struct ip_ct_rtsp_expect
*prtspexp
,
55 struct nf_conntrack_expect
*exp
);
57 extern void (*nf_nat_rtsp_hook_expectfn
)(struct nf_conn
*ct
, struct nf_conntrack_expect
*exp
);
61 #endif /* __KERNEL__ */
63 #endif /* _IP_CONNTRACK_RTSP_H */