Commit Graph

46 Commits

Author SHA1 Message Date
Pascal Quantin a0c53ffaa1 emem -> wmem conversion:
- ep_tvb_get_bits() -> wmem_packet_tvb_get_bits()
- tvb_g_memdup()/ep_tvb_memdup() -> tvb_memdup()
- tvb_fake_unicode()/tvb_get_ephemeral_faked_unicode() -> tvb_get_faked_unicode()
- tvb_get_g_string()/tvb_get_ephemeral_string()/tvb_get_seasonal_string() -> tvb_get_string()
- tvb_get_g_unicode_string()/tvb_get_ephemeral_unicode_string() -> tvb_get_unicode_string()
- tvb_get_ephemeral_string_enc() -> tvb_get_string_enc()
- update docs accordingly

svn path=/trunk/; revision=52172
2013-09-22 15:50:55 +00:00
Pascal Quantin 07c29e74e9 Convert a few more dissectors to wmem API
svn path=/trunk/; revision=52052
2013-09-15 09:12:01 +00:00
Jakub Zawadzki 401cdb009e Convert more dissectors to use hfinfo instead of hfindex.
svn path=/trunk/; revision=51478
2013-08-22 20:54:50 +00:00
Alexis La Goutte 74fa541acf Use "generic" tfs (tfs_set_notset...)
svn path=/trunk/; revision=50692
2013-07-17 10:43:57 +00:00
Alexis La Goutte 58bf1dc4f7 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50627
2013-07-15 18:05:27 +00:00
Michael Mann 0f0c111119 Remove check_col() and the occasional tree.
svn path=/trunk/; revision=49920
2013-06-14 01:02:11 +00:00
Anders Broman 6bde918078 From beroset:
remove C++ incompatibilities 
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48426
2013-03-19 20:00:52 +00:00
Bill Meier c439b805e2 Comment out unused hf[] entries & etc.
(found by checkhf)

svn path=/trunk/; revision=47389
2013-01-31 17:55:31 +00:00
Jeff Morriss 2552c750e5 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45017
2012-09-20 02:03:38 +00:00
Jakub Zawadzki b18e880040 Update FSF address - part II.
svn path=/trunk/; revision=43538
2012-06-28 23:18:38 +00:00
Alexis La Goutte 9806283d4c Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=40997
2012-02-12 18:06:37 +00:00
Bill Meier f645297b23 Fix a proto_tree_add_item() encoding arg;
Remove some unneeded #includes.

svn path=/trunk/; revision=39524
2011-10-23 20:48:47 +00:00
Bill Meier 126aa85393 Convert proto_tree_add_item() 'encoding' arg for field types FT_STRING, FT_STRINGZ, FT_UINT_STRING as follows:
1. If there's no character encoding (ENC_ASCII, ...) specified
    then use ENC_ASCII.
 2. For all but FT_UINT_STRING, always use ENC_NA
    (replacing any existing True/1/FALSE/0
    /ENC_BIG_ENDIAN/ENC_LITTLE_ENDIAN).



svn path=/trunk/; revision=39426
2011-10-15 18:46:26 +00:00
Bill Meier 67ee5049d4 Convert 'encoding' parameter of certain proto_tree_add_item() calls in non-autogenerated epan/dissectors:
Specifically:  Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as
  the encoding parameter for proto_tree_add_item() calls which directly reference
  an item in hf[] which has a type of:
     FT_BOOLEAN
     FT_IPv4
     FT_EUI64
     FT_GUID
     FT_UINT_STRING

Also: For type FT_ITv6 use ENC_NA. (This was missed in SVN #39260)

svn path=/trunk/; revision=39328
2011-10-10 00:39:31 +00:00
Bill Meier 4e57694d4a Convert 'encoding' parameter of certain proto_tree_add_item() calls in non-autogenerated epan/dissectors:
Specifically:  Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as
 the encoding parameter for proto_tree_add_item() calls which directly reference
 an item in hf[] which has a type of:
    FT_UINT8
    FT_UINT16
    FT_UINT24
    FT_UINT32
    FT_UINT64
    FT_INT8
    FT_INT16
    FT_INT24
    FT_INT32
    FT_INT64
    FT_FLOAT
    FT_DOUBLE


svn path=/trunk/; revision=39288
2011-10-06 03:35:44 +00:00
Bill Meier 799578fb29 Use ENC_NA as encoding for proto_tree_add_item() calls which directly reference an hf item with types in hf[] of:
FT_NONE
    FT_BYTES
    FT_IPV6
    FT_IPXNET
    FT_OID

svn path=/trunk/; revision=39261
2011-10-05 00:25:09 +00:00
Bill Meier cfbe5cf55d Fix gcc 4.6 "set but not used [-Wunused-but-set-variable]" warning;
Also:
  Use -1 iso tvb_[reported_]length() as 'len' arg in proto_tree_add_...();
  Use tvb_reported_length_remaining() where appropriate.

svn path=/trunk/; revision=38241
2011-07-28 15:34:18 +00:00
Jeff Morriss 77b3392e72 Introduce, and start using, tvb_fc_to_str() and tvb_fcwwm_to_str(): these
functions act like their non-tvb counterparts except that they take a tvb and
and offset instead of a pointer to a byte array.

This basically saves the dissectors from having to call tvb_get_ptr()--which in
this case eliminates a couple of typos in the length given to tvb_get_ptr().

svn path=/trunk/; revision=35549
2011-01-16 04:33:42 +00:00
Jeff Morriss 61876001c3 Replace some tvb_get_ptr()s with tvb_get_ephemeral_string()s to ensure the
return string is NULL terminated.

There's no need to pass the result of tvb_get_ptr() as the 'value' in
proto_tree_add_*(): just use proto_tree_add_item().

svn path=/trunk/; revision=35548
2011-01-16 03:57:12 +00:00
Guy Harris a8bc4a0d13 Rename the routines that handle dissector tables with unsigned integer
keys to have _uint in their names, to match the routines that handle
dissector tables with string keys.  (Using _port can confuse people into
thinking they're intended solely for use with TCP/UDP/etc. ports when,
in fact, they work better for things such as Ethernet types, where the
binding of particular values to particular protocols are a lot
stronger.)

svn path=/trunk/; revision=35224
2010-12-20 05:35:29 +00:00
Bill Meier e7568712ef Define some fcns & vars as static;
Minor whitespace and comments cleanup.

svn path=/trunk/; revision=34477
2010-10-11 19:00:55 +00:00
Bill Meier 69df32fb11 #include <string.h> not needed.
svn path=/trunk/; revision=32411
2010-04-06 22:09:47 +00:00
Bill Meier 09764dd969 Remove unneeded #include <stdio.h>
svn path=/trunk/; revision=32367
2010-04-03 21:55:23 +00:00
Stig Bjørlykke b228488bc0 From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
    for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
    FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero

svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
Bill Meier f8e3822738 Fix some warnings reported by gcc -Wshadow ...
Fix some spacing in packet-dcom.c

svn path=/trunk/; revision=25618
2008-06-27 16:15:30 +00:00
Anders Broman 9d316093f6 Apply yet another set of the optimization patches:
-set_str2add_str_val_to_str

svn path=/trunk/; revision=23406
2007-11-08 22:49:03 +00:00
Ronnie Sahlberg 927bf43d09 update filter fields for bug 1803
svn path=/trunk/; revision=23038
2007-09-30 22:34:19 +00:00
Jeff Morriss 3dec62b85c - s/ntohs/g_ntohs
- s/ntohl/g_ntohl
- s/free/g_free
- Change some tvb_get_string()+g_free()'s into tvb_get_ephemeral_string()
- Change some tvb_fake_unicode()+g_free()'s into tvb_get_ephemeral_faked_unicode()
- Change some tvb_get_string() calls that were clearly memory leaks (like
  atoi(tvb_get_string(...))) into tvb_get_ephemeral_string()

svn path=/trunk/; revision=22515
2007-08-15 22:27:52 +00:00
Stephen Fisher 8fd3ee0560 Remove almost all of the casts I committed recently and in place of
them, add -Wno-pointer-sign to CFLAGS when gcc will accept it.


svn path=/trunk/; revision=21253
2007-03-28 21:55:11 +00:00
Stephen Fisher ab8f589336 Fix about 100 simple to fix warnings from gcc 4.0 in epan/dissectors
svn path=/trunk/; revision=21233
2007-03-27 22:50:11 +00:00
Ronnie Sahlberg 494e873eb0 move the ITL and the ITLQ structure to packet-scsi.h where it belongs
svn path=/trunk/; revision=19492
2006-10-11 10:38:59 +00:00
Ronnie Sahlberg feab79e328 change a whole bunch of ethereal into wireshark
svn path=/trunk/; revision=18196
2006-05-21 04:49:01 +00:00
Ronnie Sahlberg 96729e741d remove some strcpy() and some buffers.
boy o boy   the fc dissector family is in really poor shape and should be rewritten 




svn path=/trunk/; revision=16329
2005-10-27 08:18:59 +00:00
Ronnie Sahlberg d69d22bcf5 remove a bunch of arrays, some strcpy() and make it dissect the fc4 type bitmask better
svn path=/trunk/; revision=16307
2005-10-25 11:24:24 +00:00
Ronnie Sahlberg 814c216689 remove some strcpy() and dissect a bitfield properly
only 86 strcpy() now remain in epan/dissectors


svn path=/trunk/; revision=16197
2005-10-12 01:43:25 +00:00
Guy Harris b7b80d94be Move a pile of protocol-related headers from the top-level source
directory to the epan directory.  Some of them should perhaps ultimately
be moved to epan/dissectors, if they pertain only to stuff exported by a
particular dissector.

Fix Gerald's e-mail address in files we're moving.

svn path=/trunk/; revision=15844
2005-09-17 00:02:31 +00:00
Ronnie Sahlberg e6dd3c8b22 more sprintf updates
svn path=/trunk/; revision=15469
2005-08-20 13:02:08 +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
Ronnie Sahlberg a1c541945e gmemchunk -> se_alloc() improvements
svn path=/trunk/; revision=15322
2005-08-12 23:17:30 +00:00
Ronnie Sahlberg ec3ab9ec3e rename ep_tvb_get_string() to tvb_get_ephemeral_string() asnd update the documentation in README.developer
svn path=/trunk/; revision=15270
2005-08-10 13:41:13 +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
Ronnie Sahlberg 0d7a2abbc7 some more memification of tvb_get_string() no obvious memleaks fixed this time :-(
svn path=/trunk/; revision=15131
2005-07-28 09:47:28 +00:00
Gerald Combs 9ead15a6eb README.developer says:
"PROTOABBREV     A name for the protocol for use in filter expressions;
                 it should contain only lower-case letters, digits, and
                 hyphens."

In proto_register_protocol(), generate a warning if PROTOABBREV contains
invalid characters.  Along with the list above, allow underscores and
periods.  Fix up whitespace.

Lower-case PROTOABBREV in several dissectors.

svn path=/trunk/; revision=13967
2005-03-29 14:56:09 +00:00
Anders Broman 851ecd2ac4 From Jon Ringle:
1) Added a setup_frame parameter to conversation_t
2) Used the conversation_t next to maintain a list of conversations with the 
same src/dest tuple but different setup_frame number.
3) Changed the signature of find_conversation() and conversation_new() to pass 
in the frame number.
4) Adjusted packet-sdp to select RTP conversation if both m=audio and m=image 
are present, and T.38 conversation if only m=image is present. I expect that 
RTP/T.38 dissecting to be better, but I don't have a way to generate T.38 
packets.

svn path=/trunk/; revision=13243
2005-02-02 20:07:03 +00:00
Guy Harris 3f0d0ca5ea Note what Fibre Channel spec documents this protocol.
Don't assign the const pointers passed to hash routines to non-const
pointers.

In "zonenm_to_str()", don't assume there's a null terminator in the
packet - use "tvb_get_string()" so that the buffer into which it's
copied is explicitly null-terminated.

Put the Domain & Port into the protocol tree as a "0xXXXXXXXX" string,
rather than as a string with one blank in it.

svn path=/trunk/; revision=12909
2004-12-31 22:00:44 +00:00
Gilbert Ramirez 669db206cb Move dissectors to epan/dissectors directory.
Also move ncp222.py, x11-fields, process-x11-fields.pl,
make-reg-dotc, and make-reg-dotc.py.

Adjust #include lines in files that include packet-*.h
files.

svn path=/trunk/; revision=11410
2004-07-18 18:06:47 +00:00