Commit Graph

76 Commits

Author SHA1 Message Date
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
Jakub Zawadzki deb2b236f2 Add missing includes
svn path=/trunk/; revision=54332
2013-12-21 17:23:17 +00:00
Jakub Zawadzki 746ee39329 Drop isprint.h use g_ascii_isprint() when this include hack was enabled.
svn path=/trunk/; revision=54327
2013-12-21 15:01:45 +00:00
Guy Harris 859cd68acc In r12060, use of the "aim.family" subdissector table was eliminated, in
favor of the AIM dissector having its own private way of handing off to
subdissectors.  Get rid of the subdissector table.

svn path=/trunk/; revision=53989
2013-12-12 21:06:55 +00:00
Michael Mann 8081cf1d90 Add data parameter to tcp_dissect_pdus() as well as convert it to using "new" style dissectors.
Now that "bytes consumed" can be determined, should tcp_dissect_pdus() take advantage of that?

Should tcp_dissect_pdus return length (bytes consumed)?  There are many dissectors that just call tcp_dissect_pdus() then return tvb_length(tvb).  Seems like that could all be rolled into one.

svn path=/trunk/; revision=53198
2013-11-09 17:46:28 +00:00
Michael Mann 9563de93a3 AIM doesn't ever use it's private_data structure, so remove it. If it ever does, just pass the data into the subdissectors.
svn path=/trunk/; revision=52830
2013-10-24 23:59:47 +00:00
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
Chris Maynard d3f277c015 More dissector table UI name changes (a continuation of r51904).
svn path=/trunk/; revision=51907
2013-09-09 22:30:40 +00:00
Anders Broman 221b249acd svn path=/trunk/; revision=48272 2013-03-12 21:58:04 +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
Chris Maynard 43ebecad9a 1) Use tvb_reported_length_remaining instead of tvb_reported_length_remaining.
2) Use proto_item_append_text instead of proto_item_set_text, since this is
   called within a loop.
3) Increment the offset correctly using blocklen-4 instead of
   tvb_length_remaining, which makes no sense.

svn path=/trunk/; revision=45657
2012-10-19 13:50:23 +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 5a8783f5b1 Initial commit to support yet another method of passing data between dissectors.
Add new parameter 'data' to heur_dissector_t and new_dissector_t, for now it's always NULL

svn path=/trunk/; revision=44860
2012-09-10 21:40:21 +00:00
Jakub Zawadzki b18e880040 Update FSF address - part II.
svn path=/trunk/; revision=43538
2012-06-28 23:18:38 +00:00
Anders Broman a90e1a353a Try to make the buildbot happy.
svn path=/trunk/; revision=43067
2012-06-04 14:31:53 +00:00
Anders Broman b69547925f Get rid of a couple of warnings.
svn path=/trunk/; revision=43066
2012-06-04 13:52:46 +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
Alexis La Goutte 1f0cbf3baa Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=42362
2012-04-30 21:15:17 +00:00
Bill Meier 2103e7f38a tvb_[reported_]length_remaining can return -1
svn path=/trunk/; revision=39870
2011-11-15 21:22:01 +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
Gerald Combs 1b0516a27e Fix various Visual C++ analysis warnings.
svn path=/trunk/; revision=35985
2011-02-17 19:43:16 +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 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 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
Jeff Morriss 1bb3148350 From Gregor Jasny via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4073 :
This patch adds the functionality to decode short capabilies.

svn path=/trunk/; revision=30391
2009-10-07 19:46:28 +00:00
Jeff Morriss ef267649c5 One of those if(check_col)'s was hiding another condition (should have been looking closer). Fixes the fuzz failure in bug 4074.
svn path=/trunk/; revision=30248
2009-10-02 13:04:00 +00:00
Jeff Morriss 469012ca87 From Gregor Jasny via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4065 :
Expose the FNAC family and subtype via a hf_ value so you can filter for
specific messages.

From me:

Re-arrange the code a bit: put dissect_aim() at the bottom near the
registration functions.  Remove unnecessary forward declarations.

Reindent a bunch.

Remove a couple check_col() calls; leave one in since it protects several
other calls.

svn path=/trunk/; revision=30243
2009-10-01 19:19:58 +00:00
Kovarththanan Rajaratnam 8b515e9340 Switch a bunch of dissectors over to using tvb_new_subset_remaining()
svn path=/trunk/; revision=29446
2009-08-16 12:36:22 +00:00
Kovarththanan Rajaratnam 6110a96f68 Don't guard col_set_str (COL_INFO/COL_PROTOCOL) with col_check
svn path=/trunk/; revision=29345
2009-08-09 07:59:51 +00:00
Kovarththanan Rajaratnam 4b6090e576 Don't guard col_set_str (COL_INFO) with col_check
svn path=/trunk/; revision=29342
2009-08-09 07:01:26 +00:00
Kovarththanan Rajaratnam e971354a54 Don't guard col_set_str (COL_PROTOCOL) with col_check
svn path=/trunk/; revision=29340
2009-08-09 06:26:46 +00:00
Stig Bjørlykke 4d8dd01e8e Changed flags_set_truth -> tfs_set_notset
svn path=/trunk/; revision=28989
2009-07-07 14:54:15 +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
Stig Bjørlykke fc3f1b5283 From Artem Tamazov (bug 3472):
Save/Restore pinfo->private_data when used.

svn path=/trunk/; revision=28412
2009-05-19 17:16:14 +00:00
Jaap Keuter 40ab5fa84e From Gregor Jasny:
Merge onlinebuddy and userclass stuff from official Oscar protocol documentation.

svn path=/trunk/; revision=26971
2008-12-11 23:00:01 +00:00
Jaap Keuter 73c044fef8 From Gregor Jasny:
I've extended the AIM dissector with the information available from http://dev.aol.com/aim/oscar .
I've verified most of the additions by sniffing my iChat (OSX 10.4) data traffic.

svn path=/trunk/; revision=26813
2008-11-20 07:02:34 +00:00
Bill Meier b52d95d591 #include <emem.h> not req'd
svn path=/trunk/; revision=26091
2008-08-26 01:28:50 +00:00
Jaap Keuter 6198ef668f From Alex Turbov:
Function dissect_aim_tlv_value_uint32 have consumed 24 bits instead of 32 to
obtain a value.

svn path=/trunk/; revision=25752
2008-07-16 05:33:25 +00:00
Jaap Keuter a338ee2d4d From Alex Turbov:
AIM 'New Connection' packet dissector have incorrect size for details pane of
TLV 0x14. Actual size is 4 (not 2).

svn path=/trunk/; revision=25751
2008-07-16 05:17:32 +00:00
Bill Meier ceebccced4 Fix some warnings reported by gcc -Wshadow ...
svn path=/trunk/; revision=25607
2008-06-26 00:16:58 +00:00
Jaap Keuter 734f20160a From Alex Turbov:
Show result code of last SSI operation with a human readable description.

svn path=/trunk/; revision=25375
2008-05-23 19:07:46 +00:00
Anders Broman 840a048b7f Implement some of the minor possible speed improvment patches.
svn path=/trunk/; revision=23192
2007-10-15 20:11: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
Stephen Fisher a058ef7325 Make IPv4 addresses in AIM TLV data human readable.
svn path=/trunk/; revision=20141
2006-12-17 05:37:18 +00:00
Ronnie Sahlberg 2d1bb39121 change the signature for the get_pdu_len() function pointer passed to tcp_dissect_pdus() to also include a packet_info pointer.
there are many reasons why some protocols actually need to be able to access the pinfo structure while determining the pdu size



svn path=/trunk/; revision=19751
2006-10-31 09:29:07 +00:00