Commit Graph

21140 Commits

Author SHA1 Message Date
Guy Harris 7e2dc50891 Nobody uses packet-t125.h, so don't bother building it, and delete it.
Change-Id: I10f8889a64024114106cd8058525cb21c6078279
Reviewed-on: https://code.wireshark.org/review/3284
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-31 07:53:08 +00:00
Peter Wu 9ed85d1de9 Fix use of uninitialized field
ssl_print_string uses out->data_len to determine the length of the
printed data, but this was not set. Use ssl_data_set for that and add an
additional DISSECTOR_ASSERT just in case we change something here.

Reported by Alexis La Goutte, found by Clang static analyzer.

Change-Id: I630a9193ff1ece86a0a46924dd86591fedf5c595
Reviewed-on: https://code.wireshark.org/review/3261
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-30 16:25:33 +00:00
Michael Mann dcf6d44b7f Apply refactored "conversation" (tap) data to TShark.
I intentionally left the fields displayed alone (so they don't exactly match Wireshark GUI), because as Guy points out in bug 6310, not sure its A Bug or A Feature.  But at least all types of conversations allowed are in sync with Wireshark GUI.

Bug:6310
Change-Id: I722837df510a39dadc1f9a07a99275509516698c
Reviewed-on: https://code.wireshark.org/review/3212
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-07-30 16:12:54 +00:00
Pascal Quantin 82bb8008ce GED125: remove a wrong comment regarding the default TCP port
Change-Id: I53aa2053c65280385e13da875979ed09b37fb725
Reviewed-on: https://code.wireshark.org/review/3258
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-07-30 09:10:19 +00:00
Martin Kaiser 9d0e4f6fdb don't add nonprinting \000 characters to tftp option strings
Change-Id: I81e43fac5176fdd0805001636991efb7f588a3c0
Reviewed-on: https://code.wireshark.org/review/3252
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-07-29 21:49:10 +00:00
Martin Kaiser 5dd7cfeed2 remove unnecessary return; statement
Change-Id: Icefbaf632e888e84bcb2cc20ae3a6c4744b82fae
Reviewed-on: https://code.wireshark.org/review/3251
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-07-29 21:48:36 +00:00
Evan Huus d786ed8e5d Remove unused variable
Change-Id: I590d4c2d79ee44309cd512057c7eae6df15913e9
Reviewed-on: https://code.wireshark.org/review/3240
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-29 01:56:02 +00:00
Lukas Emersberger eece1c521d EPL: Fix for Write Multiple by index
Write multiple by index now correctly resolves OD names.

Change-Id: I4d2aad584a47e3682716b95bdda0bc49c3a29d96
Signed-off-by: Lukas Emersberger <lukas.emersberger@gmail.com>
Reviewed-on: https://code.wireshark.org/review/3223
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Lukas Emersberger <lukas.emersberger@br-automation.co.at>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-29 01:49:12 +00:00
Matthieu Texier 4a1bd421c4 Bug 10302 - BGP attribute AIGP (draft-ietf-idr-aigp) not decoded - Fix
Change-Id: Ib8b3c5666932777218e33b74cca33b791c883fc9
Reviewed-on: https://code.wireshark.org/review/3226
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-29 01:45:56 +00:00
Evan Huus 0aa4cb2d0e Fix possible uninitialized session key in netlogin auth
Bug:10312
Change-Id: Ia2be812e81b54d6df5a928312cca86ecd95aa6b2
Reviewed-on: https://code.wireshark.org/review/3236
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-29 01:43:12 +00:00
Michal Labedzki 75c7b154a2 Bluetooth: Fix OBEX over L2CAP detection
There are two cases:
1. btl2cap -> btrfcomm -> btobex
2. btl2cap -> btobex

Case 2 is rare, so according to its name and to avoid confusion
I based on it.

Bug:10316
Change-Id: Ibeabeaf2f8376425460c56bad8fb980b460dd940
Reviewed-on: https://code.wireshark.org/review/3225
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-29 01:26:25 +00:00
AndersBroman 0f85608d3a Use wmem for application Ids
Remove soft deprecated APIs

Change-Id: Iecd2f552c1abb7bb2c6969073b3c245af22f4fcd
Reviewed-on: https://code.wireshark.org/review/3230
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-28 18:27:45 +00:00
AndersBroman ff01321da2 Sort diameter.applicationId fix a typo.
Change-Id: Id585371df929cdff17f98dddbebf063fa000ff56
Reviewed-on: https://code.wireshark.org/review/3229
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-28 17:36:37 +00:00
Kevin Cox 34e413f66d Make value_string_ext const-correct.
There is still some const-incorrect usage of them but those can be ironed
out after this change has been made.

Change-Id: Iba0631c804bdab34d7c0232b49967130e3370488
Reviewed-on: https://code.wireshark.org/review/3199
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-27 22:02:42 +00:00
Joerg Mayer 4658109690 Fix incorrect whitespace. Why this wasn't spotted during review?
Change-Id: I54be42e020e2febf2e15d5eb0e772153eae1ba32
Reviewed-on: https://code.wireshark.org/review/3213
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-07-27 19:09:58 +00:00
Graham Bloice ec08f3458e Added function dnp3_header_check() to check the validity of a DNP3
packet as far as possible, called from both dissect_dnp3_tcp and dissect_dnp3_udp.

Bug: 10287
Change-Id: Iaa988258b3614cb1b408dec41a987fbd61c9727c
Reviewed-on: https://code.wireshark.org/review/3096
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2014-07-27 17:41:30 +00:00
Evan Huus d95d7752fa Fix yet another openflow underflow issue.
I thought I'd found all of these but I guess I hadn't; good thing the fuzz-bot
kept looking.

Bug:10314
Change-Id: I2cc209a6c87781d10cae28f2cb91400d759f5091
Reviewed-on: https://code.wireshark.org/review/3205
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-27 01:40:37 +00:00
Michael Mann 31ecdf5b06 Refactor "common" Conversation table functionality.
Refactor (non-GUI) conversation table functionality from gtk/Qt to epan.  Also refactor "common GUI" conversation table functionality.

The idea is to not have to modify the GUI when a dissector adds a new "conversation type"

Change-Id: I11f08d0d7edd631218663ba4b902c4a4c849acda
Reviewed-on: https://code.wireshark.org/review/3113
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-07-26 20:59:42 +00:00
John Miner c3e42cc6b4 OptoMMP Dissector
Change-Id: I754335b9944a9de169e37c16a3e37a86d35543a6
Reviewed-on: https://code.wireshark.org/review/3110
Petri-Dish: Evan Huus <eapache@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-25 19:54:21 +00:00
Jakub Zawadzki 788ff153ba Empty proto_reg_handoff_* are not needed, remove some.
Change-Id: I957b01aa00bbff3c48192388c7ad9e601d79c778
Reviewed-on: https://code.wireshark.org/review/3196
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-07-25 11:51:07 +00:00
moraney.jalil 0501465a3a Fixing a bug in add_ff_action_public_fields(), by removing the start argument and defining it inside the function.
Change-Id: I6205384b3bcf38128912baf413b4455357d25347
Reviewed-on: https://code.wireshark.org/review/3184
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-25 02:59:43 +00:00
Martin Kaiser cca0fd35fe add the flags to all FullBoxes
Change-Id: I6e0109bc1d1acf200fd0c1a9f8ddd3a3d98f5908
Reviewed-on: https://code.wireshark.org/review/3189
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-07-24 20:01:47 +00:00
Martin Kaiser 0b15ec8cdc start dissecting the MP4 stsd box
Change-Id: I589a6ced098d1d224e86386f028c92fc0797164e
Reviewed-on: https://code.wireshark.org/review/3188
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-07-24 20:01:20 +00:00
Martin Kaiser fb9851ea57 dissect the MP4 url box
Change-Id: Ibeaf5ba5d104e7f9bc9291e83923f8675abf0099
Reviewed-on: https://code.wireshark.org/review/3187
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-07-24 20:00:41 +00:00
Martin Kaiser 7d219fdd7d dissect the MP4 dref box
Change-Id: I342f283bbab3052337e00502769150cf3f4a8800
Reviewed-on: https://code.wireshark.org/review/3186
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-07-24 20:00:11 +00:00
Martin Kaiser 476f49cd0f dissect the MP4 hdlr box
Change-Id: I467bfae2db7d3a119b58505b43b3d9bb59615ee9
Reviewed-on: https://code.wireshark.org/review/3185
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-07-24 19:59:34 +00:00
Alexis La Goutte 2c1b67313d IMAP: fix mixed indent (use 2spaces)
Change-Id: Icaad98527c61cb5c87f84ec23d1d895079fe2515
Reviewed-on: https://code.wireshark.org/review/3182
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-24 19:11:36 +00:00
Peter Wu 2944d8b97c ssl: clarify meaning of StringInfo, cleanup PRFs, master_secret
It was not clear whether the data_len member of StringInfo refers to
the allocated memory (as was done for session_ticket) or the length
of the actual data. This is clarified in a comment. To keep the
invariant "data_len refers to the length of meaningful data", some
code has been moved just in case some intermediate code fails:

 - Setting session_ticket.data_len vs tvb_memcpy to session_ticket.data.
 - PRF functions would expect the data length as input to a paramter
   named "out". This is highly confusing, so another parameter has been
   added to signify the requested length, "out_len". This also helps
   holding up the invariant.
 - For prf() calls, out.data_len does not need to be initialized but
   passed as parameter.

Other PRF-related changes:

 - Change the PRF functions to return a boolean instead of an int.
 - tls_hash: return void as it cannot fail and remove related error
   handling from callers. Fix a memleak of label_seed if tls_hash was
   successful.
 - tls_hash: add comments to clarify its functionality, whitespace.
 - ssl3_generate_export_iv could not fail, so make it void. Also added
   an out_len param to pass the target length.
 - In prf(), replaced if-conditions for SSL version by a switch.
 - In ssl_generate_keyring_material, the scope of some variable has been
   tightened.
 - ssl_session_init: explicitly set data_len to 0. This is strictly not
   necessary as the callers have already zeroed out the memory, but that
   has not been documented.

Other changes related to master_secret (ssl_save_session[_ticket]):

 - Initialize master_secret.data_len to 0 in ssl_session_init as the
   master_secret is unusable at that point.
 - Remove the hack that tests whether master_secret.data is non-empty.
 - Replace hardcoded master_secret length (48) from wmem_alloc0().
 - Introduce macro for master secret length, use this in
   SslDecryptSession, for parsing from keyfile and converting pre-master
   secret to master secret (prf).
 - Use (master_secret + 1) to refer to the part after the struct rather
   than adding the size manually to a gchar-casted master_secret.

Change-Id: Ie1ea448db54e828b904568224486147a3d962522
Reviewed-on: https://code.wireshark.org/review/3030
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-07-24 05:33:50 +00:00
Peter Wu fc983cfca2 ssl,dtls: move Finished dissection to ssl-utils
Change-Id: Ib4bd5712cb85cd2671f67fe035747b88d5b4f186
Reviewed-on: https://code.wireshark.org/review/3034
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Hauke Mehrtens <hauke@hauke-m.de>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-07-24 05:29:52 +00:00
Alexis La Goutte 73c1810a1f MySQL: Add Client can handle expried passwords extended Capability
Change-Id: I9464e7d188d8e8c027db94c214e692ff233a13fd
Reviewed-on: https://code.wireshark.org/review/3178
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Daniël van Eeden <wireshark@myname.nl>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-23 20:54:43 +00:00
Peter Wu 5e3b04449a ssl,dtls: move Session Ticket to ssl-utils
Changes:

 - dtls: also support saving session tickets.
 - Drop the length check and let proto_tree_add_item throw exceptions
   on length errors.
 - Use proto_tree_add_item instead of proto_tree_add_uint.
 - Drop "TLS" from header field descriptions, the RFC does not name it
   as such and DTLS can also use it (a draft is in progress that extends
   DTLS with Session Tickets,
   draft-hummen-dtls-extended-session-resumption-01).

Change-Id: I11195217368b7200821d11289b1c5870a1ffe637
Reviewed-on: https://code.wireshark.org/review/3029
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-23 20:50:38 +00:00
Peter Wu 057ded827d ssl-utils: stop exporting some symbols
Client/Server hello and Hello extensions are now dissected inside
ssl-utils, no need to export them for the SSL or DTLS dissectors.

Change-Id: I8f2405199f21616743fe74959f07cfa839565527
Reviewed-on: https://code.wireshark.org/review/3022
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-23 17:09:25 +00:00
Peter Wu ee231c5263 ssl,dtls: move ClientHello to ssl-utils
Changes to ClientHello dissection:

 - Move ssl_find_private_key (and its pre-req, ssl_set_server) outside
   ssl_dissect_hnd_cli_hello. It has not really something to do with
   dissection, but state tracking and decoder param feeding.
 - dtls: add expert info for bad cipher suites len.
 - ssl: remove bad cipher suites len text label which is also
   available as expert info. Attach expert info to a the length proto
   item (which is converted to use add_item instead of add_uint).
 - Remove `if (tree || ssl)` since expert info seems not to apply
   otherwise (this also needs changes in common and handshake
   dissection).
 - ssl: remove tvb_ensure_bytes_exist so we can dissect more
   compression methods and cipher suites.
 - Since DTLS has an additional Cookie field which TLS does not have,
   pass these additional header fields through a struct whose type is
   defined in ssl-utils.

Change-Id: I41bef04c1c3353e582e30f561d1d246a744e1d60
Reviewed-on: https://code.wireshark.org/review/3021
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-23 17:09:01 +00:00
Peter Wu aa09feaf52 ssl,dtls: move ServerHello to ssl-utils
Changes to ServerHello:

 - Get rid of session parameter as the SslDecryptSession already
   provides a reference to SslSession. Done for the new
   ssl_dissect_hnd_srv_hello and ssl_dissect_hnd_hello_ext functions.
 - No need to generate the keyring here, decryption is only needed after
   ChangeCipherSpec and the keyring will be generated there provided
   that there are enough params (cipher, version, master-secret, etc.)
 - Get rid of labels and goto in favor of if/else.
 - DTLS: SSL_HAVE_SESSION_KEY is implicitly set when
   ssl_generate_keyring_material succeeds, no need to set it. Remove it.
 - Remove `if (tree || ssl)` since expert info seems not to apply
   otherwise (this also needs changes in common and handshake
   dissection). (Expert info from the TLS extensions, not the
   ServerHello itself.)

Other changes:

 - ClientHello: renamed some fields shared with ServerHello.

Change-Id: I466b905d990489e03250bac97bf9d862ff82ce6c
Reviewed-on: https://code.wireshark.org/review/3020
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-23 17:08:06 +00:00
Florian Lohoff fbcfe6eccb Fix email address and product name in Redback dissector
Change-Id: I777c164d24282a1de3082b33d5e89272a78bde6b
Reviewed-on: https://code.wireshark.org/review/3177
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-07-23 15:44:25 +00:00
Florian Lohoff 822d0ca132 Add dissecting of IPv6 in Redback Smartedge Captures
Change-Id: I028d294235a4e1d55096df8face48c4a74710506
Reviewed-on: https://code.wireshark.org/review/3176
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-07-23 15:24:16 +00:00
Florian Lohoff 26e4b947d3 Fix decoding of PPP frames from Redback Smartedge trace
Change-Id: I2eed4da20bc1f87dc1c4a3a6357a8f5692893939
Reviewed-on: https://code.wireshark.org/review/3175
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-07-23 15:23:39 +00:00
Daniel van Eeden 7dcb1d7e86 Update MySQL Capability flags
Change-Id: I62d0a26ec1c81efa2ee8dbefcbdb308155f64ad5
Reviewed-on: https://code.wireshark.org/review/3136
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-22 02:05:00 +00:00
Marcel Essig dacb1f652e better visibility for vx11
Change-Id: I18d51e15eb38f28cc7333f0adb17fbfd22ba09a5
Reviewed-on: https://code.wireshark.org/review/3150
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-22 02:03:32 +00:00
Martin Kaiser d52f4d5e00 simplify the tree handling a bit
Change-Id: I887000ac2bb273a0cc0c41709e346e1cf52140d9
Reviewed-on: https://code.wireshark.org/review/3149
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-07-21 09:59:15 +00:00
Martin Kaiser bcf0ea3b21 display unused bytes as raw bytes not as ASCII string
Change-Id: I50c1ef94aff4d1067b6561c5a06a397216e49ee2
Reviewed-on: https://code.wireshark.org/review/3148
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-07-21 09:59:00 +00:00
Daniël van Eeden 13288b05e1 Add auth plugin to server greeting info
Change-Id: I862203c9be0cd10c72599609631629bf976a7a22
Reviewed-on: https://code.wireshark.org/review/3137
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: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-07-21 09:39:46 +00:00
Martin Kaiser 450f491652 use proto_tree_add_item()
Change-Id: I7642295721e886eef4682c602ad96b61bc85b3b6
Reviewed-on: https://code.wireshark.org/review/3128
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-07-19 14:22:38 +00:00
Martin Kaiser ab2922b7e5 simplify APPEND_OUI_NAME
Change-Id: I83aef5ebc92a7218f59bd77338058d98ffa2ed6b
Reviewed-on: https://code.wireshark.org/review/3127
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-07-19 14:22:22 +00:00
Martin Kaiser 18dfb13c12 remove the NULL check in APPEND_BOOLEAN_FLAG
Change-Id: I15742ce73d3445ec47369d35dd0da6715b7079cf
Reviewed-on: https://code.wireshark.org/review/3126
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-07-19 14:22:08 +00:00
Martin Kaiser 65873a921f add editor modelines
reformat

Change-Id: Idce9d34c41ce2bcbc4d5efa4699decd7f3068199
Reviewed-on: https://code.wireshark.org/review/3125
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-07-19 14:21:53 +00:00
Martin Kaiser 8e4ae89524 simplify the tree handling a bit
Change-Id: Ie6a9c033d2de3231f810a33b032ab06fee3f68a0
Reviewed-on: https://code.wireshark.org/review/3124
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-07-19 14:21:38 +00:00
Martin Kaiser 30239117ac fix bug 9100
object and package containers may have multiple entries

Change-Id: I032e78057aadbbe67925d07881da9f1182a24058
Reviewed-on: https://code.wireshark.org/review/3121
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-07-19 12:55:57 +00:00
Martin Kaiser c21a8a7624 remove some more unnecessary initializations
Change-Id: I74b082b7644f36efc3dc220ff92f1bfff524c408
Reviewed-on: https://code.wireshark.org/review/3119
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-07-19 12:21:41 +00:00
Martin Kaiser 7d0ad3f9d2 no need to initialize these pointers
Change-Id: I0791ca2fc9a7a87dafbdf15f51d9f1a9d12aa89e
Reviewed-on: https://code.wireshark.org/review/3118
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-07-19 12:20:24 +00:00
Martin Kaiser 6885cc71d3 use gboolean for detected_drop
Change-Id: Ice0c68541604c5566cc807c17faf534cd6628262
Reviewed-on: https://code.wireshark.org/review/3117
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-07-19 12:20:04 +00:00
Martin Kaiser 831c1f2fe1 add H.265 stream type
Change-Id: Ic8e17f949f245ad6fe26fb8078e0545fe5b35daa
Reviewed-on: https://code.wireshark.org/review/3116
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-07-19 12:19:43 +00:00
Michael Mann e28a8ff5af Add some expert info to the MAC Control dissector
Partial-bug: 6121
Change-Id: If7a367671cf55793799e0d72f8846bd6fe2a2222
Reviewed-on: https://code.wireshark.org/review/3038
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-18 20:13:23 +00:00
Pascal Quantin deb1d8d07f WebSocket: increase max unmask payload size to 256K and indicate that packet is truncated is going above the new limit
Bug: 10283
Change-Id: Iea5401d02bcf50a3427dce5f2b817c3b73a7dc11
Reviewed-on: https://code.wireshark.org/review/3098
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-18 20:11:40 +00:00
Alexis La Goutte 23f25714e9 DNS: Add new opcode EDNS EXPIRE (9) for EDNS options (RFC7314)
Change-Id: I2db7bf6a80a34540aa90a3362566ac399b1c3644
Reviewed-on: https://code.wireshark.org/review/3101
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-18 20:10:20 +00:00
AndersBroman 4a8b6882c3 Add casts to make the buildbot happy.
Change-Id: Ia77b86c83a6458210f913a691b707b7aa1b911d7
Reviewed-on: https://code.wireshark.org/review/3100
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-18 08:55:02 +00:00
David Ameiss 7c3652df2e Split LBMR tap into 5 separate taps. Make the associated tap data use fixed-length fields. The idea is to allow user-written tap
listeners easier access to the tap data. Also correct the conditions (in packet-lbmc.c) under which a subdissector would be
called, if present.

Change-Id: I5244cfbd17314058f7d3b9f42d647e0e6c375e14
Reviewed-on: https://code.wireshark.org/review/3007
Reviewed-by: Evan Huus <eapache@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-18 05:35:09 +00:00
Matthieu Texier e95083d264 Support of draft-ietf-idr-flow-spec-v6 and some cosmetic improvments
Change-Id: Ieaf23c84d67ccdfdcb167afb382c86797bc1cd2b
Reviewed-on: https://code.wireshark.org/review/3006
Reviewed-by: Evan Huus <eapache@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-18 05:34:39 +00:00
Hauke Mehrtens 1d079fd353 ssl-utils: change some references from ietf drafts to rfcs
Change-Id: I41a93a2818228ff6e5f005df5135996e687498af
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Reviewed-on: https://code.wireshark.org/review/3097
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-18 02:51:28 +00:00
Michael Tüxen 3e7ed3da2c Escape some characters like \n when appending text
This patch escapes some characters like \n when showing text
contained in a packet by appending it to a protocol item.

Change-Id: Ice0040040ec7ab573dd9a412f8c0c197a566a031
Reviewed-on: https://code.wireshark.org/review/3095
Petri-Dish: Michael Tüxen <tuexen@wireshark.org>
Reviewed-by: Michael Tüxen <tuexen@wireshark.org>
2014-07-17 23:47:03 +00:00
Graham Bloice ed043d753a When DNP3 heuristics are disabled, relax the conditions on
accepting a packet as DNP3.

Bug: 10287
Change-Id: I222ec885186447c8a72eaf11cebacff8b9b79fad
Reviewed-on: https://code.wireshark.org/review/3092
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2014-07-17 15:46:38 +00:00
Tatsuhiro Tsujikawa 1b8c4bae48 Fix assertion error when no header field was decompressed
bug: 10279
Change-Id: Ibf88b1622318692ccf3904aede5d964e6028bdc7
Reviewed-on: https://code.wireshark.org/review/3087
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-07-16 14:13:49 +00:00
Jim Young 09cb981b0e Fix regression related to OSPF related enum order definitions
bug: 10271
Change-Id: Id2de856104d7506583e94893501cff23de3ec212
Reviewed-on: https://code.wireshark.org/review/2976
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-16 11:32:29 +00:00
Alexis La Goutte 024c002016 TLS: Update to the final RFC (7301) for ALPN
Change-Id: I16b3f6ec7cc4d356a6cb6090866691ddd2e708b6
Reviewed-on: https://code.wireshark.org/review/3056
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-16 06:53:36 +00:00
Guy Harris b720f08f36 Don't use __func__, use G_STRFUNC.
Not all compilers we use support __func__.

Change-Id: I61194e1073c87e67f821e14698ea21b73d63983c
Reviewed-on: https://code.wireshark.org/review/3071
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-16 00:23:51 +00:00
Peter Wu 2c772e3825 ssl: move decoder init from ClientKeyExchange to ChangeCipherSpec
My previous change removed master-key retrieval in the Server Hello.
This broke decryption when ClientKeyExchange is missing. That was done
because decryption is only needed after ChangeCipherSpec.

This patch moves the remaining initialization in ClientKeyExchange to
ChangeCipherSpec. In theory this could fix decryption of DTLS traffic
when an abbreviated handshake is used (and thus keyring material is
never generated in ClientKeyExchange since it is not called).

It also avoids saving a session ticket with an empty key which can
happen when no RSA key is present, but the NewSessionTicket message
is received. This could lead to garbage decryption.

Change-Id: If0f475232c270b1d7b006c1f9af0e8d8098c6b65
Reviewed-on: https://code.wireshark.org/review/3019
Reviewed-by: Hauke Mehrtens <hauke@hauke-m.de>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-15 23:07:10 +00:00
Peter Wu aecbb98365 ssl: unify common Hello dissection to ssl-utils
Based on DTLS code with changes merged from SSL. Changes:

 - Ignore large Session IDs, this was not harmful though since the
   backing storage was 256 bytes in size.
 - {ssl,dtls}.handshake.random: fixed description, it is not used like
   a SSLv2 random challenge.
 - dtls: also debug print client/server for random
 - SSL: the common dissector now returns an offset rather than dissected
   length.
 - dtls: display actual Session ID bytes in the UI rather than the text
   "Session ID (32 bytes)". The length field is already visible in the
   preceding field.

Also changed is the handling of key material generation. The SSL
dissector previously generated key material based on the Session ID,
Session Ticket or a key logfile. (DTLS did not have this functionality.)
As decryption is needed only after ChangeCipherSpec, I have removed it
from the ServerHello handling. This will break decryption when a
ClientKeyExchange message is missing, but it will be restored proper in
a next patch.

(By the way, there was an inverted if-condition bug in DTLS that could
break decryption by not restoring the master key matching a SID. This
is gone in the refactoring because the faulty code is removed.)

Change-Id: Ida3de88adefe3f7691f85936c496977426c4d96e
Reviewed-on: https://code.wireshark.org/review/3018
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Hauke Mehrtens <hauke@hauke-m.de>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-15 23:07:05 +00:00
Alexis La Goutte 36548d7131 Fix Argument with 'nonnull' attribute passed null found by Clang
Change-Id: I48f488a75f53d077a213f7b9379960985ce3bf08
Reviewed-on: https://code.wireshark.org/review/3055
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-15 22:57:57 +00:00
Sean O. Stalley 91f627b7e7 MAUSB dissection of control transfer responses
The MAUSB dissector can now dissect transfer responses for control
endpoints.

Change-Id: Ic488ccb308365d072bbbf0eaf128b198caf74eca
Reviewed-on: https://code.wireshark.org/review/2960
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-15 22:55:19 +00:00
Sean O. Stalley 9335faa6a2 Moved USB Setup Response Dissection into own function
USB Setup Responses are now dissected in their own function.
Before they were dissected inline in the usb_dissect_common()
function.
(just copied code).

Also replaced proto_tree_add_text() with proto_tree_add_item()
for generic setup response data.

Change-Id: Ia3943334cccc0a1813e0c906196307f99561ad21
Reviewed-on: https://code.wireshark.org/review/2959
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-15 22:54:22 +00:00
Alexis La Goutte 53f597d120 Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: I908e08e491bae6c7532e02269d8ed004ad0cee91
Reviewed-on: https://code.wireshark.org/review/3053
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-15 22:53:14 +00:00
Guy Harris 52a4f3d121 Add application/atom+xml as an XML document type.
Change-Id: I9fcf438f3cafcb3ab3a5b6dc0f72ed2561e5a94f
Reviewed-on: https://code.wireshark.org/review/3049
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-14 23:50:24 +00:00
Graham Bloice 560762044d Fix buildbot issues with commit f8f3239bb0
from change 3016.

Change-Id: I67363462f1c4e1ca69695573892692c458c620c6
Reviewed-on: https://code.wireshark.org/review/3040
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2014-07-14 14:02:29 +00:00
Martin Mathieson f8f3239bb0 Add default ciphering and integrity algorithms to use for when control messages are not available, e.g. when handing in to a target cell.
Change-Id: I35830fe04df5e5778c15cdb782982b2fbcda67ea
Reviewed-on: https://code.wireshark.org/review/3016
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-07-14 12:30:47 +00:00
Gerald Combs 082b46f95a [Automatic manuf, services and enterprise-numbers update for 2014-07-13]
Change-Id: I2aa66d261040f9f3e86103c820c914c371a70d1f
Reviewed-on: https://code.wireshark.org/review/3031
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-07-13 15:05:30 +00:00
Роман Донченко f85b52b498 proto_register_zbee_zcl_appl_evtalt: correct formatting
The original formatting, besides looking silly, also prevents the function
from being picked up by make-dissector-reg.

Change-Id: I06e37b0e862064275b07976295eca8f0288a0974
Reviewed-on: https://code.wireshark.org/review/3025
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-12 19:09:23 +00:00
Peter Wu 9e5e43ba44 dtls: fix faulty offsets and tvbuff references
This could lead to problems for fragmented DTLS packets.

Change-Id: I602c7e181ea3799a4a2e7bcfed05bfbb129f7df4
Reviewed-on: https://code.wireshark.org/review/3017
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-12 12:06:50 +00:00
Petr Štetiar ea4b2f486d dissectors/llrp: Add support for Impinj's Hub extension
Based on Impinj extension schema v1.4.

Change-Id: Ica9493a4527ae800d6e5daaf2d86b8cfdf479ed1
Signed-off-by: Petr Štetiar <petr.stetiar@gaben.cz>
Reviewed-on: https://code.wireshark.org/review/2981
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-12 00:34:35 +00:00
Pascal Quantin 826bca0918 GTP: allow empty Data Record Packet IE
Bug: 10277
Change-Id: I4edf330fa1c44a52d985d70555c7756954fb9364
Reviewed-on: https://code.wireshark.org/review/3008
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-07-11 17:55:03 +00:00
Michael Mann aa0eb595a0 Restore some assignments of ti2 that were removed in the proto_tree_add_subtree[_format] conversion
bug:10270
Change-Id: I40062065add1c6a08bdabc9dcbbe53afaafca035
Reviewed-on: https://code.wireshark.org/review/2997
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-11 07:37:05 +00:00
Anish Bhatt bc8e095ec8 Update to fix for Bug 6302.
There is no need to check block constraints as min length already guarantees this, this also fixes false positives for missing TOS metric blocks

Change-Id: Icbe3067d2506fad1c7dbcb175d932a5f242fa5cd
Signed-off-by: Anish Bhatt <anish@chelsio.com>
Reviewed-on: https://code.wireshark.org/review/2995
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-11 04:39:16 +00:00
Peter Wu 71ebdb67ad ssl: move CertificateRequest to ssl-utils
Except for field/expert_info names, a redundant subtree assignment,
a different !tree check, a type confusion in DTLS (proto_tree *ti),
a check against a different DTLS/TLS version and a (void) retval cast,
the functions are exactly the same. Extract them to ssl-utils.

Change-Id: I2ca7089fe2cd23212ef78656506cb53768f55927
Reviewed-on: https://code.wireshark.org/review/2986
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-11 04:36:51 +00:00
Peter Wu ba6d2e7cc8 ssl: move Certificate handshake dissection to ssl-utils
There are no dissection differences between DTLS and SSL, so move to
ssl-utils. While at it, skip dissection when the tree is NULL, remove
the plural from certificates length (the length is always larger than
ome), fix type of "ti" for dtls, get rid of "failsafe" subtree
assignment in ssl, get rid of tvb_ensure_bytes_exist in ssl.

Unrelated changes: fix param (tvb vs sub_tvb) for DTLS KeyExchange
handshake messages.

Change-Id: Iecaa45a7a601e55a52aa16180cf219a122fbe95a
Reviewed-on: https://code.wireshark.org/review/2985
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-11 04:35:40 +00:00
Peter Wu 7248c24afc ssl: add missing valid handshake types
The DTLS dissector duplicated a handshake types check, this has been
eliminated. Convert HandshakeType and ContentType to enums to get the
benefit of compiler-checked switch cases. Move these checks to
ssl-utils.

Two default cases could never be reached since the dissector returns
immediately on an invalid ContentType.

Also fixed misleading debugging messages.

Change-Id: I07a2062564e073004dcc0401cd82538e5659fa0c
Reviewed-on: https://code.wireshark.org/review/2978
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-11 04:32:15 +00:00
Bill Meier 9ed99d5c4e Strip some trailing whitespace; Fix some indentation; Add editor-modelines as needed.
Change-Id: I943153e28f468070d86535abad7be032e1386118
Reviewed-on: https://code.wireshark.org/review/2994
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-07-11 03:20:54 +00:00
AndersBroman 96f0585268 Quick fix to handle IEPS token.
Fix deorecated APIs

Change-Id: Iad1f970b553f1655109b36364a1d37676582f608
Reviewed-on: https://code.wireshark.org/review/2984
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-10 14:48:08 +00:00
Alexis La Goutte a7fb1e5c53 Fix Uninitialized argument value found by Clang Analyzer
Change-Id: I3cdb7734302b3e879def71dfa48c4654999ae9d2
Reviewed-on: https://code.wireshark.org/review/2983
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-10 13:34:03 +00:00
Peter Wu 1bf4efd850 ssl,dtls: convert from tvb_length
Every occurrence of tvb_length* has been converted to
tvb_reported_length* except some dtls lines.

Change-Id: I0faac315cdf5d17c0af18be177aacd076ff86cff
Reviewed-on: https://code.wireshark.org/review/2977
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-07-10 11:00:11 +00:00
Britt McKinley b2bf078d52 h264: Remove unneeded errata checks.
Some Microsoft errata were caused by bad decoding and were not actually
problems.  Remove the unneeded tests and expert information.
Add PRID ranges values to Layer Presence bytes.

Change-Id: I0b2b555bc448f0b4ee142b2920ae4e37d54ccab4
Reviewed-on: https://code.wireshark.org/review/2958
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-09 22:37:14 +00:00
Sean O. Stalley cdc1c16bb7 Print wIndex in decimal and hex
wIndex often contains different fields in it's upper & lower byte.
Printing in hex makes these seperate fields easier to read.

Change-Id: I69fb7e14b4f5b5a1ecd61bcae34f6d100f1a94b6
Reviewed-on: https://code.wireshark.org/review/2961
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-09 21:01:59 +00:00
Pascal Quantin 9f3c429929 MAC LTE: interpret RAR TPC command
Change-Id: I4e44124d5634e570917730084619e138a6e534af
Reviewed-on: https://code.wireshark.org/review/2963
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-07-09 18:04:57 +00:00
Pascal Quantin 4418986933 HDMI: remove useless include
Change-Id: Ia575fc8f3e80666a13dbc54220aa3931a1c505f0
Reviewed-on: https://code.wireshark.org/review/2962
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-07-09 18:03:14 +00:00
Graham Bloice 4b5967f683 Moved nghttp2 to epan
Cleaned up nghttp2 build

Change-Id: I9f7adc12936155e0ffc01ec825b5aff95279f97d
Reviewed-on: https://code.wireshark.org/review/2937
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-09 05:31:31 +00:00
Michael Mann 6691293a65 convert to proto_tree_add_subtree[_format]
Change-Id: I8d66b1bc7dbdfee3d4bf6fd3b3c21c6323b66f44
Reviewed-on: https://code.wireshark.org/review/2946
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-09 00:25:04 +00:00
Pascal Quantin cfee2019c6 LTE RRC: upgrade dissector to v11.8.0
Change-Id: I2bb0861029d0d30ae372b0b8085fbedeb4932217
Reviewed-on: https://code.wireshark.org/review/2949
Tested-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-07-08 22:06:46 +00:00
Yan Burman 17872b57e9 Fix setting PT_IBQP type
Without this patch, pinfo->ptype is PT_UNKNOWN

Change-Id: Ia15b5115f874d0c9ff69be11ed7ee3dac1fadbd5
Signed-off-by: Yan Burman <yanb@mellanox.com>
Reviewed-on: https://code.wireshark.org/review/2941
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-08 15:18:17 +00:00
Pascal Quantin ac52c06038 RRC: fix ASN.1 description by manually adding CR5591
Without it, dual-band DF-3C feature does not work

Change-Id: I95d4a7320b77c6093f5d51efdbb2b21af0deab11
Reviewed-on: https://code.wireshark.org/review/2942
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-07-08 15:17:17 +00:00
Alexis La Goutte b0a7251f38 Fix Uninitialized argument value found by Clang Analyzer
Change-Id: Ia39d7b258a888c188ae7d87c3c907e2a0ad1d3f0
Reviewed-on: https://code.wireshark.org/review/2936
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-08 10:39:20 +00:00
Alexis La Goutte 4e478aac67 Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: I369c4620f47f92bf66722fa79582502c0897a316
Reviewed-on: https://code.wireshark.org/review/2935
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-08 10:38:28 +00:00
Alexis La Goutte 033249ec62 Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: Idc6e9cf8f7f4b8e18a50723acbe5dee4c8cb786c
Reviewed-on: https://code.wireshark.org/review/2934
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-08 10:36:55 +00:00
Pascal Quantin 55ce1bc6a6 Upgrade LPP dissector to v11.5.0
Change-Id: I8c51cebec5b234b9d0667aaf3f70b0a48bb842f6
Reviewed-on: https://code.wireshark.org/review/2933
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-08 06:30:33 +00:00
Tatsuhiro Tsujikawa a6fc598aa7 Enhance HTTP/2 HPACK header decompression handling
Previously we just call HPACK decompressor when dessecting packets.
This is fine for the first linear scan.  But later same packet may be
dissected more than once and their header block data will be fed into
decompressor again.  This makes header compression context out-of-sync
because HPACK decompressor only works when data is fed linearly.  This
change fixes this issue by caching decompressed headers in the first
linear scan.  On random packet dissecting, they are just looked up.
This change adds support of changing header table size by inspecting
SETTINGS frame and tracking its SETTINGS ACK.

Change-Id: I9c75c67f8677063e443f9b131740f3ee94ff8a63
Reviewed-on: https://code.wireshark.org/review/2616
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-08 06:23:21 +00:00
Tatsuhiro Tsujikawa 36c393321e Dissect HTTP/2 draft-13
Summary of changes since draft-12:

* Pad High and Pad Low wereare replaced with single Pad Length field.
* Padding was removed from CONTINUATION frame.
* ALTSVC and BLOCKED frames were removed.
* Per-frame compression and its associated SETTINGS flag were removed.
* HPACK Huffman code table and static header table were updated.

Change-Id: I9c4f05f8cd937bfadbb1b912f2b9ffb31e9c18d5
Reviewed-on: https://code.wireshark.org/review/2615
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-08 06:18:29 +00:00
Peter Wu 46b3dda046 iscsi: automatically detect data segment digest
Modelled after ccf7ed00b6 which detects
the header digest field, this patch adds auto-detection for the Data
Digest field which comes after the data segment.

Since the digest is now automatically detected, drop the three related
preferences.

Verified against scsi-osd-example-001.pcap (from SampleCaptures).

Change-Id: Icd89f1be58889c7ab70aca9dff7d3f99c8fe04d6
Reviewed-on: https://code.wireshark.org/review/2882
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-08 06:15:45 +00:00
Peter Wu 9b4f16a204 gsmtap: do not abort if dissector is unavailable
Encountered with the following attachments from bugs:
6575-test-dlmapc-wmx
6577-test-dlmapc-wmx
6579-test-dlmapc-wmx

Also added modelines.

Change-Id: I3859bed618830ad359bd0b2b1fdfc3c5fc13269e
Reviewed-on: https://code.wireshark.org/review/2920
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-08 03:45:31 +00:00
AndersBroman 1ff6213c94 Try to fix cast discards '__attribute__((const))' qualifier from pointer
target type

Change-Id: If7efc629247480fbfb231b965a358803b67e1504
Reviewed-on: https://code.wireshark.org/review/2919
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-07 15:16:54 +00:00
AndersBroman 4ac9895884 See if yhis fixes "cast discards '__attribute__((const))' qualifier from
pointer target type"

Change-Id: I0f97b119f1e6151622d360464f12ad399cbaf117
Reviewed-on: https://code.wireshark.org/review/2917
Tested-by: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-07 14:34:27 +00:00
Martin Mathieson 7801a97fd8 Trying to create and use an empty tvb now throws an exception. Just pass current tvb to mac-lte dissector.
Change-Id: I4aa24342192ec079254f26e00317470377c3e20b
Reviewed-on: https://code.wireshark.org/review/2916
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-07-07 10:42:14 +00:00
Alexis La Goutte 3c638d8bf8 Fix Branch condition evaluates to a garbage value found by Clang Analyzer
Change-Id: I2cb4fb8064c80ee7985c3908820f09f5fa7e37fb
Reviewed-on: https://code.wireshark.org/review/2913
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-07 10:25:20 +00:00
Guy Harris 593878299d Don't cast away constness if not necessary.
Change-Id: I5f6ecd246e358edc3a2f4963c201b2435e4a1a42
Reviewed-on: https://code.wireshark.org/review/2910
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-07 04:46:45 +00:00
Guy Harris eea2e15638 G_GNUC_FORMAT encapsulates __attribute((format_arg(...))).
Change-Id: I9513c187ae4ce8b8cf8f6a926072b215e26ec64f
Reviewed-on: https://code.wireshark.org/review/2907
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-07 04:29:41 +00:00
Peter Wu aa4066dccf skinny: fix retval, convert from tvb_length
New dissectors return an integer, not a boolean, fix that.

Change-Id: I79dea0cc4274d503d61ce8823dc783c542764f6b
Reviewed-on: https://code.wireshark.org/review/2884
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-07 01:46:59 +00:00
Guy Harris 0a2f6fc01a Squelch some compiler warnings.
Change-Id: I768bf577b3871171ab33f080c5a0099ac06718ce
Reviewed-on: https://code.wireshark.org/review/2906
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-07 00:11:59 +00:00
Michael Mann 4d58904a09 convert to proto_tree_add_subtree[_format]
Change-Id: Ie10ac4f5f04a23344d183e095bbafb23c6409144
Reviewed-on: https://code.wireshark.org/review/2904
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-07 00:03:35 +00:00
Guy Harris 79fcc6a1a3 Squelch some compiler warnings.
Change-Id: Ie39c7b0c1fef8f862cec016a3a1a5bd1451a3df2
Reviewed-on: https://code.wireshark.org/review/2905
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-06 23:49:04 +00:00
Peter Wu f2b4daf400 Add printf-format annotations, fix garbage
The WRETH dissector showed up some garbage in the column display. Upon
further inspection, it turns out that the format string had a trailing
percent sign which caused (unsigned)-1 to be returned by
g_printf_string_upper_bound (in emem_strdup_vprintf). Then ep_alloc is
called with (unsigned)-1 + 1 = 0 memory, no wonder that garbage shows
up. ASAN could not even catch this error because EP is in charge of
this.

So, start adding G_GNUC_PRINTF annotations in each header that uses
the "fmt" or "format" paramters (grepped + awk). This revealed some
other errors. The NCP2222 dissector was missing a format string (not
a security vuln though).

Many dissectors used val_to_str with a constant (but empty) string,
these have been replaced by val_to_str_const. ASN.1 dissectors
were regenerated for this.

Minor: the mate plugin used "%X" instead of "%p" for a pointer type.

The ncp2222 dissector and wimax plugin gained modelines.

Change-Id: I7f3f6a3136116f9b251719830a39a7b21646f622
Reviewed-on: https://code.wireshark.org/review/2881
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-06 23:00:40 +00:00
Peter Wu 49bc1047be whois,finger: fix retval, convert from tvb_length
Fixes dissector bug:
failed assertion "save_desegment_offset == pinfo->desegment_offset &&
save_desegment_len == pinfo->desegment_len"

Change-Id: Ia475bea3726252530189a05ba4dbf69f3c2b7e6c
Reviewed-on: https://code.wireshark.org/review/2886
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-06 22:05:26 +00:00
Guy Harris 5bfc21cf9e Clean up handling of missing functions.
With autotools, CMake, and nmake, if we have a function, #define
HAVE_{function_name_in_all_caps}, otherwise don't #define it.

If we provide our own version of a function in libwsutil, make sure we
have a header that declares it, and *ONLY* include that header if
HAVE_{function_name_in_all_caps} is *NOT* defined, so that we don't have
the system declaration and our declaration colliding.

Check for inet_aton, strncasecmp, and strptime with CMake, just as we do
with autotools.

Simplify the addition of {function_name_in_all_caps}_LO to libwsutil in
autotools.

Change-Id: Id5be5c73f79f81919a3a865324e400eca7b88889
Reviewed-on: https://code.wireshark.org/review/2903
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-06 21:03:09 +00:00
Pascal Quantin e649420686 H264: mark a parameter as unused
Change-Id: I564a0fefc263d909c9e478b64c5a816756d97377
Reviewed-on: https://code.wireshark.org/review/2902
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-07-06 19:44:01 +00:00
Britt McKinley 4e9802e679 H264: Add support of packetization modes, SVC, MS-H264
Add support for Prefix, STAP, MTAP, NI-MTAP, and PACSI packet types.
Add support for Microsoft SEI messages [MS-H264PF]
Add support for dissecting scalable profiles
SDP: Add profile-level-id decode for payload type H264-SVC
MS-H264PF: http://msdn.microsoft.com/en-us/library/hh659565.aspx
Update #1 - Fix Tabs -> Spaces, Reinsert accidentally removed entry 19
from h264_type_values
Update #2 - Changed to using expert info for exceptions and Microsoft
errata.
Update #3:
  - Correct handling of truncated packets
  - Use guid functions and compare techniques
  - Correct ranges for expert info messages
  - Change to using reported_length from captured_length

Change-Id: I520a3c9a6d85c78a976b520cf5a6a405064a48f1
Reviewed-on: https://code.wireshark.org/review/2580
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-07-06 19:11:24 +00:00
Alexis La Goutte c35b82c8f1 RTCP: Make checkhf happy
Change-Id: I5cdeb4a96bc9c4e11161836457a8689c904e13d4
Reviewed-on: https://code.wireshark.org/review/2899
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-06 18:32:17 +00:00
Alexis La Goutte 550f611162 RTCP: fix typo (double semicolon)
Change-Id: Id1997c3c8f6d0460da7f0faa58798a72737dd667
Reviewed-on: https://code.wireshark.org/review/2898
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-06 18:30:26 +00:00
Alexis La Goutte 841b1d652c Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: I5744a1c1efc65f9a7b3addf17c071b470fd2cced
Reviewed-on: https://code.wireshark.org/review/2896
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-06 18:30:06 +00:00
Alexis La Goutte 84189ded75 Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: I82efd1c5f4280de2eec3dbe7bd1995fcd9a3174f
Reviewed-on: https://code.wireshark.org/review/2895
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-06 18:28:23 +00:00
Michael Mann c71e88e4a9 convert to proto_tree_add_subtree[_format]
Change-Id: I3efa2a81ab2685cde6eae0a00b24520478a545ce
Reviewed-on: https://code.wireshark.org/review/2900
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-06 18:26:48 +00:00
Evan Huus be4d42c6ab Widen openflow variables and check for underflows
As suggested by Alexis reviewing change Ie76c5a810af927b, this issue was
scattered throughout the v4/v5 openflow dissectors. Hopefully I got all of them.
Original issue found in bug 10259.

Change-Id: Idf87deea34132aec5cd4e8f83264906a29b15568
Reviewed-on: https://code.wireshark.org/review/2878
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-07-06 16:53:39 +00:00
Peter Wu 5886e45179 iscsi: minor retval fix
The return value of new dissectors is the number of bytes that were
successfully dissected, not a boolean. Fix that and get rid of an
unnecessary iSCSIPdusDissected variable.

Change-Id: Ie31df393a1eb44f185d320a4c2d35f5e8b7d7bd9
Reviewed-on: https://code.wireshark.org/review/2889
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-06 15:51:45 +00:00
Peter Wu d828b15a82 kismet: fix retval, add modelines
new dissectors return an int, not a boolean...

Change-Id: I88e19f7c0dc14da3649d1522ffe936538a867753
Reviewed-on: https://code.wireshark.org/review/2888
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-06 15:47:51 +00:00
Peter Wu 2eae8bb0c3 mikey: do not request more data on proto violation
Return value "-1" means that more data is requested. The dissector
actually doesn't have any idea what to do with the data, so just return
the data dissected so far.

tcp stream 3182 from c05-http-reply-r1.pcap (SampleCaptures) was
incorrectly detected as MIKEY, it was actually HTTP...

Change-Id: Idca3d3e2f85e821df70436a675699b5834236f89
Reviewed-on: https://code.wireshark.org/review/2887
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-06 15:45:33 +00:00
Peter Wu b54731dc7d ms-mms: fix retval for short pkts, fix reading flags
uint16 & 0xFF00 will always equal 0. Use tvb_get_guint8 instead. Convert
from tvb_length to tvb_captured_length.

Fix the return value of dissectors, 0 means reject but that cannot be
combined with reassembly requests.

Change-Id: I5fca66e2e809699392237aff5813eecdfb15857f
Reviewed-on: https://code.wireshark.org/review/2885
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-06 15:42:58 +00:00
Evan Huus 4afd70d4e4 Use g_hash_table_new_full to free some values
Fixes a good 80-90KB of leaks in certain cases.

Bug: 10261
Change-Id: I81d57ac67219e730b03649b9fdfc2306807bdb97
Reviewed-on: https://code.wireshark.org/review/2879
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-06 14:27:27 +00:00
Michael Mann 6318a29fa3 convert to proto_tree_add_subtree[_format]
Change-Id: Ia2567695ffed30c990eda3740b08bfab101cea96
Reviewed-on: https://code.wireshark.org/review/2883
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-06 14:21:15 +00:00
Guy Harris db530d886d Squelch casting-away-constness warnings.
The pStr argument to dissect_mq_charv() isn't modified (and always
points to a character string), so make it a "const char *", and
eliminate the casts to "guint8 *" in calls to it.

Change-Id: I21dad38c41324528be297a8ddc1854beff2276db
Reviewed-on: https://code.wireshark.org/review/2877
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-06 11:25:41 +00:00
Роман Донченко afa8f21f56 make-dissectors-reg: optimize by factoring out the loops
Instead of calling the grep/sed pipelines for each file, build the
list of files in the beginning and call each pipeline only once,
passing the list to the first grep.

This results in a massive speedup in Cygwin; in my test, the time
it takes to run make-dissector-reg . dissectors packet-*.c in dissectors/epan
is reduced from ~116 to ~3 seconds. I also tried it on NetBSD, where
the time do to the same goes from ~6 to ~0.5 seconds.

Amend makefile comments to elide mentions of invoking multiple processes
per file.

Change-Id: Iad441e7d2b6cc3669dada57646e2f8f6b987fd34
Reviewed-on: https://code.wireshark.org/review/2826
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-06 08:08:20 +00:00
Michael Mann 3490bc6eb9 Change display filters to prefix with ipmi.trace
Change-Id: I7b4476cb0a06362941ef81707a9686f5546a4a54
Reviewed-on: https://code.wireshark.org/review/2868
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-06 08:03:29 +00:00
Michael Mann 0335ae339d convert to proto_tree_add_subtree[_format]
Change-Id: I66f0bffb987568c3d4c14a06bdc90465c877b27f
Reviewed-on: https://code.wireshark.org/review/2867
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-05 23:08:19 +00:00
Peter Wu 286c191846 9p: fix version detection, fix dissect_9P retval
Fix version detection (detect against full string instead of prefix),
properly dissect Tcreate extension field (9p2000.u only), dissect
Tunlinkat flags (9p2000.L).

Refactor pattern to dissect string[s] types for DRY.

Convert to use tcp_dissect_pdus. I have not seen a fragmented case, but
maybe that may happen in the future.

The main motivation for touching 9p was that it returns bogus values
for some types. This has been fixed by properly increasing offset, and
always return the captured length.

Change-Id: If2184204ae9c853b94aca8ade3763d7fe523fa86
Reviewed-on: https://code.wireshark.org/review/2836
Reviewed-by: Christopher Maynard <Christopher.Maynard@gtech.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-05 22:04:54 +00:00
Michael Mann fc63343a4e convert to proto_tree_add_subtree[_format]
Change-Id: I8df48b25de784a48a25f0e48aac1e1545ed92c35
Reviewed-on: https://code.wireshark.org/review/2865
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-05 20:36:36 +00:00
Evan Huus c92bf7e44b Expand a variable from 16 to 32 bits (and make it signed).
Fixes an overflow leading to infinite loop.

Bug: 10259
Change-Id: Ie76c5a810af927ba092f4067268bd789b3a7d7bf
Reviewed-on: https://code.wireshark.org/review/2856
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-04 21:53:08 +00:00
Pascal Quantin e398c8ed6b ETSI CAT: upgrade dissector to Release 12
Change-Id: Id1988551ca94a862195eb1de1de399e428132b21
Reviewed-on: https://code.wireshark.org/review/2855
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-07-04 19:38:41 +00:00
Michael Mann c7a6e6fa13 convert to proto_tree_add_subtree[_format]
Change-Id: I621f2e2cad9403449cb78f45302388f0c874d3bc
Reviewed-on: https://code.wireshark.org/review/2852
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-04 16:59:14 +00:00
Michael Mann 93517043e9 convert to proto_tree_add_subtree[_format]
Change-Id: Idd1b20ab32c0960ea52c6f3bc5346462c37c5684
Reviewed-on: https://code.wireshark.org/review/2853
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-04 16:46:14 +00:00
AndersBroman dd424c6225 Handle the case where the previous PDU has left an extra CRLF in the stream.RFC 2626 In the interest of robustness, servers SHOULD ignore any empty line(s) received where a Request-Line is expected. In other words, if the server is reading the protocol stream at the beginning of a message and receives a CRLF first, it should ignore the CRLF.
Change-Id: I97ba94f451463c8facd2c20bf6b7364f095119e7
Reviewed-on: https://code.wireshark.org/review/2808
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-04 14:00:50 +00:00
Evan Huus 7e970c32f4 wmemify some nfs functions, fixing much leaked memory
Bug: 10257
Change-Id: Ia36c03b2be727a37f91eca38af4faf48d1d65436
Reviewed-on: https://code.wireshark.org/review/2840
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-04 07:59:04 +00:00
Evan Huus 7464415049 Fix infinite loop in RTCP dissector
Bug: 10248
Change-Id: I630bc1ab2520c2861b817ba5813f5f7680e96056
Reviewed-on: https://code.wireshark.org/review/2820
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-04 02:21:48 +00:00
Sean O. Stalley bbb3e2f7af Add Bus ID to USB Address Column
USB Addresses are now in the format of: bus_id.device_address.endpoint
This makes it much easier to read traces that captured traffic on
more than one bus.

Change-Id: I264db2ceea712d94632d5d08d05d3af22a4a03fe
Reviewed-on: https://code.wireshark.org/review/2833
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-04 02:20:38 +00:00
Sean O. Stalley 212df87e7f (trivial) moved 'is request' comment in dissect_usb_common()
Change-Id: I759f64920284a35ea55bc68624570def51dfd72a
Reviewed-on: https://code.wireshark.org/review/2832
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-04 02:18:17 +00:00
Bill Meier 4e74546e76 packet-vnc.c: Fix a bug in displaying a set of FT_BOOLEAN bit fields (found by checkAPIs).
Change-Id: Ie5252d20db5826f3e48aba11da1bf85d00630db2
Reviewed-on: https://code.wireshark.org/review/2838
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-07-03 23:34:06 +00:00
Bill Meier 3e325b1448 packet-vnc.c: Restore tvb_get_string() --> tvb_get_string_enc() changes lost in gdf6bdcc
These changes were originally done in g971ffd6

Change-Id: I9de28ba7089f99e8058207f3b6d34de931decf76
Reviewed-on: https://code.wireshark.org/review/2835
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-07-03 22:26:27 +00:00
Bill Meier df6bdcc07d packet-vnc.c: Improve dissection
- Properly dissect multiple VNC PDUs in one (or more) TCP segment(s).
- Dissect additional message types ('Fence' and 'Enable Continuous Updates').
- Handle "num_rects" field = 0xFFFF (TightVNC).
- Add some more info as to sources of information about the VNC protocol.
- Add an XXX note as to the (incorrect) reassembly method being used.
- Add some notes as to possible ToDo's.

Change-Id: Id4942c50b3d1373bd2e72c0131614835dc39ba90
Reviewed-on: https://code.wireshark.org/review/2834
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-07-03 21:51:17 +00:00
Yan Burman 6ed95406e3 Fix type-o left over from cut-and-paste
Change-Id: I80b24cd8b75999454c1767bd3044ecc569f57d98
Signed-off-by: Yan Burman <yanb@mellanox.com>
Reviewed-on: https://code.wireshark.org/review/2805
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-03 12:22:59 +00:00
AndersBroman f0ed0e69fa Get rid of soft-deprecated API:s
Change-Id: Ieb4a3f07a7831c141ba8ce9c075e72091ef909be
Reviewed-on: https://code.wireshark.org/review/2798
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-03 09:04:33 +00:00
Evan Huus d70e56a733 Revert to 3ms if we don't have the handshake
Change-Id: I96b23677f3050e9c62edd49f26d50d8b4addcf58
Reviewed-on: https://code.wireshark.org/review/2784
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-03 07:32:11 +00:00
Pascal Quantin 2dbab6df18 GTP: add dissection of Extended End User Address
Bug: 10251
Change-Id: I174b5a2b3e2ec8ff2ead9f290b452ee468f6fe66
Reviewed-on: https://code.wireshark.org/review/2783
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-03 07:30:20 +00:00
Michael Mann 980893a15a NDPS dissector is the poster child for proto_tree_add_subtree[_format].
NDPS dissector is also the poster child for not being considered "that naughty" by checkAPIs because most of its proto_tree_add_text calls don't have printf-style arguments (which is what checkAPIs really keys off of)

Fixed both cases and removed about 370 proto_tree_add_text calls from the dissector.

Change-Id: I721678c39d4a0544e5e7212e622c0c2eebfd04f7
Reviewed-on: https://code.wireshark.org/review/2775
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-02 17:35:52 +00:00
Evan Huus a3bac6d0ce kafka: fully dissect offset request/response messages
Change-Id: I641a3dbece6f822144f6740dde6801b1be202db5
Reviewed-on: https://code.wireshark.org/review/2777
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-02 17:29:55 +00:00
Evan Huus 956c440786 RSVP checksum is not required if integrity object is present
Bug: 10219
Change-Id: I2da62ee184327b2bc42a264e1782db927460f5cf
Reviewed-on: https://code.wireshark.org/review/2773
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-02 06:31:58 +00:00
Jakub Zawadzki af7528999f Optimize sip dissector: avoid calling tvb_get_string_enc()
Fetch header value, only when we need to parse it.

Change-Id: I3c170ef8ab03985c8111a1b84ac1afc87bc8b5ca
Reviewed-on: https://code.wireshark.org/review/2767
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-02 06:07:44 +00:00
Malcolm Walters 2a306f4b05 Fix for Bug 10240.
Include padding length in calculation of correct attribute length

Change-Id: I569c6a9e1be39e3bb997e797a094b80cdcba6b07
Reviewed-on: https://code.wireshark.org/review/2747
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-07-01 20:49:30 +00:00
Jakub Zawadzki 852d5dac9c Remove executable bit, from not executable files.
Change-Id: I36b303b9c2bf4d6bb717261cdbf39ea16532fe06
Reviewed-on: https://code.wireshark.org/review/2757
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-07-01 20:37:09 +00:00
Graham Bloice bd79dae438 Remove debugging info from protocol tree for frame
Change-Id: Id7f02087e536964bfa6d01a3646c20035a3ab6cb
Reviewed-on: https://code.wireshark.org/review/2746
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Graham Bloice <graham.bloice@trihedral.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-01 12:44:31 +00:00
Evan Huus a452d16f2c Optimize epan_new/init_dissection
As Anders correctly pointed out in I7d8f84b2e, constantly resetting state will
turn init_dissection into a bit of a hot path. Especially as we will already
bear the overhead of switching files, we don't want to fall any further behind
than we have to.

This change includes three unrelated optimizations that reduce the cost of
init_dissection by about 40% as measured by callgrind:
 - only initialize ares/ADNS if that preference is enabled (this of course only
   applies if you specify -n to tshark or otherwise disable the preference)
 - use memcpy instead of a loop in sigcomp UDVM init
 - use memcpy instead of a loop in bootp dissector

The only remaining obvious hot spot in this path is reassembly_table_init since
it is called by so many dissectors. Suggestions (perhaps to get rid of the
GPtrArray) welcome.

Oh, and one other change to use g_strerror instead of strerror as insisted
upon by the API pre-commit hook.

Change-Id: I18a74f2b64b25498116079bd4e7fc2b335c7703a
Reviewed-on: https://code.wireshark.org/review/2738
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-01 04:21:14 +00:00
Jakub Zawadzki 659d0efc92 sip optimization: avoid calling tvb_get_guint8.
Use tvb_pbrk_guint8, tvb_find_guint8 when possible.

Change-Id: If8090d9b9b92146e9c216f139c056130d6b04e78
Reviewed-on: https://code.wireshark.org/review/2569
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-01 04:15:02 +00:00
Balint Reczey 4e9e043a6a Init session id to avoid warning using GCC 4.9
Change-Id: I2091f7eb86c64fd086f44a7cf15e7c5483f9b44c
Reviewed-on: https://code.wireshark.org/review/2716
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-01 02:05:41 +00:00
Evan Huus f1ff6635a8 Warn about unencrypted HTTP traffic over port 443
At the suggestion of Toralf Förster. This includes an expert info, as well as
making SSL a new-style dissector and rejecting traffic that looks like
unencrypted text.

Change-Id: Ib09ea0d97952330f092590ff3fc6488807cdbb81
Reviewed-on: https://code.wireshark.org/review/2693
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-30 21:10:11 +00:00
AndersBroman 073bf490aa From Johan Whahl:
Added dissection of the SIP Service-Route header.

Change-Id: Ic4523edb374ae03492af5853863dde501a0c30e0
Reviewed-on: https://code.wireshark.org/review/2721
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-30 14:38:46 +00:00
AndersBroman 9387979e91 Fix the display of AVP:s that are not fully dissected
fixes Bug #10237

Change-Id: I3c38bb4af4440f1e5087f21ef022bf2cd3a66002
Reviewed-on: https://code.wireshark.org/review/2720
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-30 14:14:14 +00:00
Michal Labedzki 3b15891115 Bluetooth: Add missing connection_handle
This initialize previously uninitialized variable (and nice fixing everything)

Change-Id: I943102510fc45735f40db7899884d2c0fe6ffb40
Reviewed-on: https://code.wireshark.org/review/2717
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-06-30 13:24:20 +00:00
Michael Mann dd63ae2b8c proto_tree_add_subtree[_format]
Change-Id: Id00f456479415adf0a219af6c9a2108d4b3642d0
Reviewed-on: https://code.wireshark.org/review/2702
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-29 21:18:04 +00:00
Pascal Quantin e39e44df24 GSM MAP: ensure that p2p_dir is always initialized before calling GSM SMS dissector
Bug: 10234
Change-Id: Ie340b849015febe46f91836440d44d4cfde005a4
Reviewed-on: https://code.wireshark.org/review/2695
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-29 17:56:35 +00:00
Gerald Combs f174370ddb [Automatic manuf, services and enterprise-numbers update for 2014-06-29]
Change-Id: Ife61b2e2c53f1faba34940035ac84a2b5ced3b71
Reviewed-on: https://code.wireshark.org/review/2696
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-06-29 15:04:56 +00:00
Michael Mann e8a8d62dc3 proto_tree_add_subtree[_format]
Change-Id: I7e016f10fcfdc0523bf2fe8c11295c0334f7c332
Reviewed-on: https://code.wireshark.org/review/2694
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-29 14:52:33 +00:00
Michael Mann fe4b7ee625 convert to proto_tree_add_subtree[_format]
Change-Id: If110de1e0555637264f86f1508858d569871a9c7
Reviewed-on: https://code.wireshark.org/review/2675
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-29 13:10:02 +00:00
David Ameiss e1a8c9599f Standardize the names of, and document, the taps and heuristic dissector tables made avaialble by these dissectors.
Change-Id: If3a143eb9546c9de63cd32b2347000b09e0e3c93
Reviewed-on: https://code.wireshark.org/review/2688
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-29 00:03:35 +00:00
Graham Bloice 5b9ceae3e5 Remove unused variables post commit 7bf6862ecf
Change-Id: Id583ab1742241deb9325dcb1dbba8a8cb3df3b90
Reviewed-on: https://code.wireshark.org/review/2691
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2014-06-28 17:41:10 +00:00
Michael Mann 7bf6862ecf convert to proto_tree_add_subtree[_format]
Change-Id: Ia7014003a3cff5181295172978d6c613c3b83b0b
Reviewed-on: https://code.wireshark.org/review/2676
Tested-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-28 12:05:43 +00:00
Guy Harris efc0a00520 We're not currently using dissect_rtcp_psfb_remb(); #if 0 it out.
Also, note that we need to determine how to handle Application Layer
Feedback messages based on the SDP setup traffic for the session; recent
changes disabled dissection of REMB Application Layer Feedback messages
in favor of MS-RTP Application Layer Feedback messages.  (This is why we
shouldn't remove dissect_rtcp_psfb_remb() unless REMB isn't being used
any more.)

Change-Id: Ib320bdf4a64263fdef29fc4ea2583eaae1cc4bee
Reviewed-on: https://code.wireshark.org/review/2684
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-27 07:41:21 +00:00
AndersBroman f0d291be28 In function 'dissect_rtcp_psfb':
packet-rtcp.c:1232: warning: unused parameter 'top_item'

Change-Id: I76522a9c6094473ce0eeeb7cc929a66e6da21909
Reviewed-on: https://code.wireshark.org/review/2683
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-27 04:24:49 +00:00
Britt McKinley f36db97506 RTCP: Add support for MS-RTP
Support for Profile Specific Extensions from MS-RTP
Support for RTCP Feedback Messages
Support for Application Layer Feedback Messages. 
MS-RTP: Real-time Transport Protocol (RTP) Extensions
http://msdn.microsoft.com/en-us/library/office/cc431492.aspx

Change-Id: I1f1e6e60b5f9d09b1dffd7e308426c0b67914441
Reviewed-on: https://code.wireshark.org/review/2586
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-27 03:52:11 +00:00
Evan Huus a87e292272 Tighten the dump-glossary test.
1. The only indication we get of an out-of-order value string is a message on
 STDERR, so check that and fail the test if STDERR wasn't empty.

 2. This exposes an out-of-order value string in packet-stun.c; fix it.

 3. This triggered the pre-commit hook on packet-stun.c, which noticed an API
 error (ENC_ASCII -> ENC_ASCII|ENC_NA); fix that too.

Change-Id: I36f87a2a87b40537119562f22a7e3012716ff239
Lesson: automated testing/tooling is both wonderful and scary.
Reviewed-on: https://code.wireshark.org/review/2682
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-27 03:47:32 +00:00
Martin Kaiser 1560b678ee show an expert info if a non-control urb contains a setup packet
Change-Id: I9339869defa47a862b6174d8821cdd8e6186f5c5
Reviewed-on: https://code.wireshark.org/review/2678
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-06-27 03:22:00 +00:00
Martin Kaiser 06ba7b4b3f a USB urb of an unknown transfer type does not contain a setup packet
Change-Id: Iac6a259a1081b907149c49023614a5053440e560
Reviewed-on: https://code.wireshark.org/review/2677
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-06-27 03:21:38 +00:00
Evan Huus c9b03b424f add a cast, the mask makes it safe (stupid compiler)
Change-Id: Iaf24c62295a93a1abd4fe3daf7e4c9587c3ef76b
Reviewed-on: https://code.wireshark.org/review/2670
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-26 15:38:11 +00:00
Yan Burman 1f724bc891 iSER: Add iSER dissector support
Bug: 10189
Change-Id: Ie99d99a1736b3c6446d5a00edf201a49dfcd4780
Reviewed-on: https://code.wireshark.org/review/2247
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-26 15:26:18 +00:00
Michael Mann a09de615b4 Fix Function call argument is an uninitialized value
Change-Id: I716e80e53477edd419164c61937800795a550869
Reviewed-on: https://code.wireshark.org/review/2651
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-26 14:07:31 +00:00
Pascal Quantin 7c1b5e9b7e Fix several compilation warnings
Followup of gf798709

Change-Id: I0afddfe2e9b9ac454377f2358a29b4ecdd011b91
Reviewed-on: https://code.wireshark.org/review/2668
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-26 13:08:59 +00:00
Michael Mann f7987091ba convert to proto_tree_add_subtree[_format]
Change-Id: I525ac2aae2bdbfd5f3a2f3b35f1bf10dde053f66
Reviewed-on: https://code.wireshark.org/review/2667
Tested-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-26 11:41:10 +00:00
Britt McKinley 732656c6f3 STUN: Add support of MS-ICE2 (Used by Lync)
Interactive Connectivity Establishment ICE Extensions 2.0
http://msdn.microsoft.com/en-us/library/office/cc431504.aspx

Change from review:
1) Change encoding for foundation to ASCII
2) Move case for MS_IMPLEMENTATION_VER.

Change-Id: Ic524a2fe811695478aba81af9cbb3dbd031bbce3
Reviewed-on: https://code.wireshark.org/review/2579
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-06-26 05:15:00 +00:00
Alexis La Goutte 06cf499eaf Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: Icec39c64d952ccc9739df95135ed79b3196a427a
Reviewed-on: https://code.wireshark.org/review/2652
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-06-26 02:43:12 +00:00
Pascal Quantin fd5b0777bb DLSw: better fix, as suggested by Evan
Change-Id: I82556c40cc4f0618e9e1c927beafa19ea4659683
Reviewed-on: https://code.wireshark.org/review/2650
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-25 18:53:56 +00:00
Pascal Quantin a8652ea529 DLSw: ett2 proto_item variable is an input parameter for dissect_dlsw_capex()
Regression introduced in g888f22d

Change-Id: I6ae451ef31b188540db4e4687c9fa492e8aa195e
Reviewed-on: https://code.wireshark.org/review/2649
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-25 17:58:31 +00:00
Peter Wu 4224e353f9 ssl-utils: add missing ett registration
Fixes the dissector bug warning:
"epan/proto.c:4657: failed assertion "idx >= 0 && idx < num_tree_types"

Add some comments to avoid future mistakes, add folding markers and fix
alignment of curves hf.

Change-Id: Ibcb57bfeb09a9777324682704a86f1ce260d345e
Reviewed-on: https://code.wireshark.org/review/2642
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-06-25 17:16:26 +00:00
Pascal Quantin 13a972bac4 DTPT: remove unused variables
Change-Id: I9c8e26af6e0d71012b010dee24a0d0d7220b49f7
Reviewed-on: https://code.wireshark.org/review/2648
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-25 17:05:05 +00:00
Michael Mann 888f22de16 convert to proto_tree_add_subtree[_format]
Change-Id: I2ea1892b5963cc5578cbdd2b03029ca8424f2267
Reviewed-on: https://code.wireshark.org/review/2640
Tested-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-25 16:35:14 +00:00
Guy Harris a11879e218 Get rid of an unused variable.
Change-Id: I8e436b7e4724c85943200087783d3cf7dd7c1535
Reviewed-on: https://code.wireshark.org/review/2639
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-25 02:38:24 +00:00
Michael Mann 29ecd114bf convert to proto_tree_add_subtree[_format]
Change-Id: I5f573dffabb8685a8e5a334ff2bfb24d9838daa6
Reviewed-on: https://code.wireshark.org/review/2601
Tested-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-24 23:42:13 +00:00
Evan Huus 83da877fff Add back initializers dropped in g9356d5c689fa
They were actually necessary.

Bug:10224
Change-Id: I9973bf7bab670d12e5b90bb2a57e99f9125d6a07
Reviewed-on: https://code.wireshark.org/review/2632
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-24 22:28:11 +00:00
Evan Huus 2a1e3d16aa Fix two bugs in kafka dissection
- Respect the length field when dissecting message sets
 - Don't "wrap around" in capture when doing request/response matches

Also convert one instance to proto_tree_add_subtree, as an experiment.

Change-Id: Id161687865afa7ca83e6943a643bc54582f65554
Reviewed-on: https://code.wireshark.org/review/2624
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-24 21:59:41 +00:00
Anish Bhatt b4d4218a18 OSPF Cleanup. Remove unnecessary TFS declarations
Change-Id: I9b4205f6d579ea9e707d83baf81f77393e3098b4
Signed-off-by: Anish Bhatt <anish@chelsio.com>
Reviewed-on: https://code.wireshark.org/review/2478
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-24 19:56:52 +00:00
Pascal Quantin eaf6bf3ec0 MBIM: add an option to force SMS PDU decoding format if MBIM_DEVICE_CAPS_INFO message was not captured
Change-Id: Iff78a00b463a7a33e1705c76ea49618af532f3aa
Reviewed-on: https://code.wireshark.org/review/2621
Tested-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-24 17:25:30 +00:00
Guy Harris 4f1d20abae proto_tree_add_uint() takes a value, not an encoding, as an argument.
Change-Id: Ie2c0523e32b54cd13506501d98215934a8d1304e
Reviewed-on: https://code.wireshark.org/review/2611
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-24 06:57:32 +00:00
Martin Kaiser e68638fe6b usb iso urbs on linux can't possibly contain a setup packet
see mon_bin_event() in the linux kernel where the setup_flag is set only
for control urbs

clean up various things related to this assertion:
remove type_2 parameter
show the iso descriptors in any case
calculate the end offset correctly, the end offset is the byte after the
iso data

Change-Id: Iebfbe6443c224a958a1697563aa8fb853d7aa8c2
Reviewed-on: https://code.wireshark.org/review/2541
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-06-24 03:11:56 +00:00
Joerg Mayer 0f76609237 Remove unneeded include <sys/stat.h>
Change-Id: I3be8f29d2b4fba2cb1d7ee2f29bdb27e42dd40a5
Reviewed-on: https://code.wireshark.org/review/2607
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-06-24 02:32:26 +00:00
Joerg Mayer 836feeb559 Remove unneeded sys/types.h
Change-Id: I03cd66cb9a2d01ea40308b338955756d08a36516
Reviewed-on: https://code.wireshark.org/review/2604
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-06-24 02:08:07 +00:00
Michael Mann 4976d67184 Restore correct tree assignment.
Change-Id: Id06bd486114a80fb899f8dc148d48928e99e775e
Reviewed-on: https://code.wireshark.org/review/2602
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-24 02:01:05 +00:00
Peter Wu e22d3c9b74 ssl: fix ClientKeyExchange, fix TLSv1.2 SKE for DH
Since DTLS and TLS do not differ in handling ClientKeyExchange and
ServerKeyExchange, its dissection got moved to ssl-utils. The code is
based on the SSL dissector, with header field names adjusted to the
DTLS ones (those got capitalized). Besides a version difference (for
signatures), the header field and function names, the DTLS and SSL code
are equal (this is verified).

This patch refactors the dissectors for DHE_RSA and ECDHE to make use of
a common function to dissect the signed_params field. All offset
tracking is also removed in favor of exception handling by the
proto_tree_add_item function. Occurrences of proto_tree_add_uint are
also replaced by proto_tree_add_item for simplicity.

After those changes, the SKE dissector for DH key exchanges is updated
to handle the mandatory signature field in TLSv1.2, using the newly
added function. (bug 9208)

Another bug occurred after the length check removal, pre-TLS and
OpenSSL's old DTLS implemenation do not include a vector length in
the CKE. This is now also fixed. (bug 10222)

Other minor changes: comments added/corrected, renamed
keyex_dh -> keyex_dhe (includes DHE_RSA and DHE_DSS).

Bug: 9208
Bug: 10222
Change-Id: I76e835d56a65c91facce46840d79c1c48ce8d5dd
Reviewed-on: https://code.wireshark.org/review/2542
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-23 23:31:40 +00:00
Joerg Mayer 8702a6b827 Remove some unneeded includes
Change-Id: I4327ead0451244daa0d876ae3a770cbbf80760c8
Reviewed-on: https://code.wireshark.org/review/2590
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-06-23 23:19:28 +00:00
Pascal Quantin dd7134d907 Initialize whole buffer in GPRS Mobility and Session Management dissector
Bug: 10216
Change-Id: I572a7a6ce0f816063f02397b667dd46c990cf73e
Reviewed-on: https://code.wireshark.org/review/2583
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-23 20:13:00 +00:00
Joerg Mayer 54cc0d86da Replace AF_ values by COMMON_AF_ values.
Remove no longer needed system includes

Change-Id: Id9ffffaa7da5185041db63fa7611d348a1cc4b68
Reviewed-on: https://code.wireshark.org/review/2577
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-06-23 16:48:26 +00:00
Evan Huus 02edc3369b Revert "Optimize sip_is_known_sip_header()"
This reverts commit c9a5fbeb1d.

Change-Id: Ic2e5d531f719ed1107ef7bb1de12175d4601fd6d
Reviewed-on: https://code.wireshark.org/review/2574
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-23 16:22:30 +00:00
Evan Huus 520190c77b Revert "Cheat and try to fix the generated file manually."
This reverts commit 9079e3ad1d.

Change-Id: I0430408e139ff8de068c970d02e36122552614fe
Reviewed-on: https://code.wireshark.org/review/2575
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-23 16:22:08 +00:00
AndersBroman 9079e3ad1d Cheat and try to fix the generated file manually.
Change-Id: Iabf1821aa0ef676ac4d1d7f2983460b2e671a98a
Reviewed-on: https://code.wireshark.org/review/2573
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-23 15:30:39 +00:00
Jakub Zawadzki c9a5fbeb1d Optimize sip_is_known_sip_header()
Profling SIP shows that gperf generated hashing code, is
3 times faster than using GHashTable & g_str_hash/_equal()

This result in about 1% improve of whole dissection (sip traffic with filter).

Change-Id: Id6bf64bacd872e2d1c30a1b6356db444b25ba326
Reviewed-on: https://code.wireshark.org/review/2116
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-23 14:42:20 +00:00
AndersBroman eaf6e551fe Fix a typo.
Change-Id: I6874a6f4a340c2b8e82d1ca5333cbeb31ff27f2d
Reviewed-on: https://code.wireshark.org/review/2570
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-23 08:24:49 +00:00
Jakub Zawadzki 6e0be0173b Add col_append_lstr(), speedup column generation for TCP.
When dissecting with columns TCP dissector spends
around 1/4 time in col_append_fstr(), add col_append_lstr()
and do formatting by ourselves.

Change-Id: If90bc26242761884b4991e8db0db62c8f9e32690
Reviewed-on: https://code.wireshark.org/review/2527
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-23 03:33:59 +00:00
Guy Harris ab6a45aec6 Get rid of set-but-not-used variable.
Change-Id: Ic0f2c79b4bd9fc737bf33ef64512f4142d74de6b
Reviewed-on: https://code.wireshark.org/review/2568
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-22 22:18:12 +00:00
Guy Harris 6896def6da Get rid of some unused variables.
Change-Id: I2a806af639e5f0519ba93b0048ec7a4624fa33fc
Reviewed-on: https://code.wireshark.org/review/2567
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-22 21:49:26 +00:00
Guy Harris 9c35a5d8fd Make dissect_lltd() a new-style dissector and register it as such.
Presumably that was the intent.

Change-Id: Icf8529a23a9a36e7f12e446d67f3867771b221d8
Reviewed-on: https://code.wireshark.org/review/2566
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-22 21:42:43 +00:00
Michael Mann 9356d5c689 convert to proto_tree_add_subtree[_format] for ASN.1 dissectors
Change-Id: I753ca95e2e1b38bad2c09955317e648c525e40ef
Reviewed-on: https://code.wireshark.org/review/2509
Tested-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-22 21:08:21 +00:00
Michael Mann 2c0214efff LLTD dissector
bug: 6071
Change-Id: If7b544a762df10ffc13aeaf8886cf74a1757c37c
Reviewed-on: https://code.wireshark.org/review/2512
Tested-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-22 21:07:43 +00:00
Michael Mann 188aa9a80e convert to proto_tree_add_subtree[_format]
Change-Id: Ib60ca75b7da8cfa21cfe2999c9b9448a02c332df
Reviewed-on: https://code.wireshark.org/review/2560
Tested-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-22 21:07:16 +00:00
Evan Huus 3fc441e7a5 Initialize whole buffer in GTP dissector
Bug:10216
Change-Id: Ib7de616d50937eb43b16daa4067ee0de9edc8ec7
Reviewed-on: https://code.wireshark.org/review/2562
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-22 20:54:28 +00:00
Evan Huus ce99d8a205 Fix leak in nbap init function
Change-Id: I9a70d4da936ad5fd847fc1ba0b29b7220030b977
Reviewed-on: https://code.wireshark.org/review/2558
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-22 20:23:52 +00:00
Evan Huus dfe7e71ec5 Fix a leak in the SCTP dissector
use wmem instead of glib

Change-Id: I326d2dd71b13ae45b4434c86fdacf9f3cec6c069
Reviewed-on: https://code.wireshark.org/review/2557
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-22 20:23:36 +00:00
Michal Labedzki 0a960872d7 Logcat: Set data-text-lines dissectors for log
Some binary logcat packets has more then one line, show them in
a convenient form.

Change-Id: I008aac6fe5589f2b10db51f7221853f9d79bbc7a
Reviewed-on: https://code.wireshark.org/review/2549
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-06-22 16:57:35 +00:00
Michal Labedzki 10fc6e2531 Bluetooth: A2DP: Fix fuzz failture
Fix invalid structure casting by using defaults values,
this also fix DecodeAs for A2DP.

Do the same for VDP.

Change-Id: I360787af648ed65205eb54732ab6d88f8532cf15
Reviewed-on: https://code.wireshark.org/review/2551
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-06-22 16:56:48 +00:00
Michal Labedzki 164af0050d Bluetooth: Complete sessions
Some interfaces support multiple Bluetooth adapters with events like
add/remove. We must support that to distinquish adapters streams
in case that new adapter has the same id that old one.

Next one is create session for "Connection Handle", so
next layer will now when it is connected and disconnected.
This is also used to distinguish streams.

Change-Id: I9e062c8e4cc9c033b75f1a596e8351a215169843
Reviewed-on: https://code.wireshark.org/review/2548
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-06-22 16:56:31 +00:00
Guy Harris 58bbfa5ee3 When setting entry_tree, set entry_item as well.
Hopefully, this will fix the warnings from the buildbot that entry_item
was used without being set.

Change-Id: Ibfd921bfbbad68cd8eafd1e3ad3d178cfca03d6e
Reviewed-on: https://code.wireshark.org/review/2547
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-22 16:42:05 +00:00
Michael Mann f5e2b4293d convert to proto_tree_add_subtree[_format]
Change-Id: I358bfaa4e5d40cd01b766f614f8bd0dbaf611dd0
Reviewed-on: https://code.wireshark.org/review/2508
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-22 14:34:17 +00:00
Martin Kaiser 08bd0128ed minor cleanups
Change-Id: Ieaa0fa5cdbe8dc8f50cf5b9ee432c786a8f9fc9a
Reviewed-on: https://code.wireshark.org/review/2540
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-06-22 04:11:04 +00:00
Martin Kaiser 4c740dc8f5 the tree that we use in the iso transfer function in is the urb_tree
Change-Id: Ia32c2f24df9392d1102fa1121ac93b1071bae7ca
Reviewed-on: https://code.wireshark.org/review/2538
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-06-22 03:53:00 +00:00
Martin Kaiser 6b90679284 no need to check the parent tree when we create the iso descriptor tree
Change-Id: I6cbc5047b8d58ecbe41bf5392d31dc0adc81d5d5
Reviewed-on: https://code.wireshark.org/review/2537
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-06-22 03:52:35 +00:00
Martin Kaiser 2b6ce23271 rename the ti variable
Change-Id: Iec3bdfcb3cb14e97045789aec1e11288357d379d
Reviewed-on: https://code.wireshark.org/review/2536
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-06-22 03:52:13 +00:00
Martin Kaiser 2aae7caa5d create the iso descriptor tree's title in a simpler way
Change-Id: I4e60295208c2ac35a452f5fb3dffd090cc151473
Reviewed-on: https://code.wireshark.org/review/2535
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-06-22 03:51:53 +00:00
Martin Kaiser dfa7337b3a create a new function that dissects the usb linux iso transfer
(just copied the existing code)

Change-Id: Ia6dd9be9b39c3c16408e22181225c18d56ac6016
Reviewed-on: https://code.wireshark.org/review/2534
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-06-22 03:51:26 +00:00
Anish Bhatt e02c66f157 Check constraints for OSPFv2 LSAs:
1 Router LSA: >= 24 bytes (>= 0 link descriptor(s) required)
2 Network LSA: >= 28 bytes (>= 1 router-ID(s) required)
3 Summary LSA: >= 28 bytes (>= 1 TOS metric block(s) required)
4 Summary LSA: >= 28 bytes (>= 1 TOS metric block(s) required)
5 AS-External LSA: >= 36 bytes (>= 1 TOS forwarding block(s) required)
7 NSSA LSA: >= 36 bytes (>= 1 TOS forwarding block(s) required)
9 Opaque Link LSA: >= 20 bytes
10 Opaque Area LSA: >= 20 bytes
11 Opaque AS LSA: >= 20 bytes

as described in Bug 6302

for all other types including unknown, check for minimum length of 20

Change-Id: I93451d99a93213b4ded8157cecd54b0a6221d351
Signed-off-by: Anish Bhatt <anish@chelsio.com>
Reviewed-on: https://code.wireshark.org/review/2292
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-21 18:17:08 +00:00
Evan Huus 37b903d7ab batch of tvb-length conversions
Change-Id: I76ca4d075756e3ac691070e0c05344a410ea2498
Reviewed-on: https://code.wireshark.org/review/2507
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-21 04:01:52 +00:00
Pascal Quantin 6808afd017 TCP: update the list of options and put Kind and Length items in the right subtree
Bug: 10211
Change-Id: Ide37f2a2b33f0d6d7cdff897eed02a8c1ea24f7d
Reviewed-on: https://code.wireshark.org/review/2488
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-06-20 18:51:27 +00:00
Stig Bjørlykke 2ab2921c7d Revert part of svn revision 52045 (git b38ee917)
This fix does change the format printed for values using bitmasks
(because the bit values are printed first) and is not always wanted
in this dissectors (because of readability).

We should have a better way of doing what I want in this dissectors,
so I'll have a look at this later.

Change-Id: I2477aa6b1d0c42a7ad5848bba3cb74dce3bba1f0
Reviewed-on: https://code.wireshark.org/review/2485
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2014-06-20 17:04:49 +00:00
Guy Harris ce3d2ff3de Rename dissector_add_handle() to dissector_add_for_decode_as().
Hopefully that name makes it clear what the routiner's purpose is, and
will encourage people to use it rather than using dissector_add_uint()
with a bogus integer value.

Change-Id: Ic5be456d0ad40b176aab01712ab7b13aed5de2a8
Reviewed-on: https://code.wireshark.org/review/2483
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-20 16:43:56 +00:00
Martin Kaiser 4df6b51784 remove duplicate offset=0
Change-Id: I6653b733dfd2c587909371e50fd0c2efc4649dcd
Reviewed-on: https://code.wireshark.org/review/2482
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-06-20 16:22:58 +00:00
Martin Kaiser ffccb9c069 no need for if(tree)
Change-Id: I5762fb30f57d0f9bc3e5fc786577ed1cc49b64d7
Reviewed-on: https://code.wireshark.org/review/2481
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-06-20 16:22:52 +00:00
Evan Huus ee2885f9e8 add cast to fix buildbot
Change-Id: I945830a6dd9c34adf9802fa9e9948e2e90d8aba8
Reviewed-on: https://code.wireshark.org/review/2476
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-20 06:14:16 +00:00
Evan Huus 80c070fb51 Don't hide tcp option kind/len fields
Hidden fields are deprecated, and we were hiding them inconsistently anyways.

Bug:10211
Change-Id: Iaf1576ae7bc04c0c0bd896c096b117f1b8af2e9e
Reviewed-on: https://code.wireshark.org/review/2474
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-20 06:07:41 +00:00
Evan Huus 980f5f6711 batch of tvb-length conversions
Change-Id: I5e40df8af6841e3dad71c41d7e43c7971611b15f
Reviewed-on: https://code.wireshark.org/review/2473
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-20 05:33:04 +00:00
Michael Mann 4560881070 Cleanup display filters reported by checkfiltername.pl
Also ensured some files have their correct names at the top so they are more easily grepped

Change-Id: Ib0f5ddf14eb1616a93dee496107dc0eb09048825
Reviewed-on: https://code.wireshark.org/review/2452
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-20 04:09:31 +00:00
Bill Meier 728e5a1ab3 packet-vnc.c: Improve re-assembly.
Essentially:

  When more data is needed to continue dissecting a PDU, use
  DESEGMENT_ONE_MORE_SEGMENT instead of repeatedly requesting
  additional bytes (for one or a few more fields).

  - Improves the efficiency of the dissection;

  - Prevents 'one-pass' tshark dissection from redissecting
    the PDU repeatedly many, many times with each time dissecting
    the PDU with one or a few more additional fields.
    This generated *lots* of (repeated) output since a reassembled
    VNC PDU can contain many fields (each of short length).

  - (A comment in packet-tcp.c states, in effect, that repeatedly
     requesting a specific amount of more bytes to dissect a PDU
     will "break reassembly" although I note that the reassembly did
     seem to work (in-efficiently)).

Note: Although this patch improves the handling of reassembly, the
      dissector has significant issues. For example. see Bug #5366.

I expect this fixes the Bug #10134 issue: "Cannot allocate memory";

Before the fix, 'tshark -nVxr' for the input file generated trees with
multiple hundreds of thousands of entries and generated reassembled
PDUs consisting of many, many small fragments.

Change-Id: I970037c346fbaa4bffa5726fd5bee5f69396eabf
Reviewed-on: https://code.wireshark.org/review/2471
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-06-20 02:58:11 +00:00
Evan Huus 0c3e1a243b Add casting and license info to fix buildbots
Change-Id: Iea53b17480d758c16822d80778fa4f186a188a91
Reviewed-on: https://code.wireshark.org/review/2470
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-19 23:55:47 +00:00
Dario Lombardo 84777a682d Removed SVN Id tag
Change-Id: I41931121ab8854e4737aeb565b4f51be87426fa9
Reviewed-on: https://code.wireshark.org/review/2375
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-19 22:23:05 +00:00
Michael Mann e9bce9dd7e Add dissectors to match the groups of display filters they represent instead of all coming from proto_zbee_nwk.
Change-Id: I8049e84af4670b3dec436d2bab143d59557c07aa
Reviewed-on: https://code.wireshark.org/review/2450
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-19 22:21:37 +00:00