aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-rtp.c
AgeCommit message (Collapse)AuthorFilesLines
2016-04-18RTP: fix decoding of padding in RFC 585 header extensionCarlos Velasco1-13/+13
Bug: 12339 Change-Id: I465e8daf2529f34ab23a614e5fdf85d48232321f Reviewed-on: https://code.wireshark.org/review/14989 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-20Create call_data_dissector() to call data dissector.Michael Mann1-7/+3
This saves many dissectors the need to find the data dissector and store a handle to it. There were also some that were finding it, but not using it. For others this was the only reason for their handoff function, so it could be eliminated. Change-Id: I5d3f951ee1daa3d30c060d21bd12bbc881a8027b Reviewed-on: https://code.wireshark.org/review/14530 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-20Manually add protocol dependencies derived from find_dissector.Michael Mann1-14/+14
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-17Associate dissector tables and heuristic subdissector lists with a protocol.Michael Mann1-4/+4
This will make it easier to determine protocol dependencies. Some LLC OUI dissector tables didn't have an associated protocol, so they were left without one (-1 used) Change-Id: I6339f16476510ef3f393d6fb5d8946419bfb4b7d Reviewed-on: https://code.wireshark.org/review/14446 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-02-26Add free_address_wmem(), fix warnings [-Wcast-qual]João Valverde1-2/+2
Try to improve address API and also fix some constness warnings by not overloading the 'data' pointer to store malloc'ed buffers (use private pointer for that instead). Second try, now passing test suite. Change-Id: Idc101cd866b6d4f13500c9d59da5c7a38847fb7f Reviewed-on: https://code.wireshark.org/review/13946 Petri-Dish: João Valverde <j@v6e.pt> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2016-02-08Revert "Add free_address_wmem() and other extensions to address API"João Valverde1-2/+2
This reverts commit 13ec77a9fc3af3b0b502820d0b55796c89997896. This commit introduces a segmentation fault for Lua code (uncovered by the test suite). Change-Id: Ibc273d1915cda9632697b9f138f0ae104d3fb65e Reviewed-on: https://code.wireshark.org/review/13813 Reviewed-by: João Valverde <j@v6e.pt>
2016-02-07Add free_address_wmem() and other extensions to address APIJoão Valverde1-2/+2
Try to improve 'address' API (to be easier/safer) and also avoid some constness warnings by not overloading the 'data' pointer to store malloc'ed buffers (use private pointer for that instead). Change-Id: I7456516b12c67620ceadac447907c12f5905bd49 Reviewed-on: https://code.wireshark.org/review/13463 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2016-01-25Move the proto data stuff out of frame_data.[ch].Guy Harris1-0/+1
It's not tied to the frame_data structure any more, so it belongs by itself. Clean up some #includes while we're at it; in particular, frame_data.h doesn't use anything related to tvbuffs, so don't have it gratuitiously include tvbuff.h. Change-Id: Ic32922d4a3840bac47007c5d4c546b8842245e0c Reviewed-on: https://code.wireshark.org/review/13518 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-24Add the packet number to the packet_info structure, and use it.Guy Harris1-6/+6
That removes most of the uses of the frame number field in the frame_data structure. Change-Id: Ie22e4533e87f8360d7c0a61ca6ffb796cc233f22 Reviewed-on: https://code.wireshark.org/review/13509 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-11Fix Recurring check found by PVS Studio (V571)Alexis La Goutte1-1/+1
packet-ncp2222.inc: The 'ncp_rec->func == 0x59' condition was already verified in line 7300. packet-bgp: The 'nlri_len < 21' condition was already verified in line 3879 packet-rtp.c: The 'p_conv_data' condition was already verified in line 1460 Change-Id: I65299718b26454596e3f25665d413a17a99e4ce0 Reviewed-on: https://code.wireshark.org/review/12341 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-12-09new_register_dissector -> register_dissector for dissector directory.Michael Mann1-5/+5
Change-Id: Ie39ef054a4a942687bd079f3a4d8c2cc55d5f22c Reviewed-on: https://code.wireshark.org/review/12485 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-14register_dissector -> new_register_dissectorMichael Mann1-9/+12
Picking off "easy" dissectors that only have one or two exit points at most. This concludes a "first pass" over the dissector directory. Change-Id: If5ce5484214be50fe541cba478da1de62e354297 Reviewed-on: https://code.wireshark.org/review/11830 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-04Don't allow multiple registrations of a protocol in dissector tables.Michael Mann1-4/+4
The target here is the Decode As dialog where protocols have multiple registrations into a dissector table and that shows up as multiple entries in the Decode As dialog list with the same name so users are unsure which "dissector" they are choosing. The "default" behavior (done in this commit) is to not allow duplicates for a dissector table, whether its part of Decode As or not. It's just ENFORCED for Decode As. Bug: 3949 Change-Id: Ibe14fa61aaeca0881f9cc39b78799e314b5e8127 Reviewed-on: https://code.wireshark.org/review/11405 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-22Use address functions instead of ADDRESS macros in asn1 and epanGerald Combs1-2/+2
Replace CMP_ADDRESS, COPY_ADDRESS, et al with their lower-case equivalents in the asn1 and epan directories. Change-Id: I4043b0931d4353d60cffbd829e30269eb8d08cf4 Reviewed-on: https://code.wireshark.org/review/11200 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-09-18RTP: handle payload reassembly for multiple fragmentsHadriel Kaplan1-21/+21
If an RTP payload spans more than two packets, the dissector needs to save the previous fragment info. Bug: 11413 Change-Id: I62558f40136881d70bf2a9597eabd3697966ac4a Reviewed-on: https://code.wireshark.org/review/9875 Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-07-22RTSP: allow RTP heuristic dissection of RTSP interleaved channel dataHadriel Kaplan1-2/+3
Allow the RTP dissector to register a heuristic to dissect RTSP interleaved data content, in case RTSP didn't know what the data is - for example it missed the RTSP message indicating the Transport info was RTP. Change-Id: I7a6ea886e6744d51533aa916974572fff41eb144 Reviewed-on: https://code.wireshark.org/review/9749 Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-07-17Remove all preferences related to enabling/disabling heuristic dissectors.Michael Mann1-18/+3
The preferences are still supported for backwards compatibility, but the heuristic_protos file has final say on the "preference" to enable/disable a heuristic dissector. Also add parameter to heur_dissector_add() for the "default" enable/disable of a heuristic dissector. With this parameter, a few more (presumably weak) heuristic dissectors have been "registered" but of course default to being disabled. Change-Id: I51bebb2146ef3fbb8418d4f5c7f2cb2b58003a22 Reviewed-on: https://code.wireshark.org/review/9610 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Roland Knall <rknall@gmail.com> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-12Add "user presentable" and "unique string ids" to heuristic table entries.Michael Mann1-2/+2
This allows better presentation of heuristic dissectors to the end user. Change-Id: I2ff3985ab914e83c2989880cc0c7b9904045b3f6 Reviewed-on: https://code.wireshark.org/review/9602 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-03Call reassembly_table_destroy for some dissectorsPeter Wu1-0/+7
This patch adds reassembly_table_destroy calls as cleanup function for dissectors which have a simple init routine that just calls reassembly_table_init (comments are ignored). The changes were automatically generated using https://git.lekensteyn.nl/peter/wireshark-notes/diff/one-off/cleanup-rewrite.py?id=4cc0aec05dc67a51926a045e1955b7a956757b5e (with the if and assignment parsers disabled). The only difference from the autogenerated output is that the XXX comments from the init routines in smb-pipe and tds dissectors are kept. Change-Id: I64aedf7189877247282b30b0e0f83757be6199e7 Reviewed-on: https://code.wireshark.org/review/9222 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-26RTP: create conversation when using heuristic dissectorPascal Quantin1-0/+24
This gives a chance to perform RTP reassembly when "Try to decode RTP outside of conversations" option is activated. Bug: 11310 Change-Id: Ic8bd9532a88a072c3cb1f1907cf7117b5072a954 Reviewed-on: https://code.wireshark.org/review/9175 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-05-27Convert proto_tree_add_boolean to ↵Michael Mann1-8/+8
proto_tree_add_bitmask_[value|value_with_flags|list] Final part. While there change deprecated tvb_length-xxx() calls Change-Id: I8b0cf823c2d37a92c58fcb653f7fe1e8fdad5a79 Reviewed-on: https://code.wireshark.org/review/8642 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-04-08Add proper "Decode As" mechanism for FLIP payload instead of (many) preferences.Michael Mann1-0/+2
Other cleanup with FLIP dissector while in the neighborhood. Change-Id: I0ecdea447979b0ba508a8bb84bd67e4eb4b32a70 Reviewed-on: https://code.wireshark.org/review/7896 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-30rtp: cleanupBill Meier1-92/+106
- Remove dead initializers; - Localize some vars; - Whitespace Change-Id: Ie98667de736f2928ce1a2e4986917e4b0457866f Reviewed-on: https://code.wireshark.org/review/6861 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-01-26rtp: Don't call col_...() under 'if (tree)'Bill Meier1-16/+16
Change-Id: I7d75e8d02aeaa67155ec52dd0167d1692286b951 Reviewed-on: https://code.wireshark.org/review/6800 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-01-19RTP: Parse problem in dissect_rtp_hext_rfc5215_onebyteSergio Moreno Mozota1-0/+6
some commercial IPTV streamers send bogus info in the extension headers, add some sanity check to skip the erroneous bytes. Bug: 10513 Change-Id: I6f20073a00ed0f791fa99701534360d304060053 Reviewed-on: https://code.wireshark.org/review/6606 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-10Bluetooth: A2DP: APT-X: Unhardcode stream configurationMichal Labedzki1-1/+1
Change-Id: I16cfb4d014020a7fb2c67fef3128021c9901719a Reviewed-on: https://code.wireshark.org/review/6442 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-01-08Eliminate proto_tree_add_text from some dissectors.Michael Mann1-5/+23
Change-Id: Ief4c377d56748e1a8ed0ef7fe5ba03b9be00cd8d Reviewed-on: https://code.wireshark.org/review/6267 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-12-25Deleting unnecessary #includes from dissectors.Martin Mathieson1-2/+0
Fifth batch (packet-rtp.c -> end). Will look at cleaning up and committing script afterwards. Change-Id: I8ed61dc941d98d3f7259a9d1f74e214eb7b4bfa2 Reviewed-on: https://code.wireshark.org/review/6052 Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-1/+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-15Enable case-insensitive string dissector tablesEvan Huus1-1/+1
Permit passing TRUE as the parameter during table registration to achieve that effect. Use it in RTP media type table. Bug: 10708 Change-Id: I892fb1a421d349f0c05197dec90f14fc34ad6b97 Reviewed-on: https://code.wireshark.org/review/5695 Reviewed-by: Evan Huus <eapache@gmail.com> Petri-Dish: Evan Huus <eapache@gmail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-12-13dissector_try_uint(_new) and dissector_try_string now return the number of ↵Pascal Quantin1-2/+3
bytes consumed Change-Id: I528ad736caee1f29e2f0abfc0afcca6587d74eca Reviewed-on: https://code.wireshark.org/review/5743 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-11-16Remove ipproto member of packet_info.Michael Mann1-1/+1
All situations can be handled with "shimmed" dissector functions. Change-Id: Ic85483b32d99d3270b193c9f6b29574d8fad46a8 Reviewed-on: https://code.wireshark.org/review/5327 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: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-07-06convert to proto_tree_add_subtree[_format]Michael Mann1-12/+9
Change-Id: Ia2567695ffed30c990eda3740b08bfab101cea96 Reviewed-on: https://code.wireshark.org/review/2883 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-20Rename dissector_add_handle() to dissector_add_for_decode_as().Guy Harris1-3/+3
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-12RTP: fix invalid memory accessPascal Quantin1-2/+2
Bug: 10176 Change-Id: If54e4a5a118ea10befeeed5278394665df99425e Reviewed-on: https://code.wireshark.org/review/2187 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-07tvb_new_subset -> tvb_new_subset_length when length parameters are equal.Michael Mann1-5/+5
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-05-30Bluetooth AVDTP/RTP: Separate the streamsMichal Labedzki1-3/+3
The Stream is defined here as media stream that beginning on AVDTP Start (ResponseAccept). Also fix recognizing Channel streams by AVDTP according to the specification that says: 1. First channel is always Signaling. 2. Second may be Media. 3. Third may be Reporting. 4. Fourth may be Recovery. First and second will be supported right now. Change-Id: Id6d4dae6be1b9df68382288c2d520b7ed3661237 Reviewed-on: https://code.wireshark.org/review/1053 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-05-30Bluetooth: Add music duration info for SBCMichal Labedzki1-1/+1
Music duration info can be used to detect underflow, what can decrease music quality. Change-Id: I8ea06655395d3e66473a09ee72b6833b894aa6e1 Reviewed-on: https://code.wireshark.org/review/1052 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-05-30Bluetooth: Fix Content Protection call for VDPMichal Labedzki1-1/+1
Change-Id: I20a29fdb7d5737173c5b589fc8832b0b997bef2a Reviewed-on: https://code.wireshark.org/review/1877 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-04-06Added support for BSS header in ED-137A RTP headerMichael Mann1-20/+125
Change-Id: Iffab8a62cf58d3ccf54fe2ed086aae80eb425a5f Reviewed-on: https://code.wireshark.org/review/929 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-04-03(Pedantic): set editor modelines tab-width & etc to 8; Also: fix some ↵Bill Meier1-3/+3
indentation in packet-sip.c Change-Id: I623fc5e4c1247dbe5e15f0f33270f4f0994268ab Reviewed-on: https://code.wireshark.org/review/943 Reviewed-by: Bill Meier <wmeier@newsguy.com> Tested-by: Bill Meier <wmeier@newsguy.com>
2014-04-03please checkAPIEvan Huus1-5/+2
Change-Id: I2dbd1fcb47b75300e753b5ef2dc60e68ca1b5fa5 Reviewed-on: https://code.wireshark.org/review/941 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-04-03Make payload type arguments guint rather than guint8.Guy Harris1-5/+5
That should suppress some "cast to pointer from integer of different size" warnings. Change-Id: I2ef38e16ce866e244cb7c0a2275dfb5975980fc4 Reviewed-on: https://code.wireshark.org/review/938 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-04-03Fix Bug 9920 Buildbot crash due to SDP/RTP mismatchHadriel Kaplan1-49/+273
For details see comments in Bug 9920. The executive summary: Bug 9920 is a crash caused by a couple of issues: 1) The memory ownership model for the rtp_dyn_payload hashtable is split: SDP creates the rtp_dyn_payload hashtable, but RTP can free it. Since there isn't *one* pointer to the hashtable, RTP freeing it means SDP has a dangling pointer. 2) Either the SDP dissector shouldn't be creating two separate, unique hashtables for multiple media channels of the same addr:port, or RTP shouldn't be free'ing the previous one. Change-Id: I436e67de6882f84aa82dcbdfe60bf313fe4fd99c Reviewed-on: https://code.wireshark.org/review/918 Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-21Add debug printing functions for conversations, sip, sdp, rtpHadriel Kaplan1-5/+66
There have been enough gnarly bus in sip/sdp/rtp that it needs to have good debug printing. Using a debugger isn't good enough because there's interaction across multiple frames and it's too hard to follow what's going on without real printed data history. Change-Id: Ifb5bb1fb580be81f988569ece79d238a9c030c34 Reviewed-on: https://code.wireshark.org/review/688 Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-19Fix Bug 9885: 'Buildbot crash output: fuzz-2014-03-14-15333.pcap'Hadriel Kaplan1-2/+3
The Buildbot found a crash which is cause by a bug that has been there all along, but a recent change exposed. This bug is likely in 1.10.6 as well, so I'll backport this if I can reproduce it in 1.10.6. Change-Id: I505bc73cbe6281e6d64f00de441c8e6231b55000 Reviewed-on: https://code.wireshark.org/review/702 Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-03-12Fix whitespace tabs to spaces, indent by 4, modelinesHadriel Kaplan1-2734/+2734
Change-Id: I8bb64a879d1aa779c9ac85db306cbd34d1188243 Reviewed-on: https://code.wireshark.org/review/617 Reviewed-by: Evan Huus <eapache@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-26From Robert Jongbloed viaEvan Huus1-0/+10
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8355 Support RTP/RTCP multiplexing. With input from Jonathan Lennox. svn path=/trunk/; revision=54469
2013-12-14Remove not needed ';'Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=54088