aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-pcp.c
AgeCommit message (Collapse)AuthorFilesLines
2017-10-28Convert to using find_conversation_pinfo where appropriateMichael Mann1-3/+1
This makes it easier to identify the simpler/common conversations Change-Id: I7094f23e49156ee27f5f72c8e130308470f3e462 Reviewed-on: https://code.wireshark.org/review/24145 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-08-09pcp: fix 'pinfo' was marked unused but was used [-Wused-but-marked-unused]Alexis La Goutte1-2/+2
Change-Id: I2cd58b58ff53951044ac13caffdc901d8c1b65bd Reviewed-on: https://code.wireshark.org/review/23019 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-10-08Combine Decode As and port preferences for tcp.port dissector table.Michael Mann1-1/+1
This patch introduces new APIs to allow dissectors to have a preference for a (TCP) port, but the underlying data is actually part of Decode As functionality. For now the APIs are intentionally separate from the regular APIs that register a dissector within a dissector table. It may be possible to eventually combine the two so that all dissectors that register with a dissector table have an opportunity to "automatically" have a preference to adjust the "table value" through the preferences dialog. The tcp.port dissector table was used as the guinea pig. This will eventually be expanded to other dissector tables as well (most notably UDP ports). Some dissectors that "shared" a TCP/UDP port preference were also converted. It also removed the need for some preference callback functions (mostly when the callback function was the proto_reg_handoff function) so there is cleanup around that. Dissectors that has a port preference whose default was 0 were switched to using the dissector_add_for_decode_as_with_preference API rather than dissector_add_uint_with_preference Also added comments for TCP ports used that aren't IANA registered. Change-Id: I99604f95d426ad345f4b494598d94178b886eb67 Reviewed-on: https://code.wireshark.org/review/17724 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-09-22Don't call proto_register_field_array() or expert_register_protocol() withAndersBroman1-2/+2
proto = -1 Change-Id: I60f899ad748b5d3e17f237552af7d2dbc8f27bd2 Reviewed-on: https://code.wireshark.org/review/17864 Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-08-22wmem_array_index() returns a *pointer* to the array element.Guy Harris1-1/+1
The array is an array of guint8 *'s that point to strings; wmem_array_index() doesn't return a pointer to the string, it returns a pointer to a pointer to the string, and you have to dereference the result of the wmem_array_index() call to get a pointer to the string. Change-Id: I8c7b3320f0979b01383ad255419c21cdeb7df4c7 Reviewed-on: https://code.wireshark.org/review/17221 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-07-20PCP: add a missing castPascal Quantin1-1/+1
Change-Id: I3fd85defefb5ba3c27ef7c7cc5e83a8193cf1263 Reviewed-on: https://code.wireshark.org/review/16558 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-07-20Convert some g_ APIs to wmem.Michael Mann1-46/+14
Change-Id: I7fb0b60fc54004326680f07298fe43e8c48e9b39 Reviewed-on: https://code.wireshark.org/review/16550 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-03-04Clean up modelines and indentation.Jeff Morriss1-1/+1
To quote Icf0831717de10fc615971fa1cf75af2f1ea2d03d: HT tab stops are set every 8 spaces on UN*X; UN*X tools that treat an HT character as tabbing to 4-space tab stops, or that even are configurable but *default* to 4-space tab stops (I'm looking at *you*, Xcode!) are broken. tab-width: 4, tabstop=4, and tabSize=4 are errors if you ever expect anybody to look at your file with a UN*X tool, and every text file will probably be looked at by a UN*X tool at some point, so Don't Do That. Adjust indentation to reflect the mode lines. Change-Id: Ic829541c696e0ddbc45cc109009319859c799066 Reviewed-on: https://code.wireshark.org/review/14340 Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2016-01-24Add the packet number to the packet_info structure, and use it.Guy Harris1-4/+4
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-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-12-02PCP: Use GLib 2.32 < supported hash functionsRyan Doyle1-1/+1
GLib 2.32 is required for use of g_hash_table_contains function Change-Id: Ia2af2868ab1029d392d921d915b8898fb5ec81a4 Reviewed-on: https://code.wireshark.org/review/12361 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-02PCP: Implement PMID to name mappingRyan Doyle1-22/+196
Tracks the interation between PMNS_NAMES and PMNS_IDS packets to build up a mapping from PMID to a text name and displays the name whenever the PMID is displayed. Change-Id: I665b293c32fee95b649fe6a6e26989db1eff38e0 Reviewed-on: https://code.wireshark.org/review/12303 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.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-10-29pcp: fix reporting of error status in info columnRyan Doyle1-1/+1
Typo when the dissector was first written. It should have always been the offset. Change-Id: Ica7e88571d3746811b574834cbfa0f91218d573c Reviewed-on: https://code.wireshark.org/review/11393 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-06-04Dissection support for pmproxyRyan Doyle1-2/+4
Implements dissection for the Performance Co-Pilot proxy protocol. Its a simple protocol that exchanges host and port information and then passes all traffic via the usual PCP protocol. Change-Id: I54fbf6b7755b7b1c60e0e1696ac9c4f0d98d8fe7 Reviewed-on: https://code.wireshark.org/review/8704 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-04-20replace some deprecated tvb_length callsEvan Huus1-2/+2
Change-Id: I18152e75aec2eedccad4d393c1b4b493cd7b406d Reviewed-on: https://code.wireshark.org/review/8125 Reviewed-by: Evan Huus <eapache@gmail.com> Petri-Dish: Evan Huus <eapache@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-17PCP: updated protocol dissection for new PDU typesRyan Doyle1-124/+278
Introduce basic dissection for AUTH PDU type as well as detecting if a conversation is about to initiate a secure sockets connection (kind of like STARTTLS) and then pass all packets through the SSL dissector if that is the case. Also clean up some duplication with constants. Change-Id: I66f663ca6ab4291f8d0321430e3e126a0be77a93 Reviewed-on: https://code.wireshark.org/review/7109 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-01-27Lua: Expose tcp_dissect_pdus() to LuaHadriel Kaplan1-2/+3
Provide a way for Lua-based dissectors to invoke tcp_dissect_pdus() to make TCP-based dissection easier. Bug: 9851 Change-Id: I91630ebf1f1fc1964118b6750cc34238e18a8ad3 Reviewed-on: https://code.wireshark.org/review/6778 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Hadriel Kaplan <hadrielk@yahoo.com>
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-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-14Fix warningsJakub Zawadzki1-0/+3
svn path=/trunk/; revision=54089
2013-11-09Add data parameter to tcp_dissect_pdus() as well as convert it to using ↵Michael Mann1-6/+6
"new" style dissectors. Now that "bytes consumed" can be determined, should tcp_dissect_pdus() take advantage of that? Should tcp_dissect_pdus return length (bytes consumed)? There are many dissectors that just call tcp_dissect_pdus() then return tvb_length(tvb). Seems like that could all be rolled into one. svn path=/trunk/; revision=53198
2013-10-29From didier gautheron: remove redundant or use faster col_xxx functionsBill Meier1-2/+2
- when the text parameter is constant col_add_str() and col_set_str() are equivalent but col_set_str() is faster. - same for replace col_append_fstr and col_append_str - remove col_clear() when it's redundant: + before a col_set/col_add if the dissector can't throw an exception. - replace col_append() after a col_clear() with faster col_add... or col_set https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9344 svn path=/trunk/; revision=52948
2013-05-27Batch of filterable expert infosMichael Mann1-9/+24
svn path=/trunk/; revision=49600
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-3/+1
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-06-24FT_FLOAT and FT_DOUBLE share the same comparison functions -> use same ↵Pascal Quantin1-1/+1
filter name svn path=/trunk/; revision=43460
2012-06-23Do not use same name for filters with incompatible typesPascal Quantin1-9/+9
svn path=/trunk/; revision=43451
2012-03-28From Ryan Doyle via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6874Alexis La Goutte1-2/+0
Attached is the patch to allow PM_TYPE_AGGREGATE to fall through to PM_TYPE_AGGREGATE_STATIC. svn path=/trunk/; revision=41812
2012-03-15Calls to col_add_fstr() & etc should not be under 'if (tree)';Bill Meier1-1821/+1839
hf[] FT_BOOLEAN entry with 0 bitmask should have BASE_NONE as 'display' (benign); Enforce modelines (Convert '4 space tabs' to spaces); Do general formatting and whitespace cleanup. svn path=/trunk/; revision=41569
2012-03-05From Ryan Doyle via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6874Alexis La Goutte1-0/+2249
New dissector: performance co-pilot protocol Attached patch implements dissection of the Performance Co-Pilot (PCP) protocol. From me : * Add Wireshark Modelines * Fix encoding args * Fix Clang Warning svn path=/trunk/; revision=41353