sanity: fix include file due to previous re-location
[sip-router] / modules / sanity / mod_sanity.h
1 /*
2  * $Id$
3  *
4  * Sanity Checks Module
5  *
6  * Copyright (C) 2006 iptelorg GbmH
7  *
8  * This file is part of ser, a free SIP server.
9  *
10  * ser is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version
14  *
15  * For a license to use the ser software under conditions
16  * other than those described here, or to purchase support for this
17  * software, please contact iptel.org by e-mail at the following addresses:
18  *    info@iptel.org
19  *
20  * ser is distributed in the hope that it will be useful,
21  * but WITHOUT ANY WARRANTY; without even the implied warranty of
22  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23  * GNU General Public License for more details.
24  *
25  * You should have received a copy of the GNU General Public License
26  * along with this program; if not, write to the Free Software
27  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
28  *
29  */
30
31 #ifndef MOD_SANITY_CHK_H
32 #define MOD_SANITY_CHK_H
33
34 #include "../../str.h"
35 #include "../../modules_s/sl/sl.h"
36 #include "../../parser/msg_parser.h"
37
38 #define SANITY_RURI_SIP_VERSION        (1<<0)
39 #define SANITY_RURI_SCHEME             (1<<1)
40 #define SANITY_REQUIRED_HEADERS        (1<<2)
41 #define SANITY_VIA_SIP_VERSION         (1<<3)
42 #define SANITY_VIA_PROTOCOL            (1<<4)
43 #define SANITY_CSEQ_METHOD             (1<<5)
44 #define SANITY_CSEQ_VALUE              (1<<6)
45 #define SANITY_CL                      (1<<7)
46 #define SANITY_EXPIRES_VALUE           (1<<8)
47 #define SANITY_PROXY_REQUIRE           (1<<9)
48 #define SANITY_PARSE_URIS              (1<<10)
49 #define SANITY_CHECK_DIGEST            (1<<11)
50 #define SANITY_MAX_CHECKS              (1<<12)  /* Make sure this is the highest value */
51
52 /* VIA_SIP_VERSION and VIA_PROTOCOL do not work yet
53  * and PARSE_URIS is very expensive */
54 #define SANITY_DEFAULT_CHECKS   SANITY_RURI_SIP_VERSION | \
55                                                                 SANITY_RURI_SCHEME | \
56                                                                 SANITY_REQUIRED_HEADERS | \
57                                                                 SANITY_CSEQ_METHOD | \
58                                                                 SANITY_CSEQ_VALUE | \
59                                                                 SANITY_CL | \
60                                                                 SANITY_EXPIRES_VALUE | \
61                                                                 SANITY_PROXY_REQUIRE | \
62                                                                 SANITY_CHECK_DIGEST
63
64
65 #define SANITY_URI_CHECK_RURI    (1<<0)
66 #define SANITY_URI_CHECK_FROM    (1<<1)
67 #define SANITY_URI_CHECK_TO      (1<<2)
68 #define SANITY_URI_CHECK_CONTACT (1<<3)
69
70 #define SANITY_DEFAULT_URI_CHECKS       SANITY_URI_CHECK_RURI | \
71                                                                         SANITY_URI_CHECK_FROM | \
72                                                                         SANITY_URI_CHECK_TO
73
74 #define SANITY_CHECK_PASSED 1
75 #define SANITY_CHECK_FAILED 0
76 #define SANITY_CHECK_ERROR -1
77
78 struct _strlist {
79         str string;            /* the string */
80         struct _strlist* next; /* the next strlist element */
81 };
82
83 typedef struct _strlist strl;
84
85 extern int default_checks;
86 extern strl* proxyrequire_list;
87
88 extern sl_api_t sl;
89
90 #endif /* MOD_SANITY_CHK_H */