Commit Graph

92 Commits

Author SHA1 Message Date
Alexis La Goutte dd22928472 AIM: Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
remove also orig_offset (no longer needed)

Change-Id: Idc65b45fb67bae6acdca33962f3352a50296a6e5
Reviewed-on: https://code.wireshark.org/review/8650
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-05-26 11:07:56 +00:00
Michael Mann 00041a4efe Revert "[AIM] Fix string length"
It's a FT_UINT_STRING field type

This reverts commit dc14e3ce0d.

Change-Id: I1185efbad459887fb9c16fb01e670bc43e6f2d84
Reviewed-on: https://code.wireshark.org/review/8623
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-05-26 09:10:44 +00:00
Anders dc14e3ce0d [AIM] Fix string length
Change-Id: I64f73bd5cb131ad6efc64eea6a7eb66af9cee5c4
Reviewed-on: https://code.wireshark.org/review/8622
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-05-25 07:40:10 +00:00
Michael Mann df38a2d3a8 Remove proto_tree_add_text from AIM dissectors.
Change-Id: Ic7385d0555d72aa8ea2b9beb284ca1f6a115b174
Reviewed-on: https://code.wireshark.org/review/8616
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-05-25 04:19:37 +00:00
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
Hadriel Kaplan ceb8d954d2 Lua: Expose tcp_dissect_pdus() to Lua
Provide a way for Lua-based dissectors to invoke tcp_dissect_pdus()
to make TCP-based dissection easier.

Bug: 9851
Change-Id: I91630ebf1f1fc1964118b6750cc34238e18a8ad3
Reviewed-on: https://code.wireshark.org/review/6778
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
Tested-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-01-27 15:14:12 +00:00
Michael Mann 3d3f97320b Replace ip_to_str with [ep_]address_to_str and tvb_ip_to_str.
Change-Id: I40d0c8253743183aecef252040b7dd6742ae5c71
Reviewed-on: https://code.wireshark.org/review/5934
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-26 21:17:10 +00:00
Martin Mathieson 596669f921 First batch of unincludes. Last attempt...
Change-Id: I3681462aeb98ca62ed3ec5eb226b2553317391a9
Reviewed-on: https://code.wireshark.org/review/5997
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-12-22 21:03:13 +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
Michael Mann 05516b0c92 Use proto_tree_add_bitmask for groups of proto_tree_add_boolean.
Part 1 of many

Change-Id: I77a5789ac23388e6a5f8098dc398592f39638124
Reviewed-on: https://code.wireshark.org/review/5532
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-11-29 22:42:56 +00:00
Guy Harris 0b9eb9f4b7 Get rid of unnecessary includes of ctype.h.
Change-Id: I2cf49f808558147ce77e7d086558966cfb2defca
Reviewed-on: https://code.wireshark.org/review/4850
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-20 06:02:51 +00:00
Bill Meier 482e8e5651 Add editor modelines & adjust indentation/whitespace as needed.
Change-Id: Ice2d93632cd42dfcef3bfbf0e15f2a8a147278fc
Reviewed-on: https://code.wireshark.org/review/4433
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-10-02 22:30:52 +00:00
Michael Mann 188aa9a80e convert to proto_tree_add_subtree[_format]
Change-Id: Ib60ca75b7da8cfa21cfe2999c9b9448a02c332df
Reviewed-on: https://code.wireshark.org/review/2560
Tested-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-22 21:07:16 +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
Michael Mann 73217d9f3f tvb_new_subset -> tvb_new_subset_length when length parameters are equal.
tvb_new_subset -> tvb_new_subset_remaining it appears that's what the intention is.

Change-Id: I2334bbf3f10475b3c22391392fc8b6864454de2d
Reviewed-on: https://code.wireshark.org/review/1999
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-07 15:41:07 +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
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