Commit Graph

96 Commits

Author SHA1 Message Date
Martin Kaiser 1e9bc6e483 handle TS packet reassembly for PES packets with 0 length field
(unknown length)

this fixes bug 9527

Change-Id: I255ae9662dfeea06e61e4b0891e0ea8eaa254d0f
Reviewed-on: https://code.wireshark.org/review/2462
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-06-19 21:52:44 +00:00
Martin Kaiser 0c0bd541a1 no need to initialize these two vars
Change-Id: Ie1a71046b791bcbbf3cf02ddd1c4ddc88b388302
Reviewed-on: https://code.wireshark.org/review/2461
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-06-19 21:52:25 +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
Martin Kaiser 653dd75483 simplify PCR calculation
Change-Id: I892088e158519e331cba89be3c8d7c71f38a8925
Reviewed-on: https://code.wireshark.org/review/1964
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-05 04:12:33 +00:00
Martin Kaiser cd4ba3d271 make the PCR value filterable
this fixes bug #10158

Change-Id: Ic67b074c464c52ac523e835b9815a5c3a3fa14d9
Reviewed-on: https://code.wireshark.org/review/1925
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-03 13:09:24 +00:00
Guy Martin eb3cdb925c Zero out pinfo->src and dst before adding a frag.
If an mp2t packet contains one full subpacket and the fragment of
another one, it happens that the first subpacket will set src or dst to
an ethernet or IP address. Adding the fragment of the second subpacket
will then use this information for calculating the hash in the fragment
table. However, later fragments in other mp2t packets will not have
these info and reassembly will fail.

Change-Id: Ic52763017cb854851b6686654c2d8a1624305d65
Reviewed-on: https://code.wireshark.org/review/1692
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-23 12:47:48 +00:00
Guy Martin 78ba6e45c2 Fix warning about the adaptation field control for docsis packet. The specs actually say that it should be set to 1.
Change-Id: I136b48c6284c09798ee8e88f012a20e2cb16cd5e
Reviewed-on: https://code.wireshark.org/review/1693
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-05-19 17:22:09 +00:00
Guy Martin 69623c92d7 Increase frag_id for self contained subpackets in mp2t packets. This fix length calculation on second pass.
Change-Id: I6224657c0765fa9696829844b4819f6ab0a3d3f4
Reviewed-on: https://code.wireshark.org/review/1690
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-05-19 17:14:46 +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 d6b35d5c6b mp2t: return offset when dissecting AF (continuation of r54396)
svn path=/trunk/; revision=54476
2013-12-27 17:42:46 +00:00
Jakub Zawadzki 37ec8781bb mp2t: rework dissecting adaptation field
- move dissecting adaptation field length to dissect_mp2t_adaptation_field()
- return offset, not delta.

svn path=/trunk/; revision=54396
2013-12-23 18:07:28 +00:00
Jakub Zawadzki 8c870995f0 mp2t: avoid calling get_mp2t_conversation_data()
svn path=/trunk/; revision=54395
2013-12-23 18:06:33 +00:00
Anders Broman e8b935ad6e Fix [-Wmissing-prototypes]
svn path=/trunk/; revision=54209
2013-12-18 06:51:09 +00:00
Jakub Zawadzki 5c79cbf152 Fix some trivial warnings.
svn path=/trunk/; revision=54085
2013-12-14 10:29:26 +00:00
Jakub Zawadzki 82e2675f45 Avoid including <wiretap/wtap.h> in dissectors.
svn path=/trunk/; revision=53655
2013-11-29 20:53:00 +00:00
Michael Mann 9b7fb8a811 Create the ability to have packet scoped "proto" data. Bug 9470 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9470)
I'm not sold on the name or module the proto_data functions live in, but I believe the function arguments are solid and gives us the most flexibility for the future.  And search/replace of a function name is easy enough to do.

The big driving force for getting this in sooner rather than later is the saved memory on ethernet packets (and IP packets soon), that used to have file_scope() proto data when all it needed was packet_scope() data (technically packet_info->pool scoped), strictly for Decode As.

All dissectors that use p_add_proto_data() only for Decode As functionality have been converted to using packet_scope().  All other dissectors were converted to using file_scope() which was the original scope for "proto" data.

svn path=/trunk/; revision=53520
2013-11-23 02:20:13 +00:00
Martin Kaiser 733713b4b1 if pointer==0, the section starts immediately
don't add an empty fragment to the list

this should fix the asserts reported in
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9325
and
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8352

svn path=/trunk/; revision=52969
2013-10-29 21:50:21 +00:00
Martin Kaiser 41182561dd separate function for dissecting the adaptation field
svn path=/trunk/; revision=52967
2013-10-29 21:40:09 +00:00
Martin Kaiser 6ef5eb635c TABs -> spaces
add editor modelines

svn path=/trunk/; revision=52934
2013-10-28 21:49:56 +00:00
Martin Kaiser 5587250676 make Pointer filterable
svn path=/trunk/; revision=52925
2013-10-28 17:16:43 +00:00
Martin Kaiser 8367a1acbd packed_analysis_data_t -> packet_analysis_data_t
svn path=/trunk/; revision=52924
2013-10-28 17:13:13 +00:00
Martin Kaiser 1a7a05ab55 correct typos
svn path=/trunk/; revision=52923
2013-10-28 17:10:09 +00:00
Martin Kaiser 8a2b9d87f3 remove unnecessary return; lines
svn path=/trunk/; revision=52922
2013-10-28 17:08:55 +00:00
Michael Mann 9e3f9b449f expert_add_info_format_text -> expert_add_info_format
svn path=/trunk/; revision=51852
2013-09-09 00:44:09 +00:00
Alexis La Goutte 9c43ccd371 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=51668
2013-09-02 23:13:12 +00:00
Evan Huus 14e6dddcdc Replace some emem with wmem.
svn path=/trunk/; revision=51512
2013-08-25 14:23:13 +00:00
Jakub Zawadzki f4bcbeb9f2 Keep result of [new_]register_dissector in some dissectors. [2 of x]
(don't create new dissector handle if we can use already existing one)

svn path=/trunk/; revision=51159
2013-08-05 19:09:44 +00:00
Jakub Zawadzki a18172147f Remove fragment_data, add fragment_head, fragment_item - for now alias it to the same structure.
This is begin of work to split fragment head and fragments items.

svn path=/trunk/; revision=50708
2013-07-17 21:12:24 +00:00
Chris Maynard e37533ced7 Fix warnings: comma at end of enumerator list.
svn path=/trunk/; revision=50640
2013-07-15 21:37:55 +00:00
Jakub Zawadzki 2671b8a398 fix: packet-mp2t.c:489: warning: implicit declaration of function 'tvb_new_proxy'
svn path=/trunk/; revision=50581
2013-07-14 15:20:09 +00:00
Jakub Zawadzki c766e78cfa Rewrite reassemble API to use TVBs instead of raw data.
(it seems to be working for TCP ^^)

svn path=/trunk/; revision=50580
2013-07-14 14:42:05 +00:00
Michael Mann ea177a2575 Batch of filterable expert infos
svn path=/trunk/; revision=49596
2013-05-27 17:30:43 +00:00
Anders Broman 85a8e304dd Add the posibillity to use a key for per-packet-data.
svn path=/trunk/; revision=49259
2013-05-12 18:11:02 +00:00
Guy Harris a2414d8909 Don't wire into the reassembly code the notion that reassemblies should
be done on flows from one address to another; reassembly for protocols
running atop TCP should be done on flows from one TCP endpoint to
another.

We do this by:

	adding "reassembly table" as a data structure;

	associating hash tables for both in-progress reassemblies and
	completed reassemblies with that data structure (currently, not
	all reassemblies use the latter; they might keep completed
	reassemblies in the first table);

	having functions to create and destroy keys in that table;

	offering standard routines for doing address-based and
	address-and-port-based flow processing, so that dissectors not
	needing their own specialized flow processing can just use them.

This fixes some mis-reassemblies of NIS YPSERV YPALL responses (where
the second YPALL response is processed as if it were a continuation of
a previous response between different endpoints, even though said
response is already reassembled), and also allows the DCE RPC-specific
stuff to be moved out of epan/reassembly.c into the DCE RPC dissector.

svn path=/trunk/; revision=48491
2013-03-22 23:59:54 +00:00
Anders Broman b7617b32eb From beroset:
remove C++ incompatibilities 
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48383
2013-03-17 22:16:39 +00:00
Guy Harris 53fffe0414 Get rid of unnecessary includes of "packet-frame.h".
svn path=/trunk/; revision=47925
2013-02-27 23:02:18 +00:00
Bill Meier 96a24cc79f Fix spelling/typos found using a list of commonly misspelled words.
The misspellings were mostly in comments but some were
in text strings visible to the user.


svn path=/trunk/; revision=47899
2013-02-26 04:42:26 +00:00
Bill Meier 1823aa007c it's ==> its & its ==> it's as needed.
svn path=/trunk/; revision=47891
2013-02-26 01:06:19 +00:00
Bill Meier 959ae3d687 Use '#if 0 ... #endif' rather than /** ... **/ to comment out
unused hf[] entries (which I should have done in the first place).


svn path=/trunk/; revision=47391
2013-01-31 18:35:06 +00:00
Bill Meier c929e42eb4 Fix various instances of unused hf[] entries found
by checkhf.

svn path=/trunk/; revision=47312
2013-01-26 22:43:34 +00:00
Guy Harris b98d44d71f If there's no packet data, there's nothing to check to see whether this
is an MPEG-2 transport packet, so don't treat it as one.

svn path=/trunk/; revision=46733
2012-12-25 12:00:32 +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
Jeff Morriss aa5d9d78dd From Robert Bullen via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7683 :
The reassembled fragments tree in the Packet Details view is awesome, but it
lacks one thing: a field that exposes the reassembled data.

tcp.data already exists for exposing a single TCP segment's payload as a byte
array. It would be handy to have something similar for a single application
layer PDU when TCP segment reassembly is involved. I propose
tcp.reassembled.data, named and placed after the already existing field
tcp.reassembled.length.

My primary use case for this feature is outputting tcp.reassembled.data with
tshark for further processing with a script.

The attached patch implements this very feature. Because the reassembled
fragment tree code is general purpose, i.e. not specific to just TCP, any
dissector that relies upon it can add a similar field very cheaply. In that
vein I've also implemented ip.reassembled.data and ipv6.reassembled.data, which
expose reassembled fragment data as a single byte stream for IPv4 and IPv6,
respectively. All other protocols that use the reassembly code have been left
alone, other than inserting NULL into their initializer lists for the newly
introduced struct field reassemble.h:fragment_items.hf_reassembled_data.

svn path=/trunk/; revision=44802
2012-09-07 02:09:59 +00:00
Bill Meier 163ca72bab From Роман Донченко: "Adaptation" misspelled as "adaption"
In MPEG-related dissectors, "adaption" is used instead of "adaptation" several
times. See patch (it also fixes an unrelated typo that happens to be on the
same line).

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7421

svn path=/trunk/; revision=43539
2012-06-29 01:55:05 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Bill Meier 2df5dc3d53 From Reinhard Speyerer: Fix several misspellings/typos in Wireshark
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6967

svn path=/trunk/; revision=41645
2012-03-18 22:24:24 +00:00
Anders Broman e4403efbdb From Guy Martin:
Fix a few bugs in packet-mp2t

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6959

svn path=/trunk/; revision=41597
2012-03-16 11:51:00 +00:00