~ubuntu-branches/ubuntu/quantal/modsecurity-apache/quantal

« back to all changes in this revision

Viewing changes to apache2/msc_pcre.h

  • Committer: Bazaar Package Importer
  • Author(s): Alberto Gonzalez Iniesta
  • Date: 2011-03-23 18:36:29 UTC
  • Revision ID: james.westby@ubuntu.com-20110323183629-8rwn0362sqqqqbgl
Tags: upstream-2.5.13
ImportĀ upstreamĀ versionĀ 2.5.13

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * ModSecurity for Apache 2.x, http://www.modsecurity.org/
 
3
 * Copyright (c) 2004-2010 Trustwave Holdings, Inc. (http://www.trustwave.com/)
 
4
 *
 
5
 * This product is released under the terms of the General Public Licence,
 
6
 * version 2 (GPLv2). Please refer to the file LICENSE (included with this
 
7
 * distribution) which contains the complete text of the licence.
 
8
 *
 
9
 * There are special exceptions to the terms and conditions of the GPL
 
10
 * as it is applied to this software. View the full text of the exception in
 
11
 * file MODSECURITY_LICENSING_EXCEPTION in the directory of this software
 
12
 * distribution.
 
13
 *
 
14
 * If any of the files related to licensing are missing or if you have any
 
15
 * other questions related to licensing please contact Trustwave Holdings, Inc.
 
16
 * directly using the email address support@trustwave.com.
 
17
 *
 
18
 */
 
19
#ifndef _MSC_PCRE_H_
 
20
#define _MSC_PCRE_H_
 
21
 
 
22
typedef struct msc_regex_t msc_regex_t;
 
23
 
 
24
#include "pcre.h"
 
25
 
 
26
#ifndef PCRE_ERROR_MATCHLIMIT
 
27
/* Define for compile, but not valid in this version of PCRE. */
 
28
#define PCRE_ERROR_MATCHLIMIT (-8)
 
29
#endif /* PCRE_ERROR_MATCHLIMIT */
 
30
 
 
31
#ifndef PCRE_ERROR_RECURSIONLIMIT
 
32
/* Define for compile, but not valid in this version of PCRE. */
 
33
#define PCRE_ERROR_RECURSIONLIMIT (-21)
 
34
#endif /* PCRE_ERROR_RECURSIONLIMIT */
 
35
 
 
36
#include "apr_general.h"
 
37
#include "modsecurity.h"
 
38
 
 
39
struct msc_regex_t {
 
40
    void            *re;
 
41
    void            *pe;
 
42
    const char      *pattern;
 
43
};
 
44
 
 
45
apr_status_t DSOLOCAL msc_pcre_cleanup(msc_regex_t *regex);
 
46
 
 
47
void DSOLOCAL *msc_pregcomp_ex(apr_pool_t *pool, const char *pattern, int options,
 
48
                               const char **_errptr, int *_erroffset,
 
49
                               int match_limit, int match_limit_recursion);
 
50
 
 
51
void DSOLOCAL *msc_pregcomp(apr_pool_t *pool, const char *pattern, int options,
 
52
                            const char **_errptr, int *_erroffset);
 
53
 
 
54
int DSOLOCAL msc_regexec_ex(msc_regex_t *regex, const char *s,
 
55
                            unsigned int slen, int startoffset, int options,
 
56
                            int *ovector, int ovecsize, char **error_msg);
 
57
 
 
58
int DSOLOCAL msc_regexec_capture(msc_regex_t *regex, const char *s,
 
59
                                 unsigned int slen, int *ovector,
 
60
                                 int ovecsize, char **error_msg);
 
61
 
 
62
int DSOLOCAL msc_regexec(msc_regex_t *regex, const char *s,
 
63
                         unsigned int slen, char **error_msg);
 
64
 
 
65
int DSOLOCAL msc_fullinfo(msc_regex_t *regex, int what, void *where);
 
66
 
 
67
#endif