Stig Bjørlykke
e4d168c5dc
Please don't use prohibited APIs in new code:
...
sprintf -> g_snprintf
Fixes coverity 1197 & 1198.
svn path=/trunk/; revision=37664
2011-06-14 20:37:53 +00:00
Guy Harris
f153eb070b
Cast away some warnings about alignment; ep_alloc() guarantees
...
sufficient alignment for all types of data.
svn path=/trunk/; revision=37190
2011-05-16 21:42:49 +00:00
Jakub Zawadzki
17f6352c2e
Convert SLAB_-s, to sl_-API.
...
svn path=/trunk/; revision=37030
2011-05-09 12:52:55 +00:00
Alexis La Goutte
7d317e553b
Add FT_EUI64 Field Type
...
* Remove proto_tree_add_eui64 function from 802.15.4 Dissector
* Replace print_eui64/print_eui64 by eui64_to_str/get_eui64_name
* Update Documentation (README.dev)
* Add new function in libwireshark.def
* Support of encoding for tvb_eui64_to_str
* Use FT_EUI64 for ICMPv6, CAPWAP, Zbee ... dissector
svn path=/trunk/; revision=37015
2011-05-08 10:23:53 +00:00
Gerald Combs
b223e99e5a
get_host_ipaddr() was returning numeric addresses in host byte order
...
and hostnames in network byte order. Have it return everything in
network byte order.
svn path=/trunk/; revision=36873
2011-04-26 17:13:37 +00:00
Chris Maynard
7b43d9c705
Use g_snprintf instead of sprintf: (Part of) Covertiy 665.
...
svn path=/trunk/; revision=36600
2011-04-12 18:29:52 +00:00
Bill Meier
d3efa3ed9f
A bit of Windows makefiles rework and cleanup:
...
- Define macros for certain CFLAGS in config.nmake iso of having defs in each makefile;
a. -DHAVE_CONFIG_H and -D_U_="" are now part of a macro named STANDARD_CFLAGS;
b. -WX has been replaced by WARNINGS_ARE_ERRORS (defined as -WX in config.nmake)
(This allows disabling "Warnings as Errors" by just changing config.nmake)
c. CVARSDLL definitions (not usage) have been removed from the various makefiles.
XXX: It appears the usage of CVARSDLL can also be removed (not yet done) since:
-DWIN32 and -DNULL=0 do not appear to be needed (any more);
-D_MT and _D_DLL are not needed since /MP causes these definitions.
d. Define a macro WARNINGS_CFLAGS with additional specific compiler (level4) warnings to be enabled.
E.G., 4295: array is too small to include a terminating null character
- config.nmake: reformat some long lines for readability;
- plugins\Makefile.nmake: clean-deps does nothing: remove it (and usage in top-level makefile);
- dissectors/Makefile.nmake: test to enable packet-rrc.obj target needs to include MSVC2010 ...
svn path=/trunk/; revision=35747
2011-02-02 01:19:53 +00:00
Stig Bjørlykke
fcc9f7a569
Protect tvb_* functions in a TRY-CATCH block.
...
This fixes bug 5087.
svn path=/trunk/; revision=33735
2010-08-08 19:04:35 +00:00
Jeff Morriss
47e2d75820
Move some code (including the optional objects) into libwsutil
...
svn path=/trunk/; revision=33012
2010-05-28 20:19:55 +00:00
Guy Harris
927b7da346
Have abs_time_to_str() and abs_time_to_str_secs() take an additional
...
argument indicating whether to include the time zone in the string. If
we're constructing a display filter, don't include the time zone,
otherwise do. Fixes bug 4756.
svn path=/trunk/; revision=32913
2010-05-21 06:33:25 +00:00
Bill Meier
8f7aa8dfd8
(Trivial) Use consistent indentation.
...
svn path=/trunk/; revision=32773
2010-05-12 17:34:11 +00:00
Jaap Keuter
23b4509d1b
Straighten out field type names.
...
svn path=/trunk/; revision=32765
2010-05-11 21:46:17 +00:00
Bill Meier
7130d39b06
(Trivial) Fix a typo & some indentation
...
svn path=/trunk/; revision=32724
2010-05-08 16:12:29 +00:00
Guy Harris
06a24aaa7e
Pick up other check from the almost-identical routine in
...
epan/dfilter/scanner.l.
(The common code should be in a utility routine.)
svn path=/trunk/; revision=32619
2010-04-30 21:55:42 +00:00
Guy Harris
d57979b197
Fix comment.
...
svn path=/trunk/; revision=32618
2010-04-30 21:51:47 +00:00
Jeff Morriss
1b6b831daf
Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1696 :
...
The change put in with rev 11382 meant that, on 64-bit systems, we could not
parse negative numbers into integers (since -1 taken as an unsigned 64-bit
number is (significantly) larger than G_MAX_UINT32).
To fix this, split the val_from_unparsed() routine for integers into two
routines: one for signed and one for unsigned; each routine can then do the
appropriate "is this bigger than what fits in a *32?" test.
svn path=/trunk/; revision=32616
2010-04-30 21:40:39 +00:00
Guy Harris
500eb99cd9
Add a third date format, ABSOLUTE_TIME_DOY_UTC, to show UTC with the
...
date as YYYY/DDD, where DDD is a 1-origin day of year. Move the formats
to a "time_fmt.h" file, included by the headers that use it. Have
abs_time_to_str() and abs_time_secs_to_str() take the date format value,
rather than a Boolean "show this as UTC" flag, as an argument. Document
the ABSOLUTE_TIME_ formats a bit better. Use that format in the CCSDS
and VCDU dissectors, rather than having those dissectors do the
formatting themselves.
svn path=/trunk/; revision=32034
2010-02-27 19:01:27 +00:00
Anders Broman
4e66c899d1
From Jakub Zawadzki:
...
Optimizations.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4303
svn path=/trunk/; revision=31967
2010-02-23 19:28:38 +00:00
Bill Meier
e0064797fb
Use more unique names for certain enum constants.
...
(enum constant names are part of the global name space).
(Fixes at least one gcc -Wshadow warning).
svn path=/trunk/; revision=31572
2010-01-19 19:37:03 +00:00
Gerald Combs
b33e11a0e9
Fix our match flags.
...
svn path=/trunk/; revision=31303
2009-12-18 01:25:46 +00:00
Gerald Combs
7c0dc5d7e7
If we don't have PCRE and we do have GLib >= 2.14, use GRegexes for the
...
"matches" operator.
svn path=/trunk/; revision=31302
2009-12-18 01:15:08 +00:00
Guy Harris
4fde145bd2
Add an argument to abs_time_to_str() and abs_time_secs_to_str()
...
indicating whether the time should be shown as local time or UTC. For
now, always pass FALSE, meaning "show as local time".
Clean up some stuff in the SNMP dissector, use abs_time_secs_to_str()
for times with one-second resolution, and update a comment in various
macros in the WSP dissector, while we're at it.
svn path=/trunk/; revision=31227
2009-12-10 22:19:29 +00:00
Jörg Mayer
ec7380a6b1
Creatig static sublibs was not a good idea:
...
=========================================================================
"du -s build" with sublibs:
396868 build
-----------------------------------
"du -s build" without sublibs:
197588 build/
=========================================================================
tshark with sublibs:
-rwxr-xr-x 1 jmayer users 27399706 2009-10-11 08:39 tshark*
-----------------------------------
tshark without sublibs:
-rwxr-xr-x 1 jmayer users 226748 2009-10-11 09:05 tshark*
=========================================================================
So undo the following patches:
------------------------------------------------------------------------
r30459 | krj | 2009-10-10 07:08:48 +0200 (Sa, 10 Okt 2009) | 1 line
Sort subdirectories alphabetically
------------------------------------------------------------------------
r30458 | krj | 2009-10-10 07:03:36 +0200 (Sa, 10 Okt 2009) | 1 line
Add epan/dissectors/CMakeLists.txt which creates a static dissectors library
------------------------------------------------------------------------
--> readd!! *** r30443 | krj | 2009-10-09 21:43:42 +0200 (Fr, 09 Okt 2009) | 1 line
Rename DISSECTOR_ASM_UTILS to LIBWIRESHARK_ASM_FILES since these files belongs to ep
an not dissectors
------------------------------------------------------------------------
r30442 | krj | 2009-10-09 21:17:26 +0200 (Fr, 09 Okt 2009) | 1 line
Add epan/ftypes/CMakeLists.txt which creates a static ftypes library
------------------------------------------------------------------------
r30441 | krj | 2009-10-09 21:13:01 +0200 (Fr, 09 Okt 2009) | 1 line
Add epan/dfilter/CMakeLists.txt which creates a static dfilter library
------------------------------------------------------------------------
r30440 | krj | 2009-10-09 21:05:29 +0200 (Fr, 09 Okt 2009) | 1 line
Add epan/crypt/CMakeLists.txt which creates a static crypt library
------------------------------------------------------------------------
r30439 | krj | 2009-10-09 20:22:22 +0200 (Fr, 09 Okt 2009) | 1 line
Add epan/crc/CMakeLists.txt which creates a static crc library
------------------------------------------------------------------------
To avoid merge problems, I needed to revert r30443 as well, will readd this
one in my next patch.
svn path=/trunk/; revision=30494
2009-10-11 07:28:26 +00:00
Kovarththanan Rajaratnam
b04e327795
Add epan/ftypes/CMakeLists.txt which creates a static ftypes library
...
svn path=/trunk/; revision=30442
2009-10-09 19:17:26 +00:00
Kovarththanan Rajaratnam
56b8d36e03
Introduce a few FT_XXX lengths defines and use those instead of hard coding constants
...
svn path=/trunk/; revision=29846
2009-09-10 18:22:33 +00:00
Kovarththanan Rajaratnam
48069c2b01
Use the correct type, that is GByteArray instead of GString. The reason why this 'worked' before (on non-64bit platforms that is):
...
struct _GString
{
gchar *str;
gsize len;
gsize allocated_len;
};
And:
struct _GArray
{
gchar *data;
guint len;
};
We only accessed the first two fields of the GString struct.
svn path=/trunk/; revision=29841
2009-09-10 14:37:09 +00:00
Kovarththanan Rajaratnam
aaa6d87cf0
Remove unused field
...
svn path=/trunk/; revision=29840
2009-09-10 13:52:36 +00:00
Kovarththanan Rajaratnam
cd49063473
Revert r29614 until I figure out why buildbot doesn't like it
...
svn path=/trunk/; revision=29615
2009-08-29 07:53:48 +00:00
Kovarththanan Rajaratnam
cc948586bf
Use G_STRINGIFY/G_PASTE
...
svn path=/trunk/; revision=29614
2009-08-29 06:42:23 +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
Anders Broman
67d6f5976e
Move th /MP flag setting to LOCAL_CFLAGS set in configure.nmake
...
for MSVC variant 2008 only. As suggested by Bill Meier.
svn path=/trunk/; revision=29114
2009-07-16 08:27:18 +00:00
Anders Broman
91caa01090
Add /MP flag to make use of multi cores.
...
svn path=/trunk/; revision=29104
2009-07-15 20:55:31 +00:00
Guy Harris
ad33ca6c2f
Clean up some 64-bit issues.
...
svn path=/trunk/; revision=28117
2009-04-22 03:07:37 +00:00
Guy Harris
02c7132ea4
Some more P64 fixes - they all assume we don't have truly gigantic
...
strings.
svn path=/trunk/; revision=27720
2009-03-15 02:57:16 +00:00
Stig Bjørlykke
62f60df6b4
From Jakub Zawadzki (bug 3331):
...
g_free() is NULL safe, so we don't need check against it.
svn path=/trunk/; revision=27718
2009-03-13 22:06:48 +00:00
Bill Meier
42d8daee19
#include <epan/emem.h> not req'd ...
...
svn path=/trunk/; revision=27391
2009-02-07 15:17:54 +00:00
Balint Reczey
41723a5ef2
Signal error on field values that cannot be safely represented as strings instead of crashing.
...
This fixes bug 2845.
svn path=/trunk/; revision=26749
2008-11-11 13:32:51 +00:00
Guy Harris
35ce35ebf5
Include the new Makefile.common file.
...
svn path=/trunk/; revision=25659
2008-07-02 02:18:53 +00:00
Guy Harris
a04774395f
Add Makefile.common files for epan/dfilter and epan/ftypes.
...
Add checkapi rules to Makefile.am files.
svn path=/trunk/; revision=25656
2008-07-02 01:44:30 +00:00
Guy Harris
b6e20d89be
Put printf into a separate "termoutput" API group. For most files,
...
check for it - but not for TShark plugins, as they are expected to
print to the standard output.
svn path=/trunk/; revision=25653
2008-07-01 21:13:32 +00:00
Anders Broman
09a741cb17
Add FT_INT64 to IS_FT_INT and FT_UINT_64 to IS_FT_UINT.
...
svn path=/trunk/; revision=25623
2008-06-28 17:23:07 +00:00
Stig Bjørlykke
dd6c6af3e4
Rename some variables to avoid shadowing warnings.
...
svn path=/trunk/; revision=25543
2008-06-23 20:23:29 +00:00
Guy Harris
160a305efa
g_ascii_strtoull() is in GLib 2.2 and later, and we require GLib 2.4 or
...
later, so there's no longer any need to have our own g_ascii_strtoull.
svn path=/trunk/; revision=25423
2008-06-04 01:30:40 +00:00
Guy Harris
caa183b45b
We require GLib 2.4 or later, and they define G_MININT32, G_MAXIN32,
...
G_MAXUINT32, and G_MAXUINT64; don't check whether we need to define them
ourselves.
svn path=/trunk/; revision=25420
2008-06-03 23:57:47 +00:00
Anders Broman
2640b786f4
Fix run checkapi for more targets.
...
svn path=/trunk/; revision=25414
2008-06-03 05:35:19 +00:00
Jeff Morriss
73c7570102
Undo rev 24518 and (re)fix http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2291 .
...
svn path=/trunk/; revision=25327
2008-05-20 14:30:01 +00:00
Stig Bjørlykke
5ccc52fbb6
From Alex deVries (bug 2486):
...
This adds fpSyncFork and fpSyncDir functionality to the AFP dissector.
svn path=/trunk/; revision=25142
2008-04-21 21:36:11 +00:00
Stig Bjørlykke
6f89fd00d0
Corrected ne operator for FT_BYTES.
...
svn path=/trunk/; revision=25126
2008-04-20 22:34:47 +00:00
Jeff Morriss
bc580e1aa0
All our programs link against glib so don't there's no need to link our libraries against it too. This should allow us to build Wireshark (with dynamic libs) with static glib (read: it should fix the OS X buildbot building with glib-1.2).
...
svn path=/trunk/; revision=24518
2008-03-01 12:14:38 +00:00
Stephen Fisher
a97304bd26
Fix typo in comment
...
svn path=/trunk/; revision=24288
2008-02-08 05:45:46 +00:00