Commit Graph

39 Commits

Author SHA1 Message Date
Guy Harris 8c3b36deb8 Don't assume the HTTP dissector is being called from the TCP dissector.
It's not - it could be called from the SSL dissector or the SCTP
dissector.  Create separate dissectors for all of them; they can, if
passed appropriate metadata in the "data" argument, process it
appropriately for the type of metadata the calling tissector supplies.

Bug: 12344
Change-Id: I8d9a2f3173e6de42b31993bbb6c81d161f68bf8c
Reviewed-on: https://code.wireshark.org/review/14944
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-04-17 02:32:04 +00:00
Michael Mann 9bcac48403 Manually add protocol dependencies derived from find_dissector.
Started by grepping call_dissector_with_data, call_dissector_only and call_dissector and traced the handles passed into them to a find_dissector within the dissector.  Then replaced find_dissector with find_dissector_add_dependency and added the protocol id from the dissector.
"data" dissector was not considered to be a dependency.

Change-Id: I15d0d77301306587ef8e7af5876e74231816890d
Reviewed-on: https://code.wireshark.org/review/14509
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-20 12:48:48 +00:00
Michael Mann 443a7ed259 new_create_dissector_handle -> create_dissector_handle for dissector directory.
Some of the ASN.1 dissectors still generate a new_create_dissector_handle from the tool itself, so leave those for now.

Change-Id: Ic6e5803b1444d7ac24070949f5fd557909a5641f
Reviewed-on: https://code.wireshark.org/review/12484
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-09 12:37:36 +00:00
Michael Mann bbdd89b973 create_dissector_handle -> new_create_dissector_handle
Picking off "easy" dissectors that only have one or two exit points at most.

Change-Id: Ie514f126352e7598acc4f7c38db9c61d105d5e48
Reviewed-on: https://code.wireshark.org/review/11850
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-16 03:50:05 +00:00
Guy Harris ff9f9fc431 Don't include "file.h" if you don't need it.
It ends up dragging in libwireshark headers, which programs not linking
with libwireshark shouldn't do.  In particular, including
<epan/address.h> causes some functions that refer to libwireshark
functions to be defined if the compiler doesn't handle "static inline"
the way GCC does, and you end up requiring libwireshark even though you
shouldn't require it.

Move plurality() to wsutil/str_util.h, so that non-libwireshark code can
get it without include epan/packet.h.  Fix includes as necessary.

Change-Id: Ie4819719da4c2b349f61445112aa419e99b977d3
Reviewed-on: https://code.wireshark.org/review/11545
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-04 08:46:30 +00:00
Martin Kaiser 6a35ee33ef dapp: cleanup, make elements filterable
don't squeeze all info into the subtree title
remove an unnecessary THROW()

Change-Id: I542f220d9d786d0fa879a0b2fe4549ffa1ca87af
Reviewed-on: https://code.wireshark.org/review/9544
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-07-08 22:02:44 +00:00
Martin Kaiser f196061889 (trivial) daap: remove if(tree) and return; at the end of a function
Change-Id: I969efbaeda75d2790165a6cbc214f58f1bd0ba7f
Reviewed-on: https://code.wireshark.org/review/9190
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-06-27 05:46:51 +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
AndersBroman 1b733e18f5 Fix a broken comment
Change-Id: I4358c118ec890456468d7aa8eda00fb0ddbaea20
Reviewed-on: https://code.wireshark.org/review/4364
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-09-29 14:28:32 +00:00
Bill Meier 10406870f5 Add editor modelines; fix indentation as needed.
Change-Id: I1ad94654343e5a018a0b3159481d45ffb3a91263
Reviewed-on: https://code.wireshark.org/review/4363
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-29 13:47:02 +00:00
Michael Mann 9d5f9141af Eliminate proto_tree_add_text from some dissectors.
Other minor cleanup while in the area.

Change-Id: Id8d957d3d68a2e3dd5089f490bd59d773e1be967
Reviewed-on: https://code.wireshark.org/review/3427
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-08-05 07:36:26 +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
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
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
Anders Broman 5a85b7fed2 [-Wmissing-prototypes]
Use explicit casts.

svn path=/trunk/; revision=48338
2013-03-16 08:52:09 +00:00
Guy Harris e9479b543f A "DAAP request" is just an HTTP request of a certain type, possibly on
port 3689.  They don't have the media type application/x-dmap-tagged, so
they're not handed to us any more.  (This means that the Info column now
shows the HTTP URI rather than just "DAAP Request", so that's arguably a
feature; if you want to see all the traffic in the session, use "Follow
TCP Stream" or look for port 3689.)

svn path=/trunk/; revision=47377
2013-01-30 21:56:54 +00:00
Guy Harris a4714f643a Add a routine to allow dissectors to specify ports that carry HTTP
traffic *without* claiming all that traffic for themselves; they might
want, instead, to register for a particular media type.

Not all traffic to or from port 3689 is DAAP - not even traffic between
two Apple machines doing media stuff (e.g., some FairPlay traffic
isn't).  Register for the media type application/x-dmap-tagged, and just
say port 3689 is HTTP.  This means we can get rid of the FPLY hack, as
that traffic is application/octet-stream.  Update some comments.

Leave it up to the DAAP dissector to tag traffic as DAAP in the protocol
column.

svn path=/trunk/; revision=47376
2013-01-30 21:49:33 +00:00
Guy Harris b1e6d2730e Some FairPlay stuff in DAAP starts out with a 4-character FPLY tag, but
what follows the tag isn't a length, it's some unknown form of data.

svn path=/trunk/; revision=47370
2013-01-30 20:08:50 +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 794757ae8f For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.
Also: remove trailing whitespace for a number of files.

svn path=/trunk/; revision=39503
2011-10-21 02:10:19 +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
Anders Broman b87f9143e4 Get rid of check_col, while at it set ENC.
svn path=/trunk/; revision=39149
2011-09-26 14:50:59 +00:00
Stephen Fisher 669162b440 From Nick Glass via bug #5887: DACP (apple remote) enhancement to DAAP
dissector.

Me: Add Nick to AUTHORS file. 


svn path=/trunk/; revision=36987
2011-05-04 19:42:51 +00:00
Bill Meier 03b57df5a0 Fix various typos and spelling errors.
svn path=/trunk/; revision=35126
2010-12-06 01:34:58 +00:00
Bill Meier 13f264e34a Tighten up TLV processing a bit to prevent a potential loop.
svn path=/trunk/; revision=34954
2010-11-18 19:25:11 +00:00
Bill Meier 311cac0568 Use value-string_ext fcns to access value_string array;
Sort value_string_array in ascending order by value;
Reformat display of tag info to be more readable;
Rework TLV processing;
Remove unneeded variable;
Minor whitespace cleanup.

svn path=/trunk/; revision=34933
2010-11-17 21:40:21 +00:00
Jeff Morriss 58d018e21a From Yaniv Kaul via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5400 :
The attached patch adds many more DAAP codes to be parsed properly by the DAAP
dissector.
In addition, it fixes some prints.

svn path=/trunk/; revision=34899
2010-11-16 15:01:43 +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
Anders Broman 1950ffc214 Apply the small performance enhancment patches for:
- if offset is 0, tvb_length is the same as tvb_length_remaining, just faster.
Replace 
- col_append_fstr() with faster  col_append_str() 
- col_add_str() with col_set_str()
when it's safe

svn path=/trunk/; revision=23252
2007-10-23 05:50:00 +00:00
Guy Harris 5a43799a17 Use G_GINT64_MODIFIER, rather than the PRI[douxX]64 macros, for GLib
routines and routines using those routines.  GLib might use different
modifiers for 64-bit quantities than the platform's C library does.

svn path=/trunk/; revision=21990
2007-05-29 18:52:42 +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 79588aa6e9 The real problem is that iTunes requests gzipped data and responds with
it, so unless you're reassembling headers and bodies the DAAP dissector
will see the gzipped crap.  The HTTP dissector should perhaps not bother
handing gzipped or otherwise unusually-encoded bodies to subdissectors
if it's not undoing the encoding.

svn path=/trunk/; revision=15368
2005-08-16 02:04:02 +00:00
Guy Harris 1106ac4105 Put in a comment asking about the music going over the connection - we
shouldn't try to parse it as DAAP.

svn path=/trunk/; revision=15231
2005-08-05 23:18:05 +00:00
Ulf Lamping 6fe12c02b5 bugfix of crash_00001_20050124142515.cap: dissector packet-daap.c displayed [Dissector Bug] as it dissected a length field and used it without checking it first.
use tvb_ensure_bytes_exist() before using this length value, so [Malformed Packet] will be displayed

svn path=/trunk/; revision=13177
2005-01-26 22:37:04 +00:00
Guy Harris c2e6d1e686 Use "tvb_format_text()" with %s format strings, so that we handle
non-printable strings.

svn path=/trunk/; revision=12952
2005-01-05 09:53:03 +00:00
Jörg Mayer 2d3ad182c9 Propset eol-style and keywords
svn path=/trunk/; revision=11805
2004-08-22 09:07:19 +00:00
Guy Harris 5294957f26 Use "tvb_get_ntoh64()", now that we have it.
svn path=/trunk/; revision=11802
2004-08-22 03:11:43 +00:00
Guy Harris 89de832c93 From Kelly Byrd: DAAP support.
svn path=/trunk/; revision=11801
2004-08-22 03:04:54 +00:00