Commit Graph

34 Commits

Author SHA1 Message Date
Michael Mann 14824e6adf Revert "Fixup: tvb_* -> tvb_captured"
https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html

This reverts commit 246fe2ca4c.

Change-Id: Ib24bae0198c13a84bd7f731bf4af921212109a8f
Reviewed-on: https://code.wireshark.org/review/2430
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19 18:25:59 +00:00
Dario Lombardo 246fe2ca4c Fixup: tvb_* -> tvb_captured
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f
Reviewed-on: https://code.wireshark.org/review/2377
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18 14:14:58 +00:00
Dario Lombardo 971ffd683e Fixup: tvb_get_string(z) -> tvb_get_string(z)_enc
Change-Id: I63a3704effe3fcab01a193dc39b6a22e9f1cf3fe
Reviewed-on: https://code.wireshark.org/review/2376
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18 14:13:58 +00:00
Evan Huus 08ce84ebbe Grab-bag of dead initializers and two actual bugs.
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-05-25 18:12:00 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(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>
2014-03-04 14:27:33 +00:00
Jakub Zawadzki 1053e722ed Fix warnings
svn path=/trunk/; revision=54089
2013-12-14 12:45:57 +00:00
Martin Kaiser 2759cfb9bd fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9409
don't call proto_item_get_len() when the argument can be NULL

svn path=/trunk/; revision=53247
2013-11-11 10:57:30 +00:00
Jakub Zawadzki ae59b09443 Add missing includes in order to remove exceptions.h from proto.h (next commit).
svn path=/trunk/; revision=53230
2013-11-10 15:59:37 +00:00
Michael Mann 8081cf1d90 Add data parameter to tcp_dissect_pdus() as well as convert it to using "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-11-09 17:46:28 +00:00
Bill Meier 9874da2fcb #if 0 numerous "unused const variables" (mostly value-string-arrays);
Also; fix a few "set but not used" warnings.

svn path=/trunk/; revision=52780
2013-10-23 06:29:11 +00:00
Pascal Quantin 102c452bcb More emem -> wmem conversion:
- 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-22 20:04:35 +00:00
Michael Mann 9e3f9b449f expert_add_info_format_text -> expert_add_info_format
svn path=/trunk/; revision=51852
2013-09-09 00:44:09 +00:00
Jörg Mayer a74c3538fc Fix for Bug 8960 - All mongodb query show as [Malformed Packet: MONGO]
proto_tree_add_item doesn't link to be called with FT_STRINGZ and length -1.

svn path=/trunk/; revision=50836
2013-07-23 13:38:39 +00:00
Michael Mann 2ee48f150d Batch of filterable expert infos.
svn path=/trunk/; revision=49868
2013-06-10 02:18:55 +00:00
Bill Meier ad0219d033 Change 'for (i=1; i<=n;...' to 'for (i=0; i<n; ...)
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-10-11 19:20:21 +00:00
Jeff Morriss 2552c750e5 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45017
2012-09-20 02:03:38 +00:00
Bill Meier 638d74d43f Use val_to_str_const() where appropriate;
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-10 22:55:02 +00:00
Gerald Combs 5a47e80ffe Check for a too-short BSON document length. Fixes a DoS reported by Ben
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-08-06 22:04:09 +00:00
Pascal Quantin 4a6244d1fa Do not use same name for filters with incompatible types
svn path=/trunk/; revision=43450
2012-06-23 15:27:51 +00:00
Bill Meier c8a2b19e2b (Trivial) Reformat some long lines & do some whitespace cleanup.
svn path=/trunk/; revision=39868
2011-11-15 20:49:40 +00:00
Alexis La Goutte 9434d2ea03 FromThomas Buchanan via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6467
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-20 20:45:34 +00:00
Bill Meier 293049dfba Do some conversions of proto_tree_add_item() 'encoding' arg.
(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-16 23:38:49 +00:00
Bill Meier 126aa85393 Convert proto_tree_add_item() 'encoding' arg for field types FT_STRING, 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-15 18:46:26 +00:00
Bill Meier 781129806f Fix ex "modeline" so it works;
See https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5748

svn path=/trunk/; revision=39081
2011-09-21 17:49:11 +00:00
Alexis La Goutte 8947dcb655 Update insert flags
KeepGoing -> ContinueOnError

svn path=/trunk/; revision=38880
2011-09-04 20:01:48 +00:00
Alexis La Goutte 5bcc2dc2f7 * Add Keep Going bit flag in insert command
* Replace tab by space

svn path=/trunk/; revision=37624
2011-06-08 18:26:50 +00:00
Chris Maynard f8737dfbcc From Alexis La Goutte via bug 5790: Fix 8 clang warnings, all of which were:
"warning: Value stored to 'offset' is never read".  The 'offset' is now used.

svn path=/trunk/; revision=36419
2011-03-31 15:17:49 +00:00
Chris Maynard a4452f43fa Change TCP_PORT_MANGO to TCP_PORT_MONGO.
svn path=/trunk/; revision=36405
2011-03-29 21:40:54 +00:00
Chris Maynard 83dc9446ec From Alexis La Goutte via bug 5790: Add partial bit flag in query.
svn path=/trunk/; revision=36399
2011-03-29 20:58:57 +00:00
Guy Harris a8bc4a0d13 Rename the routines that handle dissector tables with unsigned integer
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-20 05:35:29 +00:00
Jeff Morriss 5430e70144 From Alexis La Goutte via 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-12-02 14:35:11 +00:00
Bill Meier 46416bddda (Trivial) Do 'find_dissector("data");' only once.
svn path=/trunk/; revision=34688
2010-10-29 17:42:24 +00:00
Jeff Morriss aac7d5596e From Alexis La Goutte via 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-29 15:44:11 +00:00
Jeff Morriss e257f75449 From Alexis La Goutte via 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
2010-10-28 17:33:18 +00:00