aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-mongo.c
AgeCommit message (Collapse)AuthorFilesLines
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-18Fixup: tvb_get_string(z) -> tvb_get_string(z)_encDario Lombardo1-3/+3
Change-Id: I63a3704effe3fcab01a193dc39b6a22e9f1cf3fe Reviewed-on: https://code.wireshark.org/review/2376 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-25Grab-bag of dead initializers and two actual bugs.Evan Huus1-1/+1
All caught by cppcheck. The two (semi)-interesting bugs are: - in asn1/atn-cpdlc/packet-atn-cpdlc-template.c where the break statement should have been inside the brace, causing potential control-flow weirdness with exceptions - in epan/dissectors/packet-ieee80211.c where the bounds check for tag_len did not match the expert info given Change-Id: Ie173fb8d917aabb9b4571435d671d6f16e1c7569 Reviewed-on: https://code.wireshark.org/review/1793 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> 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-14Fix warningsJakub Zawadzki1-3/+3
svn path=/trunk/; revision=54089
2013-11-11fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9409Martin Kaiser1-5/+2
don't call proto_item_get_len() when the argument can be NULL svn path=/trunk/; revision=53247
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-11-09Add data parameter to tcp_dissect_pdus() as well as convert it to using ↵Michael Mann1-14/+12
"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-23#if 0 numerous "unused const variables" (mostly value-string-arrays);Bill Meier1-0/+2
Also; fix a few "set but not used" warnings. svn path=/trunk/; revision=52780
2013-09-22More emem -> wmem conversion:Pascal Quantin1-3/+3
- tvb_get_g_stringz()/tvb_get_ephemeral_stringz()/tvb_get_seasonal_stringz() -> tvb_get_stringz() - tvb_get_g_stringz_enc()/tvb_get_ephemeral_stringz_enc() -> tvb_get_stringz_enc() - tvb_get_ephemeral_unicode_stringz() -> tvb_get_unicode_stringz() - tvb_bcd_dig_to_ep_str() -> tvb_bcd_dig_to_wmem_packet_str() - update docs accordingly svn path=/trunk/; revision=52180
2013-09-09expert_add_info_format_text -> expert_add_info_formatMichael Mann1-3/+3
svn path=/trunk/; revision=51852
2013-07-23Fix for Bug 8960 - All mongodb query show as [Malformed Packet: MONGO]Jörg Mayer1-1/+1
proto_tree_add_item doesn't link to be called with FT_STRINGZ and length -1. svn path=/trunk/; revision=50836
2013-06-10Batch of filterable expert infos.Michael Mann1-4/+17
svn path=/trunk/; revision=49868
2012-10-11Change 'for (i=1; i<=n;...' to 'for (i=0; i<n; ...)Bill Meier1-1/+1
The changes fix definite problems or are done "just in case" for cases not esily determined to be a problem by quick inspection. Note: in some cases for loop index variables have been renamed to ensure all required codes changes detected. ##backport svn path=/trunk/; revision=45477
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-10Use val_to_str_const() where appropriate;Bill Meier1-1/+1
Also (for a few files): - create/use some extended value strings; - remove unneeded #include files; - remove unneeded variable initialization; - re-order fcns slightly so prefs_reg_handoff...() at end, etc svn path=/trunk/; revision=44438
2012-08-06Check for a too-short BSON document length. Fixes a DoS reported by BenGerald Combs1-26/+46
Schmidt in bug 7572. Also check for a too-long BSON document length and too many nested BSON documents. svn path=/trunk/; revision=44288
2012-06-23Do not use same name for filters with incompatible typesPascal Quantin1-6/+6
svn path=/trunk/; revision=43450
2011-11-15(Trivial) Reformat some long lines & do some whitespace cleanup.Bill Meier1-22/+29
svn path=/trunk/; revision=39868
2011-10-20FromThomas Buchanan via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6467Alexis La Goutte1-16/+351
Add Binary JSON (BSON) decoding support to Mongo packet dissector Implement BSON spec to correctly see BSON document type and not in Bytes format... The specification for BSON can be found at http://bsonspec.org/ The decoding is not entirely complete, there are still potential enhancements to provide more information about a couple of data types, but it greatly enhances visibility into these packet types. From me : * Fix warning from fix-encoding-args.pl script. svn path=/trunk/; revision=39499
2011-10-16Do some conversions of proto_tree_add_item() 'encoding' arg.Bill Meier1-1/+1
(previously missed). 57 FT_BOOLEAN: FALSE-->ENC_BIG_ENDIAN 31 FT_BOOLEAN: TRUE-->ENC_LITTLE_ENDIAN 10 FT_BYTES: ENC_BIG_ENDIAN-->ENC_NA 1 FT_BYTES: ENC_LITTLE_ENDIAN-->ENC_NA 21 FT_BYTES: FALSE-->ENC_NA 2 FT_BYTES: TRUE-->ENC_NA 2 FT_IPXNET: ENC_BIG_ENDIAN-->ENC_NA 6 FT_IPv6: ENC_BIG_ENDIAN-->ENC_NA 1 FT_IPv6: FALSE-->ENC_NA 6 FT_NONE: ENC_BIG_ENDIAN-->ENC_NA 19 FT_NONE: FALSE-->ENC_NA 3 FT_NONE: TRUE-->ENC_NA 1 FT_STRING: ENC_BIG_ENDIAN-->ENC_ASCII|ENC_NA 1 FT_STRING: ENC_LITTLE_ENDIAN-->ENC_ASCII|ENC_NA 5 FT_STRING: FALSE-->ENC_ASCII|ENC_NA 1 FT_STRING: TRUE-->ENC_ASCII|ENC_NA 4 FT_STRINGZ: ENC_NA-->ENC_ASCII|ENC_NA 8 FT_STRINGZ: FALSE-->ENC_ASCII|ENC_NA 1 FT_INT32: FALSE-->ENC_BIG_ENDIAN 1 FT_INT32: TRUE-->ENC_LITTLE_ENDIAN 11 FT_UINT8: 0-->ENC_BIG_ENDIAN 111 FT_UINT8: FALSE-->ENC_BIG_ENDIAN 17 FT_UINT8: TRUE-->ENC_LITTLE_ENDIAN 1 FT_UINT16: 0-->ENC_BIG_ENDIAN 68 FT_UINT16: FALSE-->ENC_BIG_ENDIAN 18 FT_UINT16: TRUE-->ENC_LITTLE_ENDIAN 4 FT_UINT24: FALSE-->ENC_BIG_ENDIAN 70 FT_UINT32: FALSE-->ENC_BIG_ENDIAN 1 FT_UINT32: TRUE-->ENC_LITTLE_ENDIAN 4 FT_UINT64: FALSE-->ENC_BIG_ENDIAN 1 FT_UINT64: TRUE-->ENC_LITTLE_ENDIAN 1 FT_UINT_STRING: FALSE-->ENC_ASCII|ENC_BIG_ENDIAN svn path=/trunk/; revision=39442
2011-10-15Convert proto_tree_add_item() 'encoding' arg for field types FT_STRING, ↵Bill Meier1-3/+3
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-09-21Fix ex "modeline" so it works;Bill Meier1-1/+1
See https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5748 svn path=/trunk/; revision=39081
2011-09-04Update insert flagsAlexis La Goutte1-4/+4
KeepGoing -> ContinueOnError svn path=/trunk/; revision=38880
2011-06-08* Add Keep Going bit flag in insert commandAlexis La Goutte1-459/+488
* Replace tab by space svn path=/trunk/; revision=37624
2011-03-31From Alexis La Goutte via bug 5790: Fix 8 clang warnings, all of which were:Chris Maynard1-7/+13
"warning: Value stored to 'offset' is never read". The 'offset' is now used. svn path=/trunk/; revision=36419
2011-03-29Change TCP_PORT_MANGO to TCP_PORT_MONGO.Chris Maynard1-2/+2
svn path=/trunk/; revision=36405
2011-03-29From Alexis La Goutte via bug 5790: Add partial bit flag in query.Chris Maynard1-0/+7
svn path=/trunk/; revision=36399
2010-12-20Rename the routines that handle dissector tables with unsigned integerGuy Harris1-2/+2
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-12-02From Alexis La Goutte via ↵Jeff Morriss1-1/+1
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5460 : MongoDB dissector improperly decodes cursorID in OP_KILL_CURSORS command. The size of the CursorID is 64 bits, while the code assumes they are 4 bits, though correctly incrementing the pointer. Fix this typo. svn path=/trunk/; revision=35103
2010-10-29(Trivial) Do 'find_dissector("data");' only once.Bill Meier1-1/+1
svn path=/trunk/; revision=34688
2010-10-29From Alexis La Goutte via ↵Jeff Morriss1-2/+2
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5290 : RequestID and ResponseID are unsigned. Show them in hex and decimal. svn path=/trunk/; revision=34686
2010-10-28From Alexis La Goutte via ↵Jeff Morriss1-0/+667
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5290 : A patch to add support of Mongo Wire Protocol (Used by MongoDB) From me: use ENC_xxx in proto_tree_add_item() calls. svn path=/trunk/; revision=34680