~ubuntu-branches/ubuntu/gutsy/wireshark/gutsy-security

« back to all changes in this revision

Viewing changes to epan/epan.c

  • Committer: Bazaar Package Importer
  • Author(s): Frederic Peters
  • Date: 2007-04-01 08:58:40 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070401085840-or3qhrpv8alt1bwg
Tags: 0.99.5-1
* New upstream release.
* debian/patches/09_idl2wrs.dpatch: updated to patch idl2wrs.sh.in.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* epan.h
 
1
/* epan.c
2
2
 *
3
 
 * $Id: epan.c 19327 2006-09-26 10:22:20Z lego $
 
3
 * $Id: epan.c 20261 2007-01-02 06:49:40Z guy $
4
4
 *
5
5
 * Wireshark Protocol Analyzer Library
 
6
 *
 
7
 * Copyright (c) 2001 by Gerald Combs <gerald@wireshark.org>
 
8
 *
 
9
 * This program is free software; you can redistribute it and/or
 
10
 * modify it under the terms of the GNU General Public License
 
11
 * as published by the Free Software Foundation; either version 2
 
12
 * of the License, or (at your option) any later version.
 
13
 *
 
14
 * This program is distributed in the hope that it will be useful,
 
15
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
16
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
17
 * GNU General Public License for more details.
 
18
 *
 
19
 * You should have received a copy of the GNU General Public License
 
20
 * along with this program; if not, write to the Free Software
 
21
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
6
22
 */
7
23
 
8
24
#ifdef HAVE_CONFIG_H
51
67
  return VERSION;
52
68
}
53
69
 
54
 
/*
55
 
 * XXX - this takes the plugin directory as an argument, because
56
 
 * libwireshark now has its own configure script and "config.h" file,
57
 
 * which is what code in the "epan" directory includes, but we need
58
 
 * to define PLUGIN_DIR in the top-level directory, as it's used by,
59
 
 * for example, the Makefile for the Gryphon plugin, so it knows
60
 
 * where to install the plugin.
61
 
 *
62
 
 * Eventually, we should probably have an "epan-configure" script
63
 
 * (or "libwireshark-configure", or whatever), along the lines of what
64
 
 * GTK+ and GLib have, that can print, among other things, the directory
65
 
 * into which plugins should be installed.  That way, only libwireshark
66
 
 * need know what directory that is; programs using it won't, *and*
67
 
 * Makefiles for plugins can just use "epan-configure" to figure out
68
 
 * where to install the plugins.
69
 
 *
70
 
 * (Would that *more* libraries had configure scripts like that, so
71
 
 * that configure scripts didn't have to go through various contortions
72
 
 * to figure out where the header files and libraries for various
73
 
 * libraries are located.)
74
 
 */
75
70
void
76
 
epan_init(const char *plugin_dir, void (*register_all_protocols)(void),
 
71
epan_init(void (*register_all_protocols)(void),
77
72
          void (*register_all_handoffs)(void),
78
73
          void (*report_failure)(const char *, va_list),
79
74
          void (*report_open_failure)(const char *, int, gboolean),
82
77
        report_failure_func = report_failure;
83
78
        report_open_failure_func = report_open_failure;
84
79
        report_read_failure_func = report_read_failure;
 
80
 
 
81
        /* initialize memory allocation subsystem */
 
82
        ep_init_chunk();
 
83
        se_init_chunk();
 
84
 
 
85
        /* initialize the GUID to name mapping table */
 
86
        guids_init();
 
87
 
85
88
        except_init();
86
89
#ifdef HAVE_LIBGNUTLS
87
90
        gnutls_global_init();
91
94
        tvbuff_init();
92
95
        oid_resolv_init();
93
96
        tap_init();
94
 
        proto_init(plugin_dir,register_all_protocols,register_all_handoffs);
 
97
        proto_init(register_all_protocols, register_all_handoffs);
95
98
        packet_init();
96
99
        dfilter_init();
97
100
        final_registration_all_protocols();