aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ajp13.c
AgeCommit message (Collapse)AuthorFilesLines
2017-05-22Create temporary variables for some proto_tree_add_<datatype> calculations.Michael Mann1-5/+4
checkAPIs.pl doesn't like tvb_get_* parameters because it thinks proto_tree_add_item should be used. This is just to pacify the check. Change-Id: I2df1233fe8c7976c257197079c06d24e472303b5 Reviewed-on: https://code.wireshark.org/review/21735 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-10-27ajp13: remove unused variable.Dario Lombardo1-10/+21
Also add expert info for failing conversion. Change-Id: I75bb385c430527e41775822ab0495684ab660c08 Reviewed-on: https://code.wireshark.org/review/18431 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Graham Bloice <graham.bloice@trihedral.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Dario Lombardo <lomato@gmail.com>
2016-10-24ajp13: use ws_strtoi function.Dario Lombardo1-2/+3
Change-Id: Ibe85cbb993eba8e76ed6c645609e9cea114a6c9d Reviewed-on: https://code.wireshark.org/review/18399 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-10-08Combine Decode As and port preferences for tcp.port dissector table.Michael Mann1-1/+2
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-06-26conversation: rename shadow variableDario Lombardo1-3/+3
Change-Id: I8f738b2e01d7f448b21cdc1b488b16b7dd581911 Reviewed-on: https://code.wireshark.org/review/16104 Reviewed-by: Anders Broman <a.broman58@gmail.com>
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-08Fix a lot of typos and misspellingsmoshekaplan1-2/+2
Change-Id: I8512cfa1d424f82a873a0e0e1d22c7b075fdd7f3 Reviewed-on: https://code.wireshark.org/review/13069 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-12-09new_create_dissector_handle -> create_dissector_handle for dissector directory.Michael Mann1-1/+1
Some of the ASN.1 dissectors still generate a new_create_dissector_handle from the tool itself, so leave those for now. Change-Id: Ic6e5803b1444d7ac24070949f5fd557909a5641f Reviewed-on: https://code.wireshark.org/review/12484 Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-04-14Change deprecated API tvb_length -> tvb_reported_lengthAndersBroman1-2/+2
Change-Id: I14577dccaed5aa5ed85e94b6810a94b4c8b2e437 Reviewed-on: https://code.wireshark.org/review/8059 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-27Lua: Expose tcp_dissect_pdus() to LuaHadriel Kaplan1-1/+1
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-12-22First batch of unincludes. Last attempt...Martin Mathieson1-1/+0
Change-Id: I3681462aeb98ca62ed3ec5eb226b2553317391a9 Reviewed-on: https://code.wireshark.org/review/5997 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-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-09-30Add editor modelines; Adjust whitespace as needed.Bill Meier1-9/+22
Change-Id: I434da226c842298f4fb2a4335d06d51e164af2af Reviewed-on: https://code.wireshark.org/review/4394 Reviewed-by: Bill Meier <wmeier@newsguy.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-11-23Create the ability to have packet scoped "proto" data. Bug 9470 ↵Michael Mann1-2/+2
(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-09Add data parameter to tcp_dissect_pdus() as well as convert it to using ↵Michael Mann1-6/+10
"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-09-30Convert some proto_tree_add_string_format calls to something more appropriate.Michael Mann1-27/+9
There seem to be several cases of proto_tree_add_string_format where a "string" value/filter doesn't really make sense because it's always empty, and is just being used as a "filterable subtree header (placeholder)". They appear to be more for "presense" than "value" and should probably be FT_NONE, although I'd almost argue for removing the filter in favor of proto_tree_add_text. svn path=/trunk/; revision=52296
2013-09-12Convert a few more dissectors to wmem.Evan Huus1-6/+6
svn path=/trunk/; revision=51967
2013-05-12Fix compilationPascal Quantin1-1/+1
svn path=/trunk/; revision=49261
2013-05-12Add the posibillity to use a key for per-packet-data.Anders Broman1-2/+2
svn path=/trunk/; revision=49259
2013-03-12svn path=/trunk/; revision=48272Anders Broman1-0/+2
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-08-14fix subtle g_strdup_printf() memory leaks with ephemeral memoryMichael Mann1-1/+1
svn path=/trunk/; revision=44491
2012-06-28Update FSF address - part II.Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=43538
2012-06-04Get rid of a couple of warnings.Anders Broman1-2/+2
svn path=/trunk/; revision=43066
2012-04-30Fix some Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-2/+2
svn path=/trunk/; revision=42362
2011-11-15tvb_[reported_]length_remaining can return -1Bill Meier1-1/+1
svn path=/trunk/; revision=39870
2011-11-08From Iain Arnell via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6546Alexis La Goutte1-0/+5
packet-ajp13 fails to detect end of request body AJP13 may use two different packets to signify end of request body; either zero length packet, or packet with zero length content. The ajp13 dissector already recognizes the former; this patch adds support for the latter. svn path=/trunk/; revision=39752
2011-10-15Convert proto_tree_add_item() 'encoding' arg for field types FT_STRING, ↵Bill Meier1-2/+2
FT_STRINGZ, FT_UINT_STRING as follows: 1. If there's no character encoding (ENC_ASCII, ...) specified then use ENC_ASCII. 2. For all but FT_UINT_STRING, always use ENC_NA (replacing any existing True/1/FALSE/0 /ENC_BIG_ENDIAN/ENC_LITTLE_ENDIAN). svn path=/trunk/; revision=39426
2011-10-14From Iain Arnell:Guy Harris1-0/+149
Adds additional header fields for AJP13 request attributes. svn path=/trunk/; revision=39418
2011-10-14From Iain Arnell:Guy Harris1-87/+234
The existing code adds all ajp13 header names to the protocol tree as ajp13.hval; header values aren't added at all. The original intention appears to have been to add header names as ajp13.hname and their values as ajp13.hval. Even if implemented properly, this doesn't allow filtering properly (unless there's some funky syntax I'm not aware of). This patch uses dedicated header fields for those request/response headers that are explicitly defined in AJP13 protocol. Undefined headers names and their values are added as a single ajp13.additional_header in easily matched "Header-Name: Value" string format. svn path=/trunk/; revision=39417
2011-10-14From Iain Arnell:Guy Harris1-1/+5
AJP13 uses a string size of 0xFFFF to indicate a null string; ajp13_get_nstring function would incorrectly return invalid data. In disaply_req_body function, the content_length really is the length of the data; there is no trailing null. svn path=/trunk/; revision=39416
2011-10-13Delete unused hf_ entries found by checkhf.pl.Chris Maynard1-5/+0
svn path=/trunk/; revision=39404
2011-10-12From Iain Arnell:Guy Harris1-16/+8
A missing value_ptr parameter in the handling of ajp13 response headers led to them being displayed differently than the request headers. This patch also simplifies the offset/length calculation for header values, and skips the size for consistency with handling of other ajp13 string values. svn path=/trunk/; revision=39390
2011-10-12From Iain Arnell:Guy Harris1-1/+1
Revision 35984 introduced a regression in ajp13_get_nstring. According to the comments here, the returned length _includes_ the trailing null. The encoded length, however, does _not_ including the trailing null. This patch resolves the problem by simply adding 1 to the returned length. svn path=/trunk/; revision=39388
2011-09-26Get rid of check_col() and use ENC_BIG_ENDIAN.Anders Broman1-12/+10
svn path=/trunk/; revision=39144
2011-09-22Use ENC_ values in proto_tree_add_item() calls.Guy Harris1-74/+73
In the AgentX dissector, make the "flags" arguments guint8, to match what's passed in. In the AIM dissector, use val_to_str() in col_add_str() calls - it gives the same result if there's a match, and puts a note in the Info column if there isn't, and is less complicated. In the AJP13 dissector: update the URL for the protocol documentation; add #defines for message types, and use them; for "enumerated data type" fields, make the fields numerical rather than strings and give them the value_string tables; get rid of col_check() calls; make a Boolean item an FT_BOOLEAN. svn path=/trunk/; revision=39085
2011-05-20Add #include <stdlib.h> to files which reference fcns declared in stdlib.h;Bill Meier1-0/+2
(In many cases I previously incorrectly removed the #include <stdlib.h>). svn path=/trunk/; revision=37334
2011-04-27From Yaniv Kaul:Bill Meier1-6/+8
Some fixes for 'set but not used' errors that GCC 4.6 emits. svn path=/trunk/; revision=36901
2011-04-04Don't assign to a variable if the value won't be used: Coverity 826;Bill Meier1-38/+32
Also: Remove some uneeded #includes & use consistent indentation. svn path=/trunk/; revision=36451
2011-02-17Don't allocate a bunch of memory on the stack for strings that will beGerald Combs1-54/+30
fed to col_append_fstr; columns have a maximum length of 240 characters (ITEM_LABEL_LENGTH). Make sure our column text is properly formatted. svn path=/trunk/; revision=35984
2010-12-20Rename the routines that handle dissector tables with unsigned integerGuy Harris1-1/+1
keys to have _uint in their names, to match the routines that handle dissector tables with string keys. (Using _port can confuse people into thinking they're intended solely for use with TCP/UDP/etc. ports when, in fact, they work better for things such as Ethernet types, where the binding of particular values to particular protocols are a lot stronger.) svn path=/trunk/; revision=35224
2010-09-23Replace blurbs that match the name (case insensitive) with NULL.Jeff Morriss1-1/+1
svn path=/trunk/; revision=34227
2010-05-13As suggested in ↵Jeff Morriss1-6/+2
http://www.wireshark.org/lists/wireshark-dev/200809/msg00075.html (as referenced in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2907 ) and https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3411 : Write a new convenience routine for finding a conversation and, if it is not found, create it. The frame number and addresses are taken from pinfo (as is the common case). Use this function in a bunch of dissectors. svn path=/trunk/; revision=32790
2010-05-10Indentation & whitespace cleanup (including: "4 space tabs" ==> spaces)Bill Meier1-5/+4
svn path=/trunk/; revision=32735
2010-04-06#include <string.h> not needed.Bill Meier1-1/+0
svn path=/trunk/; revision=32411
2010-01-13From Didier Gautheron:Anders Broman1-4/+2
check_col.diff Remove redundant calls to check_col() if it guards only one columns function with one parameter after the column type. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4394 svn path=/trunk/; revision=31519
2009-12-09Fix for Bug 4311:Gerasimos Dimitriadis1-10/+22
Update context in case of Get Body Chunk; recognize empty body packets svn path=/trunk/; revision=31220