2 * RTSP extension for IP connection tracking.
3 * (C) 2003 by Tom Marshall <tmarshall@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 */
15 #define IP_NF_RTSP_VERSION "0.01"
17 /* port block types */
19 pb_single, /* client_port=x */
20 pb_range, /* client_port=x-y */
21 pb_discon /* client_port=x/y (rtspbis) */
24 /* We record seq number and length of rtsp headers here, all in host order. */
27 * This structure is per expected connection. It is a member of struct
28 * ip_conntrack_expect. The TCP SEQ for the conntrack expect is stored
29 * there and we are expected to only store the length of the data which
30 * needs replaced. If a packet contains multiple RTSP messages, we create
31 * one expected connection per message.
33 * We use these variables to mark the entire header block. This may seem
34 * like overkill, but the nature of RTSP requires it. A header may appear
35 * multiple times in a message. We must treat two Transport headers the
36 * same as one Transport header with two entries.
38 struct ip_ct_rtsp_expect
40 u_int32_t len; /* length of header block */
41 portblock_t pbtype; /* Type of port block that was requested */
42 u_int16_t loport; /* Port that was requested, low or first */
43 u_int16_t hiport; /* Port that was requested, high or second */
45 uint method; /* RTSP method */
46 uint cseq; /* CSeq from request */
50 /* This structure exists only once per master */
51 struct ip_ct_rtsp_master
59 #include <linux/netfilter_ipv4/lockhelp.h>
63 /* Protects rtsp part of conntracks */
64 DECLARE_LOCK_EXTERN(ip_rtsp_lock);
66 #endif /* __KERNEL__ */
68 #endif /* _IP_CONNTRACK_RTSP_H */