aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-rtp-midi.c
AgeCommit message (Collapse)AuthorFilesLines
2016-12-31Dissectors don't need a journey of self discovery.Michael Mann1-3/+2
They already know who they are when they register themselves. Saving the handle then to avoid finding it later. Not sure if this will increase unnecessary register_dissector functions (instead of using create_dissector_handle in proto_reg_handoff function) when other dissectors copy/paste, but it should make startup time a few microseconds better. Change-Id: I3839be791b32b84887ac51a6a65fb5733e9f1f43 Reviewed-on: https://code.wireshark.org/review/19481 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>
2016-07-21Add proto_tree_add_checksum.Michael Mann1-4/+8
This is an attempt to standardize display/handling of checksum fields for all dissectors. The main target is for dissectors that do validation, but dissectors that just report the checksum were also included just to make them easier to find in the future. Bug: 10620 Bug: 12058 Ping-Bug: 8859 Change-Id: Ia8abd86e42eaf8ed50de6b173409e914b17993bf Reviewed-on: https://code.wireshark.org/review/16380 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-06-12Actually progress through the command data (CID-281394)Jaap Keuter1-1/+2
The loop reading through the command data doesn't progress through it, it just reads until the available data (represented by max_length) runs out. It therefore: - doesn't present the commands - doesn't detect a missing final marker bit (CID-281394) This change does make the code progress through the command data, fixing both issues in the process. Change-Id: I61ba8b56b4a153affe9b4f9a574267f981ef0594 Reviewed-on: https://code.wireshark.org/review/15825 Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-12-09new_register_dissector -> register_dissector for dissector directory.Michael Mann1-1/+1
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/+7
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>
2014-12-23Deleting unnecessary #includes from dissectors.Martin Mathieson1-1/+0
Fourth batch (packet-mac-lte.c -> packet-rtp.c). Will look at cleaning up and committing script afterwards. Change-Id: Id921f07f4b274f0cfb77ce81abe4a285fdb8b644 Reviewed-on: https://code.wireshark.org/review/6023 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-2/+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-10-06Adjust indentation to match editor modelines; Do other minor whitespace changes.Bill Meier1-1/+1
Change-Id: Ic020b2c92db5d14a2be9dc4d35aef4514b8b0353 Reviewed-on: https://code.wireshark.org/review/4502 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-09General cleanup of RTP-MIDI dissector.Michael Mann1-1394/+544
The biggest changes involved: 1. Use the "bounds checking" of proto_tree_add_xxx, instead of doing it manually. There are still places where it's done "manually", but they have been drastically reduced. Someone with more understanding of the protocol/dissector would need to take a look at them. 2. proto_tree_add_text -> proto_tree_add_subtree[_format] 3. Use proto_tree_add_bitmask when appropriate. Change-Id: Iddbd2aadf5fd27f2cf9ba63873eb59dbd93b6394 Reviewed-on: https://code.wireshark.org/review/4039 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-08-15Remove unneeded #include; As needed: Add editor modelines & do whitespace ↵Bill Meier1-1/+0
changes. Change-Id: Ib345833114aab0c70fc20b1fc74c90abecec486e Reviewed-on: https://code.wireshark.org/review/3619 Reviewed-by: Bill Meier <wmeier@newsguy.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-13Fix [-Wmissing-prototypes]Anders Broman1-0/+2
svn path=/trunk/; revision=54025
2013-11-25Create/use some extended value_strings.Bill Meier1-32/+49
Add editor modelines. svn path=/trunk/; revision=53565
2013-11-10Add missing includes in order to remove exceptions.h from proto.h (next commit).Jakub Zawadzki1-0/+1
svn path=/trunk/; revision=53230
2013-05-12Fix the RTP-MIDI Controller filter namePascal Quantin1-1/+1
svn path=/trunk/; revision=49260
2013-03-22Fix typo s/jounral/journal/ as pointed out inEvan Huus1-1/+1
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8504 svn path=/trunk/; revision=48477
2013-03-22Remove some sanity checks that I was able to prove wrong and/or redundant byEvan Huus1-23/+3
manual flow analysis. Fixes part of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8504 General note: this dissector does *weird* things with sanity checks and manually throwing exceptions. It needs a general cleanup, but that is outside the scope of the current bug (and my available time). svn path=/trunk/; revision=48473
2013-03-22Remove 55(!) thoroughly unnecessary tvb_bytes_exist calls from RTP-MIDIEvan Huus1-241/+0
dissector. Discovered while poking around in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8504 svn path=/trunk/; revision=48472
2012-12-26Fix a bunch of warnings.Guy Harris1-4/+4
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of sizeof. Cast away some implicit 64-bit-to-32-bit conversion errors due to use of strtol() and strtoul(). Change some data types to avoid those implicit conversion warnings. When assigning a constant to a float, make sure the constant isn't a double, by appending "f" to the constant. Constify a bunch of variables, parameters, and return values to eliminate warnings due to strings being given const qualifiers. Cast away those warnings in some cases where an API we don't control forces us to do so. Enable a bunch of additional warnings by default. Note why at least some of the other warnings aren't enabled. randpkt.c and text2pcap.c are used to build programs, so they don't need to be in EXTRA_DIST. If the user specifies --enable-warnings-as-errors, add -Werror *even if the user specified --enable-extra-gcc-flags; assume they know what they're doing and are willing to have the compile fail due to the extra GCC warnings being treated as errors. svn path=/trunk/; revision=46748
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-2/+0
svn path=/trunk/; revision=45017
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-05-17General cleanup including as appropriate:Bill Meier1-676/+629
- Remove unneeded #include files (string.h, addr_resolv.h); - Remove unneeded 'if(!initialized){...}' in proto_reg_handoff(); - Reformat hf[] entries; - Remove unneeded variable initializations; - "localize" some variables; - Whitespace/indentation/long lines/formatting (in one case: re-order code slightly to not do col_set_str() & etc until after initial "frame acceptance testing" by dissector. svn path=/trunk/; revision=42683
2012-05-03Fix logic bug. I'm sure this was something Coverity found and I fixed but ↵Chris Maynard1-3/+3
forgot to commit it. Unfortunately Coverity has upgraded to Scan 5.5 and things are different now so I can't cross reference which CID this was anymore. svn path=/trunk/; revision=42395
2012-04-13Remove doubled semicolons and semicolons outside function.Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=42053
2012-03-30gcc.47 would complain that rsoffset might be used uninitializedJörg Mayer1-16/+16
when passed by reference. Init to 0 to silence this warning. Some whitespace fixes. svn path=/trunk/; revision=41846
2012-03-10Don't register the payload type unless it's in the dynamic rangeAnders Broman1-4/+4
svn path=/trunk/; revision=41460
2012-03-02Fix some Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-25/+43
svn path=/trunk/; revision=41303
2012-02-27More Warning fixes.Anders Broman1-26/+1
svn path=/trunk/; revision=41207
2012-02-27More warning fixes.Anders Broman1-7/+3
svn path=/trunk/; revision=41206
2012-02-27Try to fix warning: comparison between signed and unsigned.Anders Broman1-6/+5
svn path=/trunk/; revision=41205
2012-02-27Fix some unused parameter warnings etc.Anders Broman1-134/+130
svn path=/trunk/; revision=41204
2012-02-27From Tobias Erichsen:Anders Broman1-0/+11234
RTP-MIDI - dissector for transmission of MIDI-commands via RTP (RFC 4695). https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5451 svn path=/trunk/; revision=41200