Commit Graph

142 Commits

Author SHA1 Message Date
Guy Harris db25270df8 Move the epan/filesystem.c routines to wsutil; they're not specific to
packet dissection, they're specific to the entire Wireshark suite of
programs.

svn path=/trunk/; revision=53377
2013-11-17 02:55:14 +00:00
Jeff Morriss 54bb2e7a5c Move report_err.{h,c} from epan into wsutil: there's nothing epan-specific there and moving it avoids having to recompile the file for use in editcap and capinfos (which don't link against libwireshark).
svn path=/trunk/; revision=50598
2013-07-15 02:48:26 +00:00
Anders Broman b7617b32eb From beroset:
remove C++ incompatibilities 
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48383
2013-03-17 22:16:39 +00:00
Jeff Morriss 3729335973 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45016
2012-09-20 01:48:30 +00:00
Guy Harris c16ff99f81 Make register_all_wiretap_modules() and register_all_codecs() static;
they're only used internally to epan/plugins.c.

svn path=/trunk/; revision=44815
2012-09-08 17:16:51 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Anders Broman e6e6d6217b From Tony Trinh:
Update Lua from 5.1 to 5.2

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7400

svn path=/trunk/; revision=43482
2012-06-25 20:42:07 +00:00
Jörg Mayer be706c6380 Move gtk to ui/gtk.
This looses the last checkin to gtk, will add this manually back.

svn path=/trunk/; revision=40518
2012-01-15 21:59:11 +00:00
Jeff Morriss fda7fc7ca6 Define plugins_dump_all() even when we do not HAVE_PLUGINS.
svn path=/trunk/; revision=38465
2011-08-11 01:11:37 +00:00
Gerald Combs 0272ec5dd3 Show the plugin paths in Help→About→Plugins. Add a "-G plugins" option
to TShark which dumps a list of plugins.

svn path=/trunk/; revision=37512
2011-06-01 21:48:17 +00:00
Jeff Morriss 9c9c23fae4 Allocate wslua_plugin_list even if we do not HAVE_PLUGINS
svn path=/trunk/; revision=37109
2011-05-13 00:34:31 +00:00
Balint Reczey 0e9ed5ecf0 Move wslua_plugin_list to epan/plugins.c, that should fix the Solaris builds finally.
svn path=/trunk/; revision=35167
2010-12-10 10:37:03 +00:00
Guy Harris f2f1023487 Fix comments (not all platforms on which we run support dlopen(), but
GLib handles that with g_module_open() as a platform-independent "load a
module at run time" wrapper).

svn path=/trunk/; revision=34491
2010-10-12 18:25:42 +00:00
Stig Bjørlykke 3a5c9ec3b2 Load lua scripts in the plugins directory, both global and personal.
List loaded lua scripts in Help->About->Plugins.

svn path=/trunk/; revision=30675
2009-10-23 17:52:18 +00:00
Bill Meier 94f28dd8f9 (FWIW) One step towards including stdio.h & stdlib.h only when req'd.
svn path=/trunk/; revision=29568
2009-08-26 19:27:49 +00:00
Guy Harris a228b8239a Clean up white space.
svn path=/trunk/; revision=28271
2009-05-05 01:21:33 +00:00
Jaap Keuter 108fe4f53a From Jakub Zawadzki:
Fix small memory leak when running from build directory.

svn path=/trunk/; revision=27691
2009-03-11 06:03:31 +00:00
Gerald Combs 09bf9e6946 ETH -> WS updates.
svn path=/trunk/; revision=26570
2008-10-27 04:47:57 +00:00
Jeff Morriss 83f9ecf96f Move privileges.c and unicode-utils.c from epan to wsutil (so things like
capinfos and dumpcap don't need to depend on libwireshark nor directly pull
in those modules).  Because capinfos and editcap were only being linked with
privileges.c if we had plugins, this allows those programs to be linked when
someone is compiling --without-plugins.

svn path=/trunk/; revision=25640
2008-06-30 17:16:29 +00:00
Jeff Morriss a5cee04fad Move the file utility functions from wiretap to libwsutil so that
libwireshark (and the plugins using those functions) do not depend on
wiretap on Windows.

While doing that, rename the eth_* functions to ws_*.

svn path=/trunk/; revision=25354
2008-05-22 15:46:27 +00:00
Stephen Fisher 726a1caaf1 - Remove GLIB1 code
- Change ugly GLIB version checking statements to GLIB_CHECK_VERSION
- Remove ws_strsplit files because we no longer need to borrow GLIB2's
  g_strsplit code for the no longer supported GLIB1 builds


svn path=/trunk/; revision=24829
2008-04-07 05:22:54 +00:00
Stig Bjørlykke a2d1e9005d This patch adds support for configuration profiles, which can be used to
configure and use more than one set of preferences and configuration files.

This can be found in the "Configuration Profiles..." menu item from the Edit
menu, or by pressing Shift-Ctrl-A.  It's also possible to start wireshark
and tshark with a named profile by using the "-C ProfileName" option.
A new status pane in the main window will show the current profile.

The configuration files currently stored in the Profiles are:
- Preferences
- Capture Filters
- Display Filters
- Coloring Rules
- Disabled Protocols
- User Accessible Tables

The recent data are by design not added to the profile.

Planned future enhancements:
- make a more convenient function to switch between profiles
- add a "clone profile" button to copy an existing profile
- make the profiles list active and accept return as OK
- save users "Decode as" in the profile
- make new, clone and deletion of profiles more secure
- make some of the recent values available in the profile

This patch also fixes:
- setting default status pane sizes
- a bug setting status pane for packets when not having main lower pane.

svn path=/trunk/; revision=24089
2008-01-14 16:40:23 +00:00
Tomas Kukosa 136de3920c new codec table for registering codecs by name
new codec plugin type
search registered codecs in rtp player
fix memory leak in rtp player

svn path=/trunk/; revision=23270
2007-10-25 09:38:15 +00:00
Luis Ontanon d8e818e9da Make sure that wiretap plugins are loaded before dissectors are (if a new encap type is registered the plugin probably needs it before reg_handoff)
svn path=/trunk/; revision=22461
2007-08-07 20:07:43 +00:00
Luis Ontanon 11f06217ce Have editcap and capinfos loading the wiretap plugins.
epan/filesystem.c
   have get_plugin_dir() calling init_plugin_dir() if necessary

epan/epan.c and epan/report_err.c
   move the report_failure family into the new report_err.c file, have epan_init() calling the initializer

epan/plugins.h and epan/proto.c
   do not have init_plugins() calling the proto_reg functions instead do it in init_proto()

gtk/main.c and tshark.c
   init_plugin_dir() has become suprefluous

capinfos.c and editcap.c
   load the wiretap plugins

Makefiles
   do what's needed to build withe the above changes.




svn path=/trunk/; revision=21935
2007-05-25 17:22:32 +00:00
Luis Ontanon 869732d121 Prepare wireshark and tshark for wiretap plugins
svn path=/trunk/; revision=21928
2007-05-24 22:26:51 +00:00
Guy Harris 44c0624bd9 Add a WIRESHARK_RUN_FROM_BUILD_DIRECTORY environment variable on UN*X;
if set, and if the program isn't running with additional privileges,
it'll treat the directory in which the program is found as the data
directory.

If, on Windows, the version-number subdirectory of {data
directory}\plugins doesn't exist (which is assumed to mean that the
program is being run from the build directory), or if, on UN*X,
WIRESHARK_RUN_FROM_BUILD_DIRECTORY is set, the plugin directory is the
"plugins" subdirectory of the data directory, and all subdirectories of
that directory are scanned for plugins, as the "plugins" subdirectory of
the build directory contains subdirectories for the plugins; this means
that if we're running from the build directory, we'll find the plugins
we built in the build tree.

When generating the wireshark-filter man page, run tshark with
WIRESHARK_RUN_FROM_BUILD_DIRECTORY set, so it uses the plugins from the
build to generate the list of filters.

svn path=/trunk/; revision=20261
2007-01-02 06:49:40 +00:00
Jörg Mayer d9b930a7d7 image/wireshark.rc.in
svn path=/trunk/; revision=18310
2006-06-02 06:50:57 +00:00
Anders Broman 996d4db495 Ethereal->Wireshark
svn path=/trunk/; revision=18234
2006-05-28 19:49:07 +00:00
Ronnie Sahlberg 6075ec39fb ethereal->wireshark
svn path=/trunk/; revision=18207
2006-05-22 08:21:22 +00:00
Ronnie Sahlberg f0b33a4789 ethereal->wireshark updates
svn path=/trunk/; revision=18206
2006-05-22 08:14:01 +00:00
Ronnie Sahlberg 89f022b12b name change
svn path=/trunk/; revision=18197
2006-05-21 05:12:17 +00:00
Guy Harris 4c4f18eb3f Add code to check whether the app was started with special privileges
(e.g., set-UID or set-GID), and don't load user plugs if it is.

svn path=/trunk/; revision=17174
2006-02-06 03:11:34 +00:00
Guy Harris ca781ff145 Use eth_dir_open(), not g_dir_open(); g_dir_open() isn't available in
GLib 1.2[.x].

svn path=/trunk/; revision=16412
2005-11-07 08:36:25 +00:00
Guy Harris db9fba20b4 Use <wiretap/file_util.h> to include "file_util.h"; otherwise, the
include fails as we don't do -Iwiretap.

If we have it, include <sys/stat.h> in epan/filesystem.c - we need it
for stat() and the macros and structures it uses.

svn path=/trunk/; revision=16410
2005-11-07 02:47:09 +00:00
Ulf Lamping c3187174bf replace *a lot* of file related calls by their GLib counterparts. This is necessary for the switch to GTK 2.6 (at least on WIN32).
to do this, I've added file_util.h to wiretap (would file_compat.h be a better name?), and provide compat_macros like eth_open() instead of open(). While at it, move other file related things there, like #include <io.h>, definition of O_BINARY and alike, so it's all in one place.

deleted related things from config.h.win32

As of these massive changes, I'm almost certain that this will break the Unix build. I'll keep an eye on the buildbot so hopefully everything is working again soon.

svn path=/trunk/; revision=16403
2005-11-06 22:43:25 +00:00
Ulf Lamping 994496a184 several times replacing:
sprintf -> g_snprintf
snprintf -> g_snprintf
vsnprintf -> g_vsnprintf
strdup -> g_strdup

svn path=/trunk/; revision=15412
2005-08-18 19:31:15 +00:00
Ulf Lamping 0dc9fb3d4a various code cleanup:
-use g_snprintf instead of sprintf and snprintf
-use g_strdup_printf where appropriate
-remove #include "snprintf.h" (as only g_snprintf should be used)
-replace some more alloc/realloc/calloc/free with their glib pendants

svn path=/trunk/; revision=15264
2005-08-08 18:50:39 +00:00
Lars Roland 65fb9ef620 Remove support for the old plugin api.
TODO: 
cleanup files in /trunk/plugins

svn path=/trunk/; revision=13782
2005-03-16 23:07:08 +00:00
Guy Harris 802859d3fd Call the "new-style init" routine for plugins a "register" routine, as
it serves the same purpose as the register routine in a built-in
dissector, and don't require all dissectors to have one, as they might
just be taps.

Get rid of the stats tree's init routine, as it's just a tap, and as it
doesn't do anything.

Update the idl2eth Python script to generate plugins with register routines.

svn path=/trunk/; revision=13644
2005-03-07 02:44:41 +00:00
Guy Harris e27279e14d "report_err.h" declares "report_failure()", so it doesn't need to be
declared in "epan.h", and, as "epan/plugins.c" now includes
"report_err.h", it doesn't need to include "epan.h".

svn path=/trunk/; revision=13634
2005-03-06 19:37:09 +00:00
Jörg Mayer 8b13213e85 Warning fix:
plugins.c:236: warning: implicit declaration of function
        'report_failure'


svn path=/trunk/; revision=13625
2005-03-06 09:40:58 +00:00
Guy Harris 1a4502d5a9 Squelch some compiler warnings.
svn path=/trunk/; revision=13622
2005-03-06 04:41:42 +00:00
Lars Roland 00273300e7 Preparations for dropping the old plugin api.
Introduce a new init routine for plugins, 
which does not take the plugin api table as an 
argument and allows etheral to distinguish 
between plugins using the old and the new api.

Update README.plugins accordingly

Change all g_warnings() in epan/plugins.c to report_failue().
On windows we do not have a log console open while
loading the plugins, because a log console cannot be opened before the prefs have been read. Thus g_warnings()
does not work for reporting problems with plugins.

svn path=/trunk/; revision=13596
2005-03-05 06:28:10 +00:00
Guy Harris dd4b0b718b The stats tree stuff should ultimately allow us to have plugin taps, so
add infrastructure for them, and display the plugin type (which could be
both dissector *and* tap) in the list of plugins.

svn path=/trunk/; revision=13543
2005-02-27 22:04:48 +00:00
Lars Roland ec9ca01616 Move the following files from /trunk to /trunk/epan:
asn1.[ch]
follow.[ch]
ptvcursor.[ch]
reassemble.[ch]
xmlstub.[ch]

fix #include statements accordingly.

svn path=/trunk/; revision=13366
2005-02-09 23:38:00 +00:00
Ulf Lamping 80d0151d6c add some of the DCE/RPC functions to the plugin API
svn path=/trunk/; revision=13010
2005-01-12 21:44:53 +00:00
Guy Harris bc7a4459e1 Don't cast pointers passed as arguments - pass a pointer to the right
type of variable and assign the value; that squelches "dereferencing
type-punned pointer will break strict-aliasing rules" warnings from some
versions of GCC.


svn path=/trunk/; revision=12924
2005-01-02 04:01:00 +00:00
Guy Harris 4c0f806dc9 As "get_persconffile_path()" doesn't return a "const char *", neither
does "get_plugins_pers_dir()" - and "get_plugins_global_dir()" doesn't
return one either.  Both of them return mallocated data, and making them
return a "const char *" just causes compiler whining when you try to
free them.

svn path=/trunk/; revision=12883
2004-12-31 00:32:00 +00:00
Guy Harris 6472876ab3 Move the tap infrastructure to the epan directory.
svn path=/trunk/; revision=12128
2004-09-29 00:06:36 +00:00