Commit Graph

36 Commits

Author SHA1 Message Date
Guy Harris cfcbb28671 Clean up ftype-conversion and dfilter error message string handling.
Have dfilter_compile() take an additional gchar ** argument, pointing to
a gchar * item that, on error, gets set to point to a g_malloc()ed error
string.  That removes one bit of global state from the display filter
parser, and doesn't impose a fixed limit on the error message strings.

Have fvalue_from_string() and fvalue_from_unparsed() take a gchar **
argument, pointer to a gchar * item, rather than an error-reporting
function, and set the gchar * item to point to a g_malloc()ed error
string on an error.

Allow either gchar ** argument to be null; if the argument is null, no
error message is allocated or provided.

Change-Id: Ibd36b8aaa9bf4234aa6efa1e7fb95f7037493b4c
Reviewed-on: https://code.wireshark.org/review/6608
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-18 10:22:59 +00:00
Bill Meier 23e78cd6bd Add editor modelines; Adjust whitespace as needed.
Change-Id: I3dc57f4c2ca57585103e3b71503ac4c332903e50
Reviewed-on: https://code.wireshark.org/review/4594
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-10-10 14:50:08 +00:00
Michal Labedzki 3ca06aa167 Increase tap limit to 5000
This will fix "Warn Too many taps queued" information,
while there is more then 100 PDUs to be exported.
For example while exporting Logcat from TCP/IP it is quite
often to have PDU with multiple Logcat PDUs around 1000.

Change-Id: I24d0619e57ae494c836c19c8a67df44503c54318
Reviewed-on: https://code.wireshark.org/review/1096
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-04-14 06:29:55 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(Using sed : sed -i '/^ \* \$Id\$/,+1 d')

Fix manually some typo (in export_object_dicom.c and crc16-plain.c)

Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8
Reviewed-on: https://code.wireshark.org/review/497
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04 14:27:33 +00:00
Evan Huus d5c437e8e5 Fix function prototypes.
Functions with no parameters must be written func(void). Fixes (some) of the
buildbots.

Change-Id: I1a6e5c0553e032e99419fe67eb4b573bbdfe7fe6
Reviewed-on: https://code.wireshark.org/review/388
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-02-25 21:46:55 +00:00
Hadriel Kaplan 860747e1e7 Adds some Lua helper functions: some commonly used functions, and to help troubleshooting Lua scripts
There are some common things people need to do, such as convert to/from hex or get
the raw binary string in a ByteArray/Tvb/TvbRange. These have been added, as well
as some tests for them in the testsuites. Also, functions have been added to allow
a script to get all the available tap types and filter fields, since they are
not exactly what one can see in the Wireshark gui.

Change-Id: I92e5e4eae713bb90d79b0c024eaa4e55b99cc96b
Reviewed-on: https://code.wireshark.org/review/249
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-25 21:06:21 +00:00
Guy Harris 0cc1545d05 Move most of the plugin code from epan to wsutil and remove all
knowledge of particular types of plugins.  Instead, let particular types
of plugins register with the common plugin code, giving a name and a
routine to recognize that type of plugin.

In particular applications, only process the relevant plugin types.

Add a Makefile.common to the codecs directory.

svn path=/trunk/; revision=53710
2013-12-02 08:30:29 +00:00
Bill Meier 0df5a9390d From beroset:
remove C++ incompatibilities
 https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 attachment #10397

svn path=/trunk/; revision=48438
2013-03-20 01:18:10 +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
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
Jeff Morriss 009156289f Fix the test.sh failures based on Guy's suggestion in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5445#c15 :
Add a new tap flag to indicate that a tap listener is just a "dissector helper",
that is, a tap which is used by a dissector to help it do its dissection but
does not, itself, require dissection.

Use this new flag in the dissectors which register taps.

Remove the (now-unused) have_tap_listeners() function.

svn path=/trunk/; revision=37069
2011-05-12 03:18:34 +00:00
Bill Meier 94f2771f41 (Trivial) Fix some typos; do some whitespace cleanup & rewording of comments.
svn path=/trunk/; revision=36417
2011-03-31 14:30:38 +00:00
Bill Meier 45a1908a85 (Trivial) Fix a typo.
svn path=/trunk/; revision=33700
2010-08-03 16:06:48 +00:00
Stig Bjørlykke e162470d6b Prime interesting fields when selecting a package, so Lua's ProtoField
can extract the field value correctly.

This fixes bug 4058.

svn path=/trunk/; revision=30252
2009-10-02 19:55:43 +00:00
Kovarththanan Rajaratnam 2046b144d9 Sanitize epan includes
svn path=/trunk/; revision=29502
2009-08-21 20:51:13 +00:00
Guy Harris cf91fdf16b Have tap listeners specify whether the "packet" routine requires
a protocol tree;

	the column values.

This includes stats-tree listeners.

Have the routines to build the packet list, and to retap packets, honor
those requirements.  This means that cf_retap_packets() no longer needs
an argument to specify whether to construct the column values or not, so
get rid of that argument.

This also means that there's no need for a tap to have a fake filter
to ensure that the protocol tree will be built, so don't set up a fake
"frame" filter.

While we're at it, clean up some cases where "no filter" was represented
as a null string rather than a null pointer.

Have a routine to return an indication of the number of tap listeners
with filters; use that rather than the global num_tap_filters.

Clean up some indentation and some gboolean vs. gint items.

svn path=/trunk/; revision=28645
2009-06-05 22:42:47 +00:00
Anders Broman f4047c4b93 From Neil Piercy:
Patch to tap.c which simply returns the same tap_id if the register_tap is called twice with the same name - I can't see any downside to this.
( Needed for the gsm_a split -Anders).

svn path=/trunk/; revision=26051
2008-08-21 06:28:16 +00:00
Anders Broman 9cc9c92e75 Fix some of the Errors/warnings detected by checkapi,
make non ASCII char a warning for now.

svn path=/trunk/; revision=25240
2008-05-05 20:38:27 +00:00
Stig Bjørlykke 43272f9435 Added an option to Conversations and Endpoints to limit the list to match
the current display filter.

Some Hosts -> Endpoints cleanup.

svn path=/trunk/; revision=24368
2008-02-17 00:35:55 +00:00
Stephen Fisher 8d8452b419 Introduce a new function called have_tap_listener(int tap_id) to
tell if a specific tap id is currently listening for data.
This complements the function have_tap_listeners(), which checks
to see if any tap is currently listening.


svn path=/trunk/; revision=20979
2007-03-06 00:35:35 +00:00
Jeff Morriss f2e0f951f7 fetch_tapped_data() returns a const pointer, so declare the function as returning such
svn path=/trunk/; revision=20861
2007-02-19 12:24:32 +00:00
Guy Harris 05f1235606 Do bounds checking on tap_packet_array.
svn path=/trunk/; revision=20106
2006-12-11 02:58:38 +00:00
Anders Broman 996d4db495 Ethereal->Wireshark
svn path=/trunk/; revision=18234
2006-05-28 19:49:07 +00:00
Ronnie Sahlberg 89f022b12b name change
svn path=/trunk/; revision=18197
2006-05-21 05:12:17 +00:00
Ronnie Sahlberg d12b09b886 new function fetch_tapped_data()
This function can be called from a dissector to fetch (if any) tapped data from a tap.
This can offer an alternative method of passing data between different dissectors much cleaner than the pinfo pollition and private_data design mistake.


The SMB2 dissector uses this method to extract vital data such as Account_Name from the ntlmssp dissector (that is 3 leveld down from smb2)




svn path=/trunk/; revision=16722
2005-12-07 13:12:39 +00:00
Guy Harris b2807e2ab6 Move the APIs for registering and processing "-z" command-line arguments
and "Statistics" menu items into "stat.h" and "stat.c", to separate them
from the core tapping APIs.  A tap could conceivably not register as a
"-z" command-line argument or "Statistics" menu item, and a stat could
conceivably not be implemented as a tap, and dissectors that implement
tapping points don't need the UI-related stuff from "stat.h", they just
want the tap-related stuff in <epan/tap.h>.

svn path=/trunk/; revision=15427
2005-08-19 09:29:41 +00:00
Guy Harris 5fb6e97fb4 Squelch more const warnings (and fix some memory leaks that found).
_U_-ify some unused arguments, rather than assigning them to themselves.

Un-constify one variable that gets assigned a mallocated pointer.

Clean up indentation.

svn path=/trunk/; revision=15236
2005-08-06 03:44:55 +00:00
Ulf Lamping 149786d563 replace malloc and alike calls by their GLib pendants -> g_malloc
svn path=/trunk/; revision=15232
2005-08-05 23:58:58 +00:00
Jörg Mayer 69dcb66cd9 More char -> const char warning fixes
svn path=/trunk/; revision=15218
2005-08-05 00:23:22 +00:00
Jörg Mayer 30a8557868 More 'char*' -> 'const char*' changes to fix warnings.
svn path=/trunk/; revision=15015
2005-07-23 11:41:25 +00:00
Jörg Mayer 553402acbf More warining fixes: char -> const char
svn path=/trunk/; revision=14975
2005-07-21 17:21:48 +00:00
Ronnie Sahlberg 448191721c from Lars R
TAP order of caller update


svn path=/trunk/; revision=14001
2005-04-01 20:55:33 +00:00
Guy Harris 80c1907a36 Rename "register_ethereal_tap()" to "register_tap_listener_cmd_arg()" as
it's used to register a callback for a tap listener invoked if the
specified command line argument is specified to the "-z" flag.

Move it, along with routines to:

	look up a "-z" argument in the table constructed by
	"register_tap_listener_cmd_arg()" and either save the full
	argument to "-z" and the corresponding listener if it's found or
	return a failure indication if it isn't;

	list the available tap listeners;

	call the "init" routines for the tap listeners saved in the
	table above;

and have Ethereal and Tethereal use those routines.

svn path=/trunk/; revision=13993
2005-04-01 09:08:27 +00:00
Ronnie Sahlberg 349c5a8699 from metze
various bugfixes and enhancements to decryption of secure ldap


svn path=/trunk/; revision=13710
2005-03-11 09:31:11 +00:00
Guy Harris 0ccf418724 Add a "get_addr_name()" routine that takes an "address *" and attempts
to resolve it to a name.

Fix up some const-pointer-to-non-const-pointer, and
function-pointer-to-void-*, conversions.

Fix some comments.

svn path=/trunk/; revision=12863
2004-12-30 02:10:24 +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