If we don't have PCRE and we do have GLib >= 2.14, use GRegexes for the
[metze/wireshark/wip.git] / epan / ftypes / ftypes-int.h
1 /*
2  * $Id$
3  *
4  * Wireshark - Network traffic analyzer
5  * By Gerald Combs <gerald@wireshark.org>
6  * Copyright 2001 Gerald Combs
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
21  */
22
23 #ifndef FTYPES_INT_H
24 #define FTYPES_INT_H
25
26 #include <epan/packet.h>
27 #include "ftypes.h"
28
29 #ifdef HAVE_LIBPCRE
30 #include <pcre.h>
31 #endif /* HAVE_LIBPCRE */
32
33
34 #ifdef HAVE_LIBPCRE
35 struct _pcre_tuple_t {
36     char *string;
37     pcre *re;
38     pcre_extra *ex;
39     char *error;
40 };
41 #elif GLIB_CHECK_VERSION(2,14,0) /* No HAVE_LIBPCRE. Try falling back to GRegex. */
42
43 #endif /* HAVE_LIBPCRE */
44
45 void
46 ftype_register(enum ftenum ftype, ftype_t *ft);
47
48 /* These are the ftype registration functions that need to be called.
49  * This list and the initialization function could be produced
50  * via a script, like the dissector registration, but there's so few
51  * that I don't mind doing it by hand for now. */
52 void ftype_register_bytes(void);
53 void ftype_register_double(void);
54 void ftype_register_integers(void);
55 void ftype_register_ipv4(void);
56 void ftype_register_guid(void);
57 void ftype_register_none(void);
58 void ftype_register_string(void);
59 void ftype_register_time(void);
60 void ftype_register_tvbuff(void);
61 void ftype_register_pcre(void);
62
63 #endif