aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-mp2t.c
AgeCommit message (Collapse)AuthorFilesLines
2015-03-12MP2T: restore addresses once fragments are added to the hash tablePascal Quantin1-0/+6
It allows to have "Follow UDP stream" context menu working again Bug: 11055 Change-Id: I8eae15bfddb45ea033eb8dd2e3f7ca038057421a Reviewed-on: https://code.wireshark.org/review/7662 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-19Add name resolution support to address type.Michael Mann1-1/+1
Add address_with_resolution_to_str API that returns address string + name resolution in the format %s (%s), first string is resolved name (if available) and second string is raw address string. Convert AT_FCWWN to using proper name resolution format First use of address_with_resolution_to_str with field types in proto.c Change-Id: I2ae77c29a4ffc30bb919fbec00f06629830898c2 Reviewed-on: https://code.wireshark.org/review/7196 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-02-09Add fixed length function for address types.Michael Mann1-1/+1
This allows for even more cleanup with respect to how address types are handled, including removing address_to_str.c. Most of the functionality was folded into address_types.c, but the remainder was just dispersed because it didn't make sense to keep the file. Change-Id: Id4e9391f0c3c26eff8c27b362e4f7a1970d718b4 Reviewed-on: https://code.wireshark.org/review/7038 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-02-09Eliminate the hf member out of the address structure.Michael Mann1-2/+6
Using the new address type registration, dissectors can create their own address types with their own (column) filters attached to them, eliminating the need for an address to keep track of a hf_ field. Change-Id: I2bbec256a056f403a7ac9880d5d76a0b2a21b221 Ping-Bug: 7728 Reviewed-on: https://code.wireshark.org/review/7037 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-3/+0
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-21Have a heur_dissector_list_t be an opaque handle.Guy Harris1-1/+1
This allows dissector lists to be looked up by name, so they can be shared by multiple dissectors. (This means that there's no "udplite" heuristic dissector list, but there shouldn't be one - protocols can run atop UDP or UDPLite equally well, and they share a port namespace and uint dissector table, so they should share a heuristic dissector table as well.) Change-Id: Ifb2d2c294938c06d348a159adea7a57db8d770a7 Reviewed-on: https://code.wireshark.org/review/5936 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-11eth,mp2t: Rename ei[] filter names duplicating hf[] filter names.Bill Meier1-1/+1
Change-Id: I1a9e8344866ce5a5bbd48b07c49baa398ce161f7 Reviewed-on: https://code.wireshark.org/review/5724 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-10Replace deprecated tvb_length callsEvan Huus1-2/+2
And a few other misc. cleanups while in the neighbourhood. Change-Id: Ic0d6836dec9c36d31ea244a6adc74d4713565090 Reviewed-on: https://code.wireshark.org/review/4047 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-09-09Revert "Explicitly lengthen some constants to 64 bits"Evan Huus1-2/+2
Guy already fixed the issue, I was looking at a stale buildbot page. This reverts commit f9bfa976e67da2f8065f172de9ed06fad61762a8. Change-Id: I04e2f1ddfae9558b6cec40740ffbb66a16c3fecb Reviewed-on: https://code.wireshark.org/review/4046 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-09-08Explicitly lengthen some constants to 64 bitsEvan Huus1-2/+2
Hopefully squashes the mac buildbot error packet-mp2t.c:993: warning: implicit conversion shortens 64-bit value into a 32-bit value Change-Id: I9ca6420925442b56cfdf5db629b63d6ead7bdfbd Reviewed-on: https://code.wireshark.org/review/4045 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-09-08Do the PCR and the original PCR the same way.Guy Harris1-7/+6
In both cases, make the extension a 16-bit variable, cast the result of extracting the extension to guint16 to clarify that only the 9 bits visible through the mask matter. While we're at it, there's no need to use "proto_tree_add_uint64_format_value() if the format is just the standard format for a 64-bit unsigned integer. Change-Id: I8f1f48595830d4672984f3797be1c9d994e64ea0 Reviewed-on: https://code.wireshark.org/review/4043 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-09-08don't skip another 6 bytes after OPCRMartin Kaiser1-31/+9
Bug: 10446 simplify OPCR calculation while we're at it Change-Id: I8590e409895e712fe6bbb64ab23093caf5795fa7 Reviewed-on: https://code.wireshark.org/review/4040 Petri-Dish: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-08-14Eliminate proto_tree_add_text from some dissectors.Michael Mann1-2/+8
Other minor cleanup while in the neighborhood. Change-Id: If73a029f564219782c313d4154c24c7ce7458b52 Reviewed-on: https://code.wireshark.org/review/3574 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-07-19remove some more unnecessary initializationsMartin Kaiser1-7/+7
Change-Id: I74b082b7644f36efc3dc220ff92f1bfff524c408 Reviewed-on: https://code.wireshark.org/review/3119 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-07-19no need to initialize these pointersMartin Kaiser1-6/+6
Change-Id: I0791ca2fc9a7a87dafbdf15f51d9f1a9d12aa89e Reviewed-on: https://code.wireshark.org/review/3118 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-07-19use gboolean for detected_dropMartin Kaiser1-3/+3
Change-Id: Ice0c68541604c5566cc807c17faf534cd6628262 Reviewed-on: https://code.wireshark.org/review/3117 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-07-04convert to proto_tree_add_subtree[_format]Michael Mann1-5/+2
Change-Id: I621f2e2cad9403449cb78f45302388f0c874d3bc Reviewed-on: https://code.wireshark.org/review/2852 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-20Rename dissector_add_handle() to dissector_add_for_decode_as().Guy Harris1-1/+1
Hopefully that name makes it clear what the routiner's purpose is, and will encourage people to use it rather than using dissector_add_uint() with a bogus integer value. Change-Id: Ic5be456d0ad40b176aab01712ab7b13aed5de2a8 Reviewed-on: https://code.wireshark.org/review/2483 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-19handle TS packet reassembly for PES packets with 0 length fieldMartin Kaiser1-2/+15
(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-19no need to initialize these two varsMartin Kaiser1-2/+2
Change-Id: Ie1a71046b791bcbbf3cf02ddd1c4ddc88b388302 Reviewed-on: https://code.wireshark.org/review/2461 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-2/+2
https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html This reverts commit 246fe2ca4c67d8c98caa84e2f57694f6322e2f96. Change-Id: Ib24bae0198c13a84bd7f731bf4af921212109a8f Reviewed-on: https://code.wireshark.org/review/2430 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-18Fixup: tvb_* -> tvb_capturedDario Lombardo1-2/+2
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-07tvb_new_subset -> tvb_new_subset_length when length parameters are equal.Michael Mann1-1/+1
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-05simplify PCR calculationMartin Kaiser1-28/+8
Change-Id: I892088e158519e331cba89be3c8d7c71f38a8925 Reviewed-on: https://code.wireshark.org/review/1964 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-03make the PCR value filterableMartin Kaiser1-4/+3
this fixes bug #10158 Change-Id: Ic67b074c464c52ac523e835b9815a5c3a3fa14d9 Reviewed-on: https://code.wireshark.org/review/1925 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-23Zero out pinfo->src and dst before adding a frag.Guy Martin1-0/+6
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-19Fix warning about the adaptation field control for docsis packet. The specs ↵Guy Martin1-2/+2
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-19Increase frag_id for self contained subpackets in mp2t packets. This fix ↵Guy Martin1-1/+2
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-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(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>
2013-12-27mp2t: return offset when dissecting AF (continuation of r54396)Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=54476
2013-12-23mp2t: rework dissecting adaptation fieldJakub Zawadzki1-15/+14
- move dissecting adaptation field length to dissect_mp2t_adaptation_field() - return offset, not delta. svn path=/trunk/; revision=54396
2013-12-23mp2t: avoid calling get_mp2t_conversation_data()Jakub Zawadzki1-11/+9
svn path=/trunk/; revision=54395
2013-12-18Fix [-Wmissing-prototypes]Anders Broman1-1/+1
svn path=/trunk/; revision=54209
2013-12-14Fix some trivial warnings.Jakub Zawadzki1-0/+3
svn path=/trunk/; revision=54085
2013-11-29Avoid including <wiretap/wtap.h> in dissectors.Jakub Zawadzki1-0/+2
svn path=/trunk/; revision=53655
2013-11-23Create the ability to have packet scoped "proto" data. Bug 9470 ↵Michael Mann1-3/+3
(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-10-29if pointer==0, the section starts immediatelyMartin Kaiser1-2/+7
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-29separate function for dissecting the adaptation fieldMartin Kaiser1-171/+176
svn path=/trunk/; revision=52967
2013-10-28TABs -> spacesMartin Kaiser1-1216/+1202
add editor modelines svn path=/trunk/; revision=52934
2013-10-28make Pointer filterableMartin Kaiser1-2/+6
svn path=/trunk/; revision=52925
2013-10-28packed_analysis_data_t -> packet_analysis_data_tMartin Kaiser1-5/+5
svn path=/trunk/; revision=52924
2013-10-28correct typosMartin Kaiser1-2/+2
svn path=/trunk/; revision=52923
2013-10-28remove unnecessary return; linesMartin Kaiser1-6/+0
svn path=/trunk/; revision=52922
2013-09-09expert_add_info_format_text -> expert_add_info_formatMichael Mann1-2/+2
svn path=/trunk/; revision=51852
2013-09-02Fix some Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-2/+1
svn path=/trunk/; revision=51668
2013-08-25Replace some emem with wmem.Evan Huus1-30/+25
svn path=/trunk/; revision=51512
2013-08-05Keep result of [new_]register_dissector in some dissectors. [2 of x]Jakub Zawadzki1-4/+5
(don't create new dissector handle if we can use already existing one) svn path=/trunk/; revision=51159
2013-07-17Remove fragment_data, add fragment_head, fragment_item - for now alias it to ↵Jakub Zawadzki1-2/+2
the same structure. This is begin of work to split fragment head and fragments items. svn path=/trunk/; revision=50708
2013-07-15Fix warnings: comma at end of enumerator list.Chris Maynard1-1/+1
svn path=/trunk/; revision=50640
2013-07-14fix: packet-mp2t.c:489: warning: implicit declaration of function ↵Jakub Zawadzki1-0/+2
'tvb_new_proxy' svn path=/trunk/; revision=50581