Commit Graph

28 Commits

Author SHA1 Message Date
AndersBroman 870d223b69 Change deprecated API tvb_length -> tvb_reported_length
Change-Id: I14577dccaed5aa5ed85e94b6810a94b4c8b2e437
Reviewed-on: https://code.wireshark.org/review/8059
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-04-14 06:58:40 +00:00
Bill Meier b5d7b7ab6e Cleanup use of #includes in non-generated epan/dissector/*.c
Specifically:
- Set packet.h to be the first wireshark #include after
   config.h and "system" #includes.
   packet.h added as an #include in some cases when missing.
- Remove some #includes included (directly/indirectly) in
   packet.h. E.g., glib.h.
   (Done only for those files including packet.h).
- As needed, move "system" #includes to be after config.h and
   before wireshark #includes.
- Rework various #include file specifications for consistency.
- Misc.

Change-Id: Ifaa1a14b50b69fbad38ea4838a49dfe595c54c95
Reviewed-on: https://code.wireshark.org/review/5923
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-21 05:46:22 +00:00
Bill Meier 0b18d6cb77 Add editor modelines; Adjust whitespace as needed.
Change-Id: I6e70c933ae61a97377235d67b2f6a1b3d67dc155
Reviewed-on: https://code.wireshark.org/review/4484
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-10-05 20:19:02 +00:00
Michael Mann 14824e6adf Revert "Fixup: tvb_* -> tvb_captured"
https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html

This reverts commit 246fe2ca4c.

Change-Id: Ib24bae0198c13a84bd7f731bf4af921212109a8f
Reviewed-on: https://code.wireshark.org/review/2430
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19 18:25:59 +00:00
Dario Lombardo 246fe2ca4c Fixup: tvb_* -> tvb_captured
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f
Reviewed-on: https://code.wireshark.org/review/2377
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18 14:14:58 +00:00
Guy Harris 7d83a8755a Don't use tvb_get_nstringz0(), use tvb_get_string_enc().
Change-Id: I8e654fa857fca6713198e3d20f2a14a0a444e935
Reviewed-on: https://code.wireshark.org/review/1037
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-04-09 08:05:07 +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
Guy Harris 2019647757 At least according to
http://web.archive.org/web/20080308233204/http://dev.aol.com/aim/oscar/#SNAC

"In general strings are not NULL terminated and are encoded using UTF8."

It also says

	Authentication

	Over the years, the AIM backend has supported several different
	methods for authentication. ...

	When a client collects the loginId and password for the user it
	should not normalize them in any manner.  It also should not
	prevent the user from entering certain characters as the AIM
	name space is constantly changing.  For example, currently the
	AIM name space is ASCII based, but in the future that may
	change.  In general, the client should not perform input
	checking and instead allow the backend to reject bad values.

which also suggests not assuming ASCII.

So use ENC_UTF_8 in most cases.

For actual messages, it says:

	An IM can be encoded in the following different forms:

	Name	Value	Notes
	ASCII	0	ANSI ASCII -- ISO 646
	UNICODE	2	ISO 10646.USC-2 Unicode
	LATIN_1	3	ISO 8859-1

so, if that's the case, the dissector should choose beween
ENC_ASCII|ENC_NA, ENC_UCS_2|ENC_appropriate_ENDIAN, and
ENC_ISO_8859_1|ENC_NA.

Use tvb_get_string_enc() with an encoding rather than tvb_get_string().

svn path=/trunk/; revision=54908
2014-01-22 20:05:17 +00:00
Anders Broman 221b249acd svn path=/trunk/; revision=48272 2013-03-12 21:58:04 +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
Bill Meier d53320919a Remove unneeded #includes (stdlib, stdio, ctypes, time);
In a few cases: do some whitespace, indentation cleanup & reformatting.

svn path=/trunk/; revision=42632
2012-05-15 19:23:35 +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
Guy Harris fd2f818353 Use ENC_ values in proto_tree_add_item() calls.
In the AgentX dissector, make the "flags" arguments guint8, to match
what's passed in.

In the AIM dissector, use val_to_str() in col_add_str() calls - it gives
the same result if there's a match, and puts a note in the Info column
if there isn't, and is less complicated.

In the AJP13 dissector:

	update the URL for the protocol documentation;

	add #defines for message types, and use them;

	for "enumerated data type" fields, make the fields numerical
	rather than strings and give them the value_string tables;

	get rid of col_check() calls;

	make a Boolean item an FT_BOOLEAN.

svn path=/trunk/; revision=39085
2011-09-22 03:10:30 +00:00
Bill Meier 695aff26f9 (Minor) Rename a few variables in the global namespace to be a bit more unique;
Also: rename additional (static) variables to be consistent with the above renames.

svn path=/trunk/; revision=34412
2010-10-07 21:23:36 +00:00
Bill Meier 10ffd14b8f Indentation & whitespace cleanup (including: "4 space tabs" ==> spaces)
svn path=/trunk/; revision=32735
2010-05-10 15:54:57 +00:00
Bill Meier 055dd62063 #include <string.h> not needed.
svn path=/trunk/; revision=32410
2010-04-06 21:14:01 +00:00
Bill Meier 09764dd969 Remove unneeded #include <stdio.h>
svn path=/trunk/; revision=32367
2010-04-03 21:55:23 +00:00
Anders Broman aaa917be72 remove check_col
svn path=/trunk/; revision=32089
2010-03-03 13:52:17 +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
Anders Broman e600941645 From Chris Maynard:
Incorrect display filter field naming convention.

svn path=/trunk/; revision=22742
2007-08-30 05:22:25 +00:00
Stephen Fisher aa4d4f727c From Sebastien Tandel:
Fixes for warnings


svn path=/trunk/; revision=21164
2007-03-24 07:33:25 +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
Guy Harris 3778ca99c1 If a given TLV type isn't found in an aim_tlv table, just use "Unknown"
as the description - some aim_tlv tables have NULL in the end-of-table
entry.

For those that don't, replace "Unknown" with NULL; "Unknown" is now
redundant.

svn path=/trunk/; revision=13084
2005-01-17 08:13:02 +00:00
Ulf Lamping 78ff68d4b5 a lot of warnings removed, most of them about pointer to int casts without using the appropriate GLib macros
svn path=/trunk/; revision=12832
2004-12-25 13:49:30 +00:00
Guy Harris 285066ac5b From Jelmer Vernooij:
- Dissect ICQ TLV values
- Dissect channel 1 and channel 2 messages correctly in Oscar (required
  for dissecting direct connections)

svn path=/trunk/; revision=12072
2004-09-23 17:40:36 +00:00
Guy Harris 94e550fe69 From Jelmer Vernooij:
Remove some code duplication from the Oscar dissector (reduces
	the number of lines by 500) by providing a custom registration
	function for oscar families (aim_init_family).  This also fixes
	a number of issues with column names.

	Add minor updates such as adding support for the Capability Info
	TLV on users.

svn path=/trunk/; revision=12060
2004-09-21 08:01:29 +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