Commit Graph

57 Commits

Author SHA1 Message Date
Michael Mann 553da37446 Create BASE_DOT, BASE_DASH, and BASE_SEMICOLON types for the FT_BYTES field type.
These "bases" will put a ".", "-", or ":" respectively between hexidecimal bytes in the field in packet view and display filter.  FT_BYTES with BASE_NONE will have no separator in the packet view, but continue to have the ':' as a separator in the display filter.

Converted the "string" hf_ entries that used tvb_fc_to_str as a string to use proto_tree_add_item with FT_BYTES/BASE_DOT type.

Converted applicable tvb_bytes_to_ep_str_punct() calls to use the new BASE values.

Change-Id: I2442185bb314d04a3ff2ba57883652ecd738b5f9
Reviewed-on: https://code.wireshark.org/review/6098
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-04 16:32:03 +00:00
Alexis La Goutte 5248c0df21 Fix unknown command tag name [-Wdocumentation-unknown-command]
Change-Id: I6c2564a86e13d9321001856ba1f51681a9f20976
Reviewed-on: https://code.wireshark.org/review/5979
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-12-22 15:24:28 +00:00
Bill Meier 0111e46193 plugins: Add editor modelines; Adjust whitespace as needed.
Change-Id: I36124f6021d46a228721bdc976f6b9fef1c8c088
Reviewed-on: https://code.wireshark.org/review/4488
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-10-06 01:42:32 +00:00
Alexis La Goutte 09cd306d1c Continue to remove $Id$ from top of file
(Using sed : sed -i '/^\* \$Id\$/,+1 d') (no space before star)

Change-Id: I318968db2b8512ba1303b5fc5c624c66441658f0
Reviewed-on: https://code.wireshark.org/review/879
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-31 18:30:52 +00:00
Alexis La Goutte c93ddddb6e Fix (-W)documentation found by Clang
Convert comment to doxygen type

Change-Id: Ib7adc2ece99dc4baa8ec3a349896dfa89277e00b
Reviewed-on: https://code.wireshark.org/review/84
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-02-03 13:11:14 +00:00
Guy Harris 6461057a52 Now that fvalue_to_string_repr() returns NULL if the fvalue's ftype has
no val_to_string_repr method, we don't need to check whether it has such
a method, and thus don't need to include epan/ftypes/ftypes-int.h.

svn path=/trunk/; revision=53293
2013-11-12 22:22:23 +00:00
Jakub Zawadzki 12d1509aa1 Move struct _ftype_t + callback typedefs + free macro to ftypes-int.h
svn path=/trunk/; revision=53223
2013-11-10 13:14:09 +00:00
Bill Meier 1f083fd654 From beroset:
remove C++ incompatibilities
 https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 attachments #10423,#10424

svn path=/trunk/; revision=48450
2013-03-21 14:29:58 +00:00
Bill Meier 48af69f95f From beroset:
remove C++ incompatibilities
 https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 attachment #10409

svn path=/trunk/; revision=48449
2013-03-21 03:07:23 +00:00
Guy Harris 4c99756f6e strtod() is locale-dependent; use g_ascii_strtod() instead.
If the intent is that floating-point representations be
locale-dependent, change this and somehow arrange that this not fail the
API test.  However, I doubt anybody's actually done anything that uses
this code path, given that...

...it was comparing a value against itself.  Fix it to use op->v.

svn path=/trunk/; revision=47512
2013-02-06 04:37:27 +00:00
Guy Harris 8ed7a73e22 Fix a bunch of warnings.
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
sizeof.

Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
strtol() and strtoul().

Change some data types to avoid those implicit conversion warnings.

When assigning a constant to a float, make sure the constant isn't a
double, by appending "f" to the constant.

Constify a bunch of variables, parameters, and return values to
eliminate warnings due to strings being given const qualifiers.  Cast
away those warnings in some cases where an API we don't control forces
us to do so.

Enable a bunch of additional warnings by default.  Note why at least
some of the other warnings aren't enabled.

randpkt.c and text2pcap.c are used to build programs, so they don't need
to be in EXTRA_DIST.

If the user specifies --enable-warnings-as-errors, add -Werror *even if
the user specified --enable-extra-gcc-flags; assume they know what
they're doing and are willing to have the compile fail due to the extra
GCC warnings being treated as errors.

svn path=/trunk/; revision=46748
2012-12-26 05:57:06 +00:00
Jakub Zawadzki b18e880040 Update FSF address - part II.
svn path=/trunk/; revision=43538
2012-06-28 23:18:38 +00:00
Jeff Morriss 8204b904b3 Fix Coverity 702421: Handle the possibility that fvalue_to_string_repr()
may return NULL.

svn path=/trunk/; revision=43114
2012-06-05 15:20:31 +00:00
Bill Meier 48ca3d4742 Use GSlice API instead of GMemChunk API for some memory allocation.
svn path=/trunk/; revision=40547
2012-01-16 19:05:32 +00:00
Anders Broman bc0fbb792a Added FALLTHRU comment to avoid a "missing break" warning.
CID 489

svn path=/trunk/; revision=36400
2011-03-29 21:05:29 +00:00
Chris Maynard 10928bc0cc Don't use prohibited strncpy(). Use g_strlcpy() instead. Ensures that "orig"
will be NULL-terminated, even if len >= SCS_HUGE_SIZE.

svn path=/trunk/; revision=36383
2011-03-28 17:04:58 +00:00
Bill Meier 7c41d527fd Removed uneeded 'continue'.
Fixes Coverity 815 ("UNREACHABLE").

svn path=/trunk/; revision=36367
2011-03-27 14:34:19 +00:00
Stig Bjørlykke a774994572 Added some casts to fix coverity 325.
svn path=/trunk/; revision=36228
2011-03-21 18:33:18 +00:00
Bill Meier 1341fcd87e Fix some gcc -Wshadow warnings.
svn path=/trunk/; revision=31722
2010-01-28 21:49:30 +00:00
Gerald Combs 17f0d877fa Fix Win64 compilation problems in the plugins directory.
svn path=/trunk/; revision=28064
2009-04-16 03:38:23 +00:00
Bill Meier 4f34bb9b15 From Jakub Zawadzki: g_gnprintf & etc: Use size of buffer [not size -1];
- As suggested actually use sizeof(...) rather than a numeric constant.
  - g_snprintf() and g_vsnprintf() since glib 1.3.12 do not return -1.

svn path=/trunk/; revision=27772
2009-03-18 15:03:46 +00:00
Bill Meier 9a3563e807 Fix some typos and spelling (mostly in text strings)
svn path=/trunk/; revision=27085
2008-12-22 15:24:18 +00:00
Stig Bjørlykke 94e9e2b1ec Fix some "format not a string literal and no format arguments" warnings.
svn path=/trunk/; revision=26652
2008-10-31 17:27:51 +00:00
Guy Harris ef51ff82fb Get one more pointer difference.
svn path=/trunk/; revision=26163
2008-09-07 17:49:03 +00:00
Guy Harris bdec87026c To compute the difference between two addresses, cast the pointers
holding those addresses to "void *" and then to "char *" (so we don't
get warnings from casting directly to "char *" or errors from
subtracting two "void *"s), and subtract them, rather than casting the
pointers to an integral type possibly shorter than the pointers (to
avoid warnings and to avoid the admittedly-infinitesimal chance that the
two pointers don't differ in the bits that fit into the integral type).

svn path=/trunk/; revision=26151
2008-09-06 18:27:33 +00:00
Luis Ontanon 42c3239a1a luis.ontanon@gmail.com => luis@ontanon.org
svn path=/trunk/; revision=25937
2008-08-05 21:03:46 +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
Bill Meier fe5c2d9820 g_string_sprintf --> g_string_printf and g_string_sprintfa --> g_string_append_printf
svn path=/trunk/; revision=25276
2008-05-11 18:33:49 +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
Stephen Fisher 6625e7503f Fix warnings on Linux/gcc 4.1.1
svn path=/trunk/; revision=21330
2007-04-03 21:17:13 +00:00
Sebastien Tandel c136927420 revert back (void*) -> (void**) which will stop free-warning compilation with
gcc-4.1.2


svn path=/trunk/; revision=21282
2007-03-30 12:04:40 +00:00
Sebastien Tandel 8405f21ea2 strict aliasing warnings fix : replace (void**) by (void*)
svn path=/trunk/; revision=21274
2007-03-29 22:58:02 +00:00
Stephen Fisher 46b8669566 Fix a bunch more warnings. Add -Werror when using --with-warnings-as-errors
under gcc to tools/lemon, plugins/mate and epan/


svn path=/trunk/; revision=21204
2007-03-26 06:10:52 +00:00
Stephen Fisher 0ebc01dc03 From Sebastien Tandel:
Create two new files (ws_strsplit.[ch]) that use GTK2 code to override
the buggy g_strsplit() function when compiling for GTK1.  Include this
work-around function (ws_strsplit) in libwireshark.def.  Add notes on usage
to README.developer.  Include epan/ws_strsplit.h in all files that use
g_strsplit().


svn path=/trunk/; revision=20804
2007-02-13 20:57:22 +00:00
Ronnie Sahlberg 89f022b12b name change
svn path=/trunk/; revision=18197
2006-05-21 05:12:17 +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
Guy Harris cbce856e9e When printing the code for a display filter:
print register numbers as unsigned (they're guint32);

	when printing a PUT_FVALUE instruction, show the value as well
	as the type of the value.

That requires that a bunch of types get to_repr methods; add them for
PCRE (FTREPR_DFILTER-only - show the regular expression as text),
tvbuffs (FTREPR_DFILTER_only - show the data as a hex string), integral
types, string types other than FT_STRING, and FT_IPv6.

That means we can use fvalue_to_string_repr() for FT_IPXNET and FT_IPv6
in proto_construct_dfilter_string(), and that we don't need to handle
integer and floating types specially in MATE.

Fix some problems with the PCRE execution code for tvbuff types.

svn path=/trunk/; revision=16369
2005-10-31 02:42:22 +00:00
Jörg Mayer 96adc5f4a1 - Include the .h files in their .c files.
- Remove epan/dissectors/packet-sna.h, it isn't used anywhere.

svn path=/trunk/; revision=15475
2005-08-20 16:19:22 +00:00
Jörg Mayer a0f94c125f Last set of trivial fixes for "no previous declaration" warnings.
svn path=/trunk/; revision=15191
2005-08-02 08:30:33 +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
Luis Ontanon bf1117c4c9 Transforms and Pdus are working already, Gops start to work.
svn path=/trunk/; revision=14376
2005-05-16 17:16:52 +00:00
Luis Ontanon 047baf2c38 MATE has a grammar.
Although not yet fully implemented I want this version as a reference. 


svn path=/trunk/; revision=14373
2005-05-16 13:28:35 +00:00
Luis Ontanon 96c41e1293 - fix a crash in new_avpl_strict_match when the operator avpl was empty
- change the name of the preference mate.config_filename: into mate.config:


svn path=/trunk/; revision=13488
2005-02-24 04:11:31 +00:00
Ulf Lamping 2f836c20a8 fix a typo: lenght -> length
This seems to be a "more common" typo, fixed it 13 times throughout the code ...

svn path=/trunk/; revision=13452
2005-02-20 22:36:34 +00:00
Anders Broman bc04baef42 From LEGO:
- fixes a leak in analize_pdu()
 - fixes a typo in analize_pdu()
 - fixes a crash in scs_unsubscribe() 
 - save a malloc and a free in get_pdu_fields()

svn path=/trunk/; revision=13335
2005-02-07 08:54:24 +00:00
Anders Broman c3440553eb From: LEGO
- fix a bug at gog reinit that disabled gogs after reload of a file.
- fix some crashes when Debug_GoG>0
- cleanup the debug output (no CR at the end is needed)
- Gops start when no GopStart is given and match an existing GogKey

svn path=/trunk/; revision=13318
2005-02-06 20:37:02 +00:00
Lars Roland f7a9907702 From Luis Ontanon for Mate:
- supress some solaris compiler warnings
- adds GopExpiration, GopIdleTimeout and GopLifetime parameters

svn path=/trunk/; revision=13154
2005-01-21 19:11:59 +00:00
Guy Harris dc0932f4a8 Set fp to NULL before "load_loal_error()" is called, so we don't pass an
uninitalized variable to it.

svn path=/trunk/; revision=13054
2005-01-15 23:34:29 +00:00
Lars Roland 2b88200a3a One more patch for mate:
- renamed analyze_frame() into mate_analyze_frame().
- prepare mate to be statically linked
- use report_open_failure() , report_read_failure() and
report_failure() in case there's an error while loading the config
- some cleanup in mate_util.c
- some fixes and cleanup in examples and matelib

svn path=/trunk/; revision=13001
2005-01-10 02:37:19 +00:00