Commit Graph

435 Commits

Author SHA1 Message Date
Daniel Mack ed0b19b94b Make boolean bitmask type 64-bit wide
There are protocols out there that have 64-bit wide bit mask fields, so
make the internal representation and bitfield decoders 64-bit aware.

For this, the ws_ctz() fallback and bits_count_ones() have to be tweaked
slightly.

Change-Id: I19237b954a69c9e6c55864f281993c1e8731a233
Reviewed-on: https://code.wireshark.org/review/4158
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-10-12 14:15:12 +00:00
Michael Mann b95e6e3a61 Escape double quotes when printing ABSOLUTE_TIME field
This regression was introduced by the commit e5353bf119 done for bug 10081

Bug: 10213
Change-Id: I3925a47ef13055f10f49fa9fefd022731746fbb8
Reviewed-on: https://code.wireshark.org/review/2572
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-09-01 15:47:29 +00:00
Guy Harris 5bfc21cf9e Clean up handling of missing functions.
With autotools, CMake, and nmake, if we have a function, #define
HAVE_{function_name_in_all_caps}, otherwise don't #define it.

If we provide our own version of a function in libwsutil, make sure we
have a header that declares it, and *ONLY* include that header if
HAVE_{function_name_in_all_caps} is *NOT* defined, so that we don't have
the system declaration and our declaration colliding.

Check for inet_aton, strncasecmp, and strptime with CMake, just as we do
with autotools.

Simplify the addition of {function_name_in_all_caps}_LO to libwsutil in
autotools.

Change-Id: Id5be5c73f79f81919a3a865324e400eca7b88889
Reviewed-on: https://code.wireshark.org/review/2903
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-06 21:03:09 +00:00
Evan Huus e0aabd97d8 Convert more time_to_str functions to wmem
Change-Id: Ibaae0e79935dc62f12f713f2df5b57d0f3f799b9
Reviewed-on: https://code.wireshark.org/review/2254
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-16 19:10:59 +00:00
Evan Huus de00c49bd8 Convert a bunch of time_to_str functions to wmem
Change-Id: I24fe3cc4a3589dadc4528a77fe7ff13d06b1a983
Reviewed-on: https://code.wireshark.org/review/2245
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-16 17:26:25 +00:00
Stig Bjørlykke bd38b3152d Support out-of-source checkapi
Always call $(top_srcdir)/tools/checkAPIs.pl with -sourcedir=$(srcdir)
from Makefile.am to allow out-of-source 'make checkapi'.

Change-Id: I60d7e0079984a8ededdacf4517a0738486fa7973
Reviewed-on: https://code.wireshark.org/review/1294
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-25 04:23:46 +00:00
Guy Harris cb16dff992 Get rid of more tvb_get_nstringz* calls.
Add an FT_STRINGZPAD type, for null-padded strings (typically
fixed-length fields, where the string can be up to the length of the
field, and is null-padded if it's shorter than that), and use it.  Use
IS_FT_STRING() in more cases, so that less code needs to know what types
are string types.

Add a tvb_get_stringzpad() routine, which gets null-padded strings.
Currently, it does the same thing that tvb_get_string_enc() does, but
that might change if we don't store string values as null-terminated
strings.

Change-Id: I46f56e130de8f419a19b56ded914e24cc7518a66
Reviewed-on: https://code.wireshark.org/review/1082
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-04-12 22:27:22 +00:00
Guy Harris 2b5fc4efdc The encoding of a string is *not* part of its type.
So get rid of the commented-out FT_UCS2_LE; that would be handled as an
FT_STRING, FT_UINT_STRING, or FT_STRINGZ with an encoding of
ENC_UCS_2|ENC_LITTLE_ENDIAN.

Change-Id: I828fc1ed49843a503ec70e6adaf6dadd256df407
Reviewed-on: https://code.wireshark.org/review/996
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-04-07 23:14:29 +00:00
Alexis La Goutte 757aa33220 Continue to remove $Id$ from top of file
(Using sed : sed -i '/^\# \$Id\$/,+1 d') (start with dash)

Change-Id: Ia4b5a6c2302f6a531f6a86c1ec3a2f8205c8c2dd
Reviewed-on: https://code.wireshark.org/review/881
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-31 18:48:06 +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
Bill Meier 11b5c15fdb Remove trailing whitespace
Change-Id: I8116f63ff88687c8db3fd6e8e23b22ab2f759af0
Reviewed-on: https://code.wireshark.org/review/385
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Tested-by: Bill Meier <wmeier@newsguy.com>
2014-02-25 20:46:49 +00:00
Hadriel Kaplan 7f074364b6 Fix bug 9790: Lua: wslua allows duplicate field registration
As discussed in bug 3513 and 9709, one can register more than one new ProtoFields for
the same field name. Of course C-code can do that too, and does a LOT apparently, but
if they're not similar ftypes then things can get scrweed up in display filters.

So this change prevents duplicate field registration of dissimilar ftypes. The
similarity is based on the discussion on the mailing list, and the listing in
README.developer has been updated to refelect that as well.

Also, this change adds a testscript for Proto/ProtoFields.

Change-Id: I43bd323f785245941a21289647332a19adec2a9d
Reviewed-on: https://code.wireshark.org/review/285
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-02-21 20:57:43 +00:00
Guy Harris ada9dafdf0 Don't cast away constness.
svn path=/trunk/; revision=54813
2014-01-15 03:35:44 +00:00
Guy Harris 61867d0b2f Eliminate fvalue_set() in favor of routines that take arguments
appropriate for particular FT_ types.  This lets us do some more type
checking and lets us use const pointers when appropriate.

Constify a bunch of stuff, and don't cast away constness.

svn path=/trunk/; revision=54811
2014-01-15 01:05:03 +00:00
Alexis La Goutte bc7c39eab3 Make buildbot Happy
error: unused parameter 'allow_partial_value'

svn path=/trunk/; revision=54389
2013-12-23 15:58:26 +00:00
Michael Mann 7ec4582b4f Add FT_SYSTEM_ID type and convert the dissectors that use print_system_id with FT_BYTES to now use FT_SYSTEM_ID type.
svn path=/trunk/; revision=54383
2013-12-23 15:18:48 +00:00
Evan Huus 2ae8edccea Rename more to_str functions to have ep_ in the name if they return ephemeral
buffers. Remove two unused functions.

svn path=/trunk/; revision=54250
2013-12-19 16:28:39 +00:00
Guy Harris 409dd075c6 Replace fvalue_ftype() with a fvalue_type_ftenum() routine that returns
the ftenum_t for the fvalue's ftype, rather than a pointer to the ftype
(which isn't all that useful except as a handle, unless you import the
internal header).

Have fvalue_to_string_repr() return NULL, rather than failing, if the
fvalue's ftype has no val_to_string_repr method.

This lets us not include the ftypes internal header in
ui/cli/tap-diameter-avp.c.

svn path=/trunk/; revision=53290
2013-11-12 22:06:00 +00:00
Jakub Zawadzki ae59b09443 Add missing includes in order to remove exceptions.h from proto.h (next commit).
svn path=/trunk/; revision=53230
2013-11-10 15:59:37 +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
Jakub Zawadzki c9b2ee3768 include <wsutil/pint.h> only when needed.
svn path=/trunk/; revision=53196
2013-11-09 15:44:29 +00:00
Jakub Zawadzki 0b0bbf0965 Replace STRINGIFY with glib version.
svn path=/trunk/; revision=53193
2013-11-09 14:37:13 +00:00
Jakub Zawadzki 1899903f69 Include <epan/to_str.h> only when needed.
svn path=/trunk/; revision=53189
2013-11-09 13:41:10 +00:00
Jakub Zawadzki b3a4b56ae9 Use escape_string*() functions in ftype-string.
Found in attachment #11961, by Didier Gautheron

svn path=/trunk/; revision=53174
2013-11-08 20:09:54 +00:00
Jeff Morriss 8e2f00bf3d Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9323 :
Actually handle non-NULL-terminated FT_STRINGs properly.

svn path=/trunk/; revision=52905
2013-10-27 21:56:58 +00:00
Michael Mann ee208c8dcc Add support for RELATIVE-OID ASN.1 type. Bug 9192 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9192)
From Ed Beroset.

svn path=/trunk/; revision=52393
2013-10-06 02:31:10 +00:00
Jörg Mayer 1e762e315d Remove epan.h from ftypes.h, address.h and tpg.h,
add it to proto.h as it contains macros that require emem.h

svn path=/trunk/; revision=52001
2013-09-13 09:13:09 +00:00
Jörg Mayer 083ef50f3e Two more places with now explicit emem.h include
svn path=/trunk/; revision=51998
2013-09-13 08:26:15 +00:00
Michael Mann a87f47c02c Make many items filterable for Vines dissectors.
Add support for FT_VINES type.

svn path=/trunk/; revision=50962
2013-07-28 00:07:49 +00:00
Jeff Morriss a441793cba Move a couple of time-related modules into wsutil.
A bunch of files didn't really need to include these header files so remove
the include line rather than changing it.

svn path=/trunk/; revision=50154
2013-06-25 22:02:20 +00:00
Chris Maynard ce088c334d makefile.nmake -> Makefile.nmake and minor whitespace (spaces -> tabs) changes.
svn path=/trunk/; revision=50140
2013-06-25 15:32:49 +00:00
Guy Harris 4e29abf8be get_ax25_name() is *NOT* the right routine to use to translate a
human-readable representing an AX.25 subaddress (e.g. "KA9Q-01") into
the binary form of an AX.25 address, because what it does is translate
the binary form of an AX.25 address to the human-readable form!

We currently have no routine that does the right thing and, even if we
did, given that some bits in the AX.25 subaddress format are used for
purposes other than representing the call sign and substation ID, so the
matching routines for AX.25 addresses need to ignore certain bits.

For now, we just remove the call to get_ax25_name() (which squelches the
pointer-signedness warning that made me look at this code, and find the
problem, in the first place) and replace it with a comment discussing
the problem and a failure.

The other pointer-signedness warning brought up a question of what to do
with G_REGEX_RAW in the g_regex_match_full() call; it didn't bring up an
immediately obvious *answer*, so we throw a cast at the warning and add
another comment.  (We fix up alignment while we're at it.)

svn path=/trunk/; revision=50106
2013-06-21 05:24:59 +00:00
Anders Broman 089dfcd108 From beroset:
remove C++ incompatibilities 
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48424
2013-03-19 19:02:25 +00:00
Jaap Keuter 827eb58b04 From David Arnold:
Replace use of INCLUDES with AM_CPPFLAGS in all Makefiles to placate recent autotools.

svn path=/trunk/; revision=48261
2013-03-12 06:53:39 +00:00
Evan Huus bbb4058954 Remove slab.h and replace its last remaining usage with glib slices.
Take the opportunity to deduplicate some code that was common to both an
if block and its else block.

svn path=/trunk/; revision=48227
2013-03-10 14:52:14 +00:00
Evan Huus 122b7cb6df Remove the emem slab feature (sl_* functions) completely, replacing it with
glib memory slices.

- We weren't doing anything with the emem slab that couldn't be done with glib
  slices.
- Removes a fair bit of code as well as one debugging environment variable.
- Glib slices are much cache-friendlier and are multi-threading friendly (if
  we ever go there).
- Allows glib to actually return slices to the OS on occasion. The emem slab
  would hold onto its memory forever which resulted in a great deal of wasted
  memory after closing a large file.

svn path=/trunk/; revision=48218
2013-03-09 20:02:19 +00:00
Anders Broman 7ad305365f type drange -> drange_t
explicit casts.

svn path=/trunk/; revision=48083
2013-03-05 06:16:45 +00:00
Balint Reczey 1ebdb2e521 Export libwireshark symbols using WS_DLL_PUBLIC define
Also remove old WS_VAR_IMPORT define and related Makefile magic
everywhere in the project.

svn path=/trunk/; revision=47992
2013-03-01 23:53:11 +00:00
Evan Huus 21b5dc0107 Make the buffer argument to FvalueToStringRepr functions volatile
and use that to fix a -Wclobbered error that bleeding-edge GCC throws
on tvbuff types.

Also remove a variable that looked like it was being used to hide the error
before GCC got clever.

svn path=/trunk/; revision=47153
2013-01-18 19:27:31 +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 8909d38842 When comparing fvalue_t we don't modify them, make arguments const.
svn path=/trunk/; revision=45948
2012-11-06 13:28:59 +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
Gerald Combs 44cb77d8de Handle double-clicks in the tree.
svn path=/trunk/; revision=44592
2012-08-19 23:52:08 +00:00
Guy Harris 835111692f From Richard Stearn: support for AX.25, including support for
LINKTYPE_AX25.

svn path=/trunk/; revision=44211
2012-08-02 16:54:43 +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
Jakub Zawadzki 804ba9bbc1 Fix bug 6917
strtod() is locale-aware, change it to g_ascii_strtod()

svn path=/trunk/; revision=43212
2012-06-11 19:27:57 +00:00
Anders Broman b10d4714e1 Try to squelch warnings
svn path=/trunk/; revision=43001
2012-06-02 15:32:54 +00:00
Jeff Morriss 75c3c92f19 Add a "-build" argument to checkAPIs.pl. Use that argument when building
from makefiles (and thus from the buildbot).

The intention is to be able to tell when a human is running the tool so we
can provide more code-review guidance.

As a starter, enable the "too many proto_tree_add_text() calls" check when
a human is running the tool.

svn path=/trunk/; revision=41943
2012-04-04 20:46:49 +00:00
Bill Meier 605dea0486 CVARSDLL hasn't been used (is undefined) for a while....
svn path=/trunk/; revision=41180
2012-02-24 16:23:38 +00:00
Anders Broman 6893eac318 From Tony Trinh:
"matches" operator fails to match hex.

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

svn path=/trunk/; revision=40867
2012-02-05 13:30:27 +00:00
Anders Broman 84370fffcb Add *.sbr files to the clean target.
svn path=/trunk/; revision=40762
2012-01-29 20:21:30 +00:00
Gerald Combs 3c1b8a6ca1 Add a "-G ftypes" option, which dumps our supprted FT_… names and
descriptions. Captitalize and fix up the descriptions. Use its output to
create the field type list in the wireshark-filter man page.

svn path=/trunk/; revision=40306
2011-12-27 20:35:41 +00:00
Martin Mathieson 82186b84df Make some variables volatile to avoid warnings with my gcc version.
svn path=/trunk/; revision=39753
2011-11-08 14:32:13 +00:00
Stig Bjørlykke 42376edbac Do not return from within a TRY/CATCH/ENDTRY because this will make the
except stack invalid, and will lead to a crash.

In this case it was when doing compare functions on a FT_PROTOCOL.

svn path=/trunk/; revision=39749
2011-11-07 16:09:41 +00:00
Stig Bjørlykke 8b0be9ad63 Fixed max and min in sint24_from_unparsed() again.
Note to self: don't think hex while doing something else...

svn path=/trunk/; revision=39664
2011-10-29 09:00:18 +00:00
Stig Bjørlykke 760813589c Fixed max and min in sint24_from_unparsed().
svn path=/trunk/; revision=39662
2011-10-28 20:57:46 +00:00
Stig Bjørlykke 67c6b90fd9 Fixed a typo: strtoull() -> strtoul()
svn path=/trunk/; revision=39661
2011-10-28 20:32:42 +00:00
Stig Bjørlykke a52bf4edc5 Simplified code for checking integer ranges.
svn path=/trunk/; revision=39660
2011-10-28 20:30:41 +00:00
Stig Bjørlykke 3e241efba3 Added range checking for integers and give an appropriate error
message if value is outside of range (given by field type).

svn path=/trunk/; revision=39659
2011-10-28 20:14:13 +00:00
Stig Bjørlykke 4a902dca46 Fixed compare functions for 64 bits integers:
- Do not cast unsigned values to signed
- Do cast signed values from the internal stored unsigned

svn path=/trunk/; revision=39601
2011-10-26 08:34:10 +00:00
Bill Meier 14dd4c3c8d Convert "4 space tabs" to spaces;
Fix vi edtor modeline so it works.

svn path=/trunk/; revision=39075
2011-09-21 16:41:14 +00:00
Anders Broman d785c79f88 From Jakub Zawadzki :
Add support for prefix in IPv6 address filter.
 
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5538

svn path=/trunk/; revision=38916
2011-09-07 11:03:47 +00:00
Stig Bjørlykke 5603cef9f2 Remove support for libpcre, we use GRegex in GLib.
svn path=/trunk/; revision=38683
2011-08-23 09:25:06 +00:00
Anders Broman 42a4b2776e From Dirk:
support ISO style date and time for frame.time filter

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

svn path=/trunk/; revision=38233
2011-07-28 05:49:47 +00:00
Gerald Combs 49b92440de More GLIB_CHECK_VERSION cleanups. Update the minimum GLib/GTK+ versions
in README.devloper. Remove g_gnuc.h since it's no longer needed. Remove
tvbuff_init(), tvbuff_cleanup(), reassemble_init(), and
reassemble_cleanup() since they were only used for older GLib versions
which didn't support GSlices. Assume we always support the "matches"
operator.

svn path=/trunk/; revision=37978
2011-07-11 20:32:19 +00:00
Guy Harris 053c583fda Add some additional routine variants that handle string encodings, and
make FT_STRING and FT_UINT_STRING handle string encodings.

Get rid of FT_EBCDIC in favor of FT_STRING with ENC_EBCDIC.

Add some URLs for DRDA.

Clean up some stuff in TN3270 and TN5250, including using ENC_ values
for proto_tree_add_item().

svn path=/trunk/; revision=37909
2011-07-05 23:59:23 +00:00
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
Stig Bjørlykke 28ae535b00 Removed even more "statement not reached" warnings.
svn path=/trunk/; revision=24286
2008-02-07 15:44:45 +00:00
Stig Bjørlykke c6af1bfdd4 Removed some "statement not reached" warnings.
svn path=/trunk/; revision=24282
2008-02-07 12:14:40 +00:00
Stig Bjørlykke 6d4a2e7ebf Changed email address for Gerald from zing.org to wireshark.org
in a lot of files, which I suppose is correct.

svn path=/trunk/; revision=24034
2008-01-08 22:54:51 +00:00
Guy Harris 9aa28e3176 At least on some LP64 platforms (such as OpenBSD 4.2 on x86-64),
PRI[dux]64 use "ll", but gint64 and guint64 are "long" and "unsigned
long", not "long long" or "unsigned long long", and the compiler warns
about using "%ll[doux]" with "long" or "unsigned long".  Use
G_GINT64_MODIFIER instead.

svn path=/trunk/; revision=23760
2007-12-05 09:05:52 +00:00
Stephen Fisher 849e628334 Introduce a new field type called FT_EBCDIC. This field works the same as
FT_STRING, except that it converts the data from the packet from EBCDIC
to ASCII for display in Wireshark.


svn path=/trunk/; revision=23503
2007-11-19 21:27:01 +00:00
Guy Harris d913f45ef1 Fix bug 1956 - make the bitwise-AND routine treat its arguments as being
IPv4 addresses.  Also, rename that routine to cmp_bitwise_and(), as it's
not working on bit strings.

svn path=/trunk/; revision=23375
2007-11-06 09:19:59 +00:00
Guy Harris 69ba6c7762 The "bitwise AND" display filter operator is supposed to evaluate to
TRUE if the result of the operation has any bit set; that means that the
test should stop and return TRUE as soon as it finds two bytes that when
ANDed together are non-zero, and return FALSE if no such byte was found.

The other test functions don't have "_bytes" in the routine name; don't
put it into this one.

svn path=/trunk/; revision=23374
2007-11-06 08:46:57 +00:00
Luis Ontanon bcd55f4c8e replace oid_to_str_buf() and oid_to_str()
fix a potential buffer overflow due to a very liberal estimate by oid_repr_len()


svn path=/trunk/; revision=22659
2007-08-25 17:29:55 +00:00
Jörg Mayer b16106f89f Only #deinfe __USE_XOPEN if not already defined. On my Suse 10.2 it was
already #defined to 1, so this would create a warning/error.


svn path=/trunk/; revision=21508
2007-04-22 20:04:34 +00:00
Stephen Fisher 62f88a4a04 From Sebastien Tandel:
(Temporarily disable the warnings as errors default on Unix to get
to get the buildbots and people with gcc40 going again until those
additional warnings gcc40 generates can be fixed-I'm working on it
ASAP)

   Patch for configure.in which disables by default the treatment of
warnings as errors.
It can be enabled with './configure --with-warnings-as-errors'.
The macro will test first if GCC is present. If it's the case,
HAVE_WARNINGS_AS_ERRORS is defined. All the USING_GCC have been replaced
by HAVE_WARNINGS_AS_ERRORS.
With this switch, people won't suffer from unexpected warnings when
downloading svn sources during the transition time ;)


svn path=/trunk/; revision=21153
2007-03-23 17:49:59 +00:00
Stephen Fisher 84c5becd89 Add -Werror for gcc to a few more directories and fix a few warnings
svn path=/trunk/; revision=21129
2007-03-22 23:24:13 +00:00
Ulf Lamping dcb1e1bdfd add "treat warnings as errors" flag(s)
svn path=/trunk/; revision=21125
2007-03-22 22:54:00 +00:00
Bill Meier 04d29de81d Fix Windows Makefiles so clean removes all pdb files (PDB_FILE no longer defined)
svn path=/trunk/; revision=21052
2007-03-18 15:36:22 +00:00
Bill Meier 09f508b57b A few more ethereal --> wireshark
svn path=/trunk/; revision=20559
2007-01-26 01:34:29 +00:00
Martin Mathieson 806cf80659 Remove extra element.
svn path=/trunk/; revision=20477
2007-01-18 13:13:55 +00:00
Martin Mathieson 5d32fd280e Missed this one (I don't build with pcre)
svn path=/trunk/; revision=20474
2007-01-18 11:44:24 +00:00
Martin Mathieson 997e5415f9 Add separate union entries to fvalue.value for signed and unsigned
32-bit numbers.  Separate signed and unsigned accessors have been
added and used where appropriate.

Definitely not for 0.99.5.

svn path=/trunk/; revision=20472
2007-01-18 11:02:26 +00:00
Ronnie Sahlberg 95e50279ab since all callers to fvalue_set for FT_STRING[Z] use already_copied==FALSE we now assert that this is the case in ftype-string.c and no longer have a conditional whetehr to create a local copy or not.
svn path=/trunk/; revision=20246
2006-12-30 00:57:46 +00:00
Jaap Keuter 4a780726ce Reverse commit 20209, breaking the build across the board.
svn path=/trunk/; revision=20210
2006-12-24 16:12:04 +00:00
Ronnie Sahlberg 017fdab8a1 make the PCRE ftype use ep allocated memory instead of g_malloced memory
svn path=/trunk/; revision=20209
2006-12-23 21:17:32 +00:00
Ronnie Sahlberg 44535d37b2 make ipv4 ftype use cheap ep_ memory isntead of slightly less cheap g_ memory
for the temporary storage while parsing


svn path=/trunk/; revision=20205
2006-12-23 00:10:49 +00:00
Ronnie Sahlberg 8fc740a53e hmm
best to revert this for a while.



revert all changes from previous patch.



svn path=/trunk/; revision=20195
2006-12-22 09:01:12 +00:00
Ronnie Sahlberg 8433f6d589 change some slab allocated memory into ep/emem allocated structures instead.
this primarily removes code and simplifies (==eliminates) the need to track the data that is allocated and should potentially be slightly faster than a slab allocator.
however these functions are called A LOT so there might be a performance hit when using emem with full debugging canary values and all the bells and whistles activated.


this change also makes any future attempt to parallellize dissection of frames easier if we just make the ep allocator allocate from a threads specific ep pool.
(something we would have to do anyway to make ep allocations multithreaded)



this works in all my tests so far but needs more test coverage.



svn path=/trunk/; revision=20194
2006-12-22 08:35:43 +00:00
Guy Harris 5123a82b3c Fix bytes_repr_len() to correctly handle a zero-length FT_BYTES field
svn path=/trunk/; revision=19863
2006-11-07 20:30:34 +00:00
Tomas Kukosa d89ef87534 Bug 1053: New SNMP filtering is broken
Do not try to parse OID as hexbytes string

svn path=/trunk/; revision=19772
2006-11-02 08:48:58 +00:00
Gerald Combs f7e38bd5e6 Change ETH_VAR_IMPORT to WS_VAR_IMPORT. Try to fix a duplicate variable
definition in the Catapult DCT2000 code.

svn path=/trunk/; revision=18524
2006-06-20 18:30:54 +00:00
Gerald Combs b15974d094 libethereal -> libwireshark. idl2eth -> idl2wrs. There are a _lot_ of
changes here.  It compiles OK on OS X, but hasn't been tested anywhere else.

svn path=/trunk/; revision=18260
2006-05-31 00:23:01 +00:00
Ronnie Sahlberg 89f022b12b name change
svn path=/trunk/; revision=18197
2006-05-21 05:12:17 +00:00
Gilbert Ramirez e3899ed4a4 Add infrastructure for display filter functions.
Add upper() and lower() display filter functions for string fields.

svn path=/trunk/; revision=18071
2006-05-02 14:26:17 +00:00
Guy Harris 7db8eea5c6 Make the GUIDs in various data structures e_guid_t's rather than arrays
of 16 bytes.  Use "sizeof" for the size of e_guid_t's, and use structure
assignment to copy GUID values.

Make functions such as append_h225ras_call() and new_h225ras_call() take
pointers to e_guid_t's as arguments.

Define GUID_LEN in epan/guid-utils.h and use it as the length of a GUID
in a packet.  (Note that "sizeof e_guid_t" is not guaranteed to be 16,
although it is guaranteed to be the size of an e_guid_t.)

When constructing a display filter that matches a GUID, use
guid_to_str() to construct the string for the GUID.

svn path=/trunk/; revision=17676
2006-03-19 20:45:45 +00:00
Jörg Mayer 7e40853dbb propset...
svn path=/trunk/; revision=17574
2006-03-11 01:45:42 +00:00
Tomas Kukosa 082627bdb5 few warnings from GUID handling avoided
svn path=/trunk/; revision=17568
2006-03-10 14:14:39 +00:00
Tomas Kukosa 923855bb20 new FT_GUID handling - big/little endian supported
svn path=/trunk/; revision=17566
2006-03-10 11:58:22 +00:00
Jaap Keuter 7f2b94c59b Fix bug 764. Always initialize the members of the tuple on creation.
svn path=/trunk/; revision=17390
2006-02-23 21:22:54 +00:00
Tomas Kukosa c41cac4285 mark unused parameter
svn path=/trunk/; revision=16700
2005-12-06 12:50:11 +00:00
Tomas Kukosa dcae7d303f new field type FT_OID for OBJECT IDENTIFIERs
svn path=/trunk/; revision=16652
2005-12-02 13:16:58 +00:00
Guy Harris 30b5f0f493 Fix usage of PRI[du]64 - they just replace the "letter" part of the
format, they don't include the "%".

svn path=/trunk/; revision=16384
2005-11-03 04:30:35 +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
Guy Harris 0be296b711 "XXX.XXX.XXX.XXX" is 15 characters, not 14 characters.
svn path=/trunk/; revision=16366
2005-10-30 22:55:30 +00:00
Guy Harris f6ef22c553 Have show_exception() take a "const char *" as its exception message,
and not free the string to which it points.  Pass to
REPORT_DISSECTOR_BUG() strings allocated with ep_strdup_printf(), so
that they're freed automatically.

svn path=/trunk/; revision=16039
2005-09-28 16:16:37 +00:00
Guy Harris aeb8645a56 "strlen()" returns a "size_t"; use that for its return value.
Cast the argument to <ctype.h> macros to "guchar", so that if the 8th
bit is set in the byte, it doesn't get sign-extended.

svn path=/trunk/; revision=15691
2005-09-05 21:18:06 +00:00
Tomas Kukosa 55d8c5cb79 filter expression can contain GUID in XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX form now
svn path=/trunk/; revision=15656
2005-09-01 10:52:33 +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
Anders Broman 6fdb974570 From Richard van der Hoff
negative relative time fixes.

svn path=/trunk/; revision=15407
2005-08-18 12:55:01 +00:00
Jörg Mayer 8433afe23b Albert Chin:
Don't include epan/gdebug.h

Now that epan/gdebug.h is unused: remove it

svn path=/trunk/; revision=15209
2005-08-04 21:09:08 +00:00
Jörg Mayer fc4a2ddfe0 Move declaration of void ftype_register_* to ftypes-int.h.
This fixes some warnings like
ftype-bytes.c:52: warning: no previous declaration for 'bytes_fvalue_free'


svn path=/trunk/; revision=15010
2005-07-23 06:21:17 +00:00
Jörg Mayer 23486b484e Fix lots of warnings of type:
ftypes.c:257: warning: passing argument 1 of 'logfunc' discards
                        qualifiers from pointer target type
by changing 'char*' -> 'const char*'

svn path=/trunk/; revision=15009
2005-07-23 06:19:08 +00:00
Jörg Mayer 5b442f2279 After doing "make maintainer-clean", "svn status --no-ignore | grep ^I"
returned quite a list of files. Add them to MAINTAINERCLEANFILES.

Whitespace changes (replace multiple spaces by TABs, in a few cases this
needed to be done at the beginning of Makefile lines.


svn path=/trunk/; revision=14891
2005-07-10 08:04:27 +00:00
Tomas Kukosa bab34b522b new field type FT_GUID
svn path=/trunk/; revision=14845
2005-07-04 13:04:53 +00:00
Ulf Lamping cf7dee822b replace another g_assert by DISSECTOR_ASSERT, so Ethereal won't crash if a dissector triggers that assert
svn path=/trunk/; revision=13867
2005-03-22 21:39:37 +00:00
Guy Harris 6616a3770c Make the "maintainer-clean" rules get rid of some additional generated
files.  Do this with GENERATED_HEADER_FILES, GENERATED_C_FILES, and
GENERATED_FILES macros in Makefile.common files, along the lines of what
wiretap/Makefile.common has.

Clean up "*~" files with "make clean" rather than only "make distclean"
in some additional places.

Add "maintainer-clean" rules to the Makefile.nmake files, paralelling
the ones in the automake-generated Makefile.in files, using the
GENERATED_FILES macros from Makefile.common files.  In some cases, move
the cleanup of files from "make distclean" to "make maintainer-clean",
and in other cases, put in a comment indicating why we're not doing that
(because some files that are distributed in the source tarballs, namely
Flex output, were built with a UN*X Flex and won't compile on Windows,
so we get rid of them with "make distclean" so you can clean up stuff
that *has* to be re-generated for Windows).

Clean up some *CLEANFILES definitions - get rid of ones that no longer
apply as files were moved or that add to the definition a name that's
already there.

svn path=/trunk/; revision=13402
2005-02-14 20:33:57 +00:00
Gilbert Ramirez 7e9f4b7eb7 From Pekka Pietikainen <pp@ee.oulu.fi>, add a byte to the hex[]
array so that there is room for the terminating NUL from sprintf().

svn path=/trunk/; revision=13256
2005-02-03 15:03:29 +00:00
Lars Roland ea67e4cfab Add functions to the old and the new plugin api for the MATE Plugin.
svn path=/trunk/; revision=12715
2004-12-11 00:13:27 +00:00
Jörg Mayer 54e0e363a9 Get rid of warnings about shadowed variables (code was ok)
svn path=/trunk/; revision=12171
2004-10-01 12:31:52 +00:00
Guy Harris dfad2b94f5 Some UN*Xes don't have any "strtou*" routine to convert a string to a
64-bit integer; use "g_ascii_strtoull()", and, in the configure script,
check whether it's available in GLib (it's not in GLib 1.2[.x]) and, if
not, supply the GLib 2.4.5 version of the routine.

For G_MAXUINT32 and G_MAXUINT64, put a "U" at the end of the constant to
explicitly flag it as unsigned.

svn path=/trunk/; revision=11889
2004-09-03 18:14:00 +00:00
Guy Harris d15724fc9e Make a bunch of source files non-executable.
svn path=/trunk/; revision=11869
2004-09-01 07:07:23 +00:00
Guy Harris 750812d739 guint64 & guint64 is another guint64, but a gboolean is just 32 bits on
most if not all platforms; the "bitwise and" operator in display filters
is Boolean and evaluates to "true" if the result is non-zero and "false"
otherwise, so explicitly do the comparison with 0 to make sure we don't
just throw away the upper 32 bits.

Do the same for the 32-bit bitwise AND as well, although it's not
strictly necessary.

svn path=/trunk/; revision=11828
2004-08-25 03:44:04 +00:00
Guy Harris 39313e5553 GLib 1.2[.x] doesn't define G_MAXUINT64, just as it doesn't define
G_MAXUINT32, so we have to define it if it's not defined.

svn path=/trunk/; revision=11797
2004-08-22 01:40:21 +00:00
Guy Harris c68f62210f Add "tvb_get_ntoh64()" and "tvb_get_letoh64()" routines to fetch 64-bit
integers.

Make FT_INT64 and FT_UINT64 add numerical values, rather than byte-array
values, to the protocol tree, and add routines to add specified 64-bit
integer values to the protocol tree.

Use those routines in the RSVP dissector.

svn path=/trunk/; revision=11796
2004-08-22 00:31:58 +00:00
Guy Harris 3a583aeb59 From Albert Chin: rename resolv.{ch} to addr_resolv.{ch}, so that an
include of <resolv.h> in any system header file gets the system
<resolv.h> (needed for builds on Tru64 with GTK+ 1.2[.x]).

svn path=/trunk/; revision=11615
2004-08-06 19:57:49 +00:00
Jörg Mayer fd24ad7d92 .cvsignore is dead
it has been replaced by
svn proplist -v <dir/file>
and
svn propedit <dir/file>

svn path=/trunk/; revision=11422
2004-07-18 23:44:34 +00:00
Jörg Mayer 56c759212f Add epan/dissectors/.cvsignore
Add tags and TAGS to all .cvsignore files

svn path=/trunk/; revision=11419
2004-07-18 22:51:50 +00:00
Guy Harris 8a8b883450 Set the svn:eol-style property on all text files to "native", so that
they have LF at the end of the line on UN*X and CR/LF on Windows;
hopefully this means that if a CR/LF version is checked in on Windows,
the CRs will be stripped so that they show up only when checked out on
Windows, not on UN*X.

svn path=/trunk/; revision=11400
2004-07-18 00:24:25 +00:00
Guy Harris 12fddb1280 G_MAXINT32, G_MININT32, and G_MAXUINT32 aren't defined by GLib 1.2[.x],
so we have to define them ourselves if they're not defined.

svn path=/trunk/; revision=11384
2004-07-17 08:45:10 +00:00
Guy Harris c27d80c9ad I'm not sure "strtol()" and "strtoul()" are guaranteed to clear "errno"
on success, so we clear it before calling them.

Assign the value of "strtol()" to a "long" and assign the value of
"strtoul()" to an "unsigned long", as those are the return types for
those functions - "gint32" and "guint32" might not be large enough for
the return value on an LP64 platform.

Check for errno being EINVAL, as that can happen if the number isn't
valid.

Before assigning the value returned by "strtol()" or "strtoul()" to the
final destination, check whether it's in the right range for that
destination.

svn path=/trunk/; revision=11382
2004-07-16 23:35:46 +00:00
Guy Harris 003ecf68bb Instead of using pointer casts in the slab allocator stuff, add a
"SLAB_ITEM_TYPE_DEFINE()" macro to define a union of the type of object
for the slab and a pointer to an object of that union type, and use that
type for items on the slab allocator free lists; that *should* avoid
having the compiler think two pointers to an item being added to or
removed from the free list don't point to the same object just because
they have different types.

svn path=/trunk/; revision=11306
2004-07-04 02:29:43 +00:00
Guy Harris 456c6cab66 Make the "SLAB_ALLOC()" and "SLAB_FREE()" macros take the type of the
object being allocated, rather than the name of the free list, as an
argument (with the name of the free list constructed from the name of
the type), and add macros to define and declare the free list, also
taking the type of the object being allocated.

svn path=/trunk/; revision=11305
2004-07-04 00:28:11 +00:00
Guy Harris 7c097187c9 From Graeme Hewson: prevent an assertion failure if a display filter
specifies [i:] and i is >= the length of the frame.

svn path=/trunk/; revision=11258
2004-06-28 06:01:33 +00:00
Guy Harris 7737b1382d From Laurent Rabret: replace "lib" with "link /lib"; "lib" is just a
wrapper around "link /lib", and not all Microsoft C compiler
distributions provide "lib".

svn path=/trunk/; revision=11242
2004-06-26 02:16:16 +00:00
Ronnie Sahlberg 9c880121eb from tomas k
updates to the asn2eth compiler and a new regenerated h235 dissector

svn path=/trunk/; revision=11231
2004-06-24 21:50:05 +00:00
Gerald Combs 4a0a8b7e72 Add a "force_separators" parameter to hex_str_to_bytes so that it's
possible to paste in WEP keys without any separators.

Add doxygen comments to strutil.h.

svn path=/trunk/; revision=11123
2004-06-06 14:29:07 +00:00
Guy Harris e6e3ff60f5 From Graeme Hewson:
Fix assertion failure when absolute value of negative slice
     offset > field length.

     Remove code for handling negative slice lengths.

svn path=/trunk/; revision=11084
2004-06-03 07:34:49 +00:00
Guy Harris 15af0f656f From Lars Roland: add support for building a libethereal.dll with MSVC:
add a config.nmake option to control whether to build
	libethereal.dll or not;

	remove "./wiretap" from PATH to prevent problems due to
	wrongly-loaded files;

	build dissector.lib with MSVC;

	move "print.c" and "ps.c" to the dissector helpers, as "print.c"
	imports variables from packet-frame.c and packet-data.c, which
	are in libethereal;

	move "g711.c" out of the dissector helpers, as they're used only
	by Ethereal in a tap, not in Tethereal or in any dissector;

	add a .def file for libethereal;

	arrange to declare global variables exported from libethereal
	with "__declspec(dllimport)" when building programs that import
	those variables;

	update the NSIS installer.

Make the "configure" script define ETH_VAR_IMPORT as "extern".

svn path=/trunk/; revision=10834
2004-05-09 10:03:41 +00:00
Guy Harris 62f5077dc3 From Graeme Hewson:
Fix off-by-one errors in slice_func

svn path=/trunk/; revision=10831
2004-05-09 08:29:48 +00:00
Guy Harris 35cf424c08 From Graeme Hewson:
"aim.fnac.ssi.buddyname==ab" caused segmentation fault.  Fix
     handling of unparsed value as byte string.

svn path=/trunk/; revision=10830
2004-05-09 08:25:52 +00:00
Guy Harris fa0624b1be Make sure the character values we pass to "isprint()" aren't
sign-extended.

svn path=/trunk/; revision=10767
2004-05-02 07:31:59 +00:00
Gilbert Ramirez fb571671d2 When producing a display-filter representation of an FT_STRING*, represent
any non-printable character in hex, as "\xNN". We rely on isprint(), which
may not be the best solution because it is locale-specific.

svn path=/trunk/; revision=10707
2004-04-26 02:09:37 +00:00
Olivier Biot af4a73a523 At last compiling on CygWin works again! Added the missing PCRE and GLIB
libraries to libftypes.

Provide caching of computed configure tests.

svn path=/trunk/; revision=10600
2004-04-14 18:42:19 +00:00
Olivier Biot eee9dc26ac Fix the CLEANFILES target so both static and shared libraries are cleaned.
svn path=/trunk/; revision=10475
2004-03-24 21:27:44 +00:00
Jörg Mayer b7803c8fc6 Make libethereal and libwiretap shared libs.
svn path=/trunk/; revision=10368
2004-03-13 10:15:36 +00:00
Olivier Biot 1791f84919 First attempt at "bitwise AND" display filter operator.
Document how a display operator can be added.

svn path=/trunk/; revision=10250
2004-02-27 12:00:32 +00:00
Gilbert Ramirez 5cfc41fd88 If the LHS is a STRING or UNPARSED string, and the RHS is a FIELD,
then make sure that the FIELD can participate in the relation that
is expressed in the display filter.

Note that tvbuff's *should* be able to participate in == comparisons, etc.,
but those functions need to be added to ftype-tvbuff.c first.

svn path=/trunk/; revision=10175
2004-02-22 03:04:41 +00:00
Jörg Mayer a02d03c089 Forgot *.la
svn path=/trunk/; revision=10012
2004-02-09 17:23:59 +00:00
Jörg Mayer 96ad35f100 Ignore shared dll stuff
svn path=/trunk/; revision=10011
2004-02-09 16:49:00 +00:00