Include a column to describe what's intended. If that's *not* what's
intended, fix the comment and the twisty little maze of #defines.
Change-Id: Ic5d120c401d8aba23a19e9d042b1460621b80e0b
Reviewed-on: https://code.wireshark.org/review/7815
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Instead of a twisty little maze of #if, #ifdefs, and #elifs, all
different, define HAVE_BUFFER_SIZE upfront iff we can set the buffer
size - i.e., if this is Win32, and thus we're using WinPcap, or if we
have pcap_create() and thus pcap_set_buffer_size() - and use that to
govern whether to have a buffer size setting or not.
Always put the buffer size setting in the right vertical box. If that
doesn't work well for some configurations of available interface knobs,
feel free to change the checks, but please make it less opaque what's
going on (include a comment if necessary).
Change-Id: I384c601982b470ae08de271431eac06d6c925332
Reviewed-on: https://code.wireshark.org/review/7814
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This squelches some compiler warnings, with the addition of
G_GNUC_PRINTF() calls.
Change-Id: I76f7515889727dc7fad27ac90ca96750384a46f3
Reviewed-on: https://code.wireshark.org/review/7812
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Change-Id: If3e89f8e46edd4eef82037b6b348fd70a9a3033d
Reviewed-on: https://code.wireshark.org/review/7811
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
The calls were just passing in a tvb_get function anyway.
Change-Id: If69b2d41997f748dc5d12650e2553d5bc69930ce
Reviewed-on: https://code.wireshark.org/review/7810
Reviewed-by: Michael Mann <mmann78@netscape.net>
If HAVE_PCAP_REMOTE is not set, this code is not defined and therefore will not be
compiled correctly.
Change-Id: Ie08a6f99598d46cfa38e2448ea979a8a9aa7c7fc
Reviewed-on: https://code.wireshark.org/review/7803
Reviewed-by: Roland Knall <rknall@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Add preference to enable dissect IEC/ISO cause coding as ITU-T (Q.850)
Change-Id: Id61f0785b8355f1aed03c4dea70657d661af3f11
Reviewed-on: https://code.wireshark.org/review/7806
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Broken since 4ac2441d7c ("Coalesce "-G
fields2" and "-G fields3" into "-G fields").
This patch fixes Python3 compatibility, fixes handling of the changed
output and option and prints the faulting line on assertion error. It
also updates two dissectors which had tabs in their description,
breaking the output.
Tested with Python 2.5.6, 2.6.6, 2.7.9, 3.2.6, 3.4.3.
Change-Id: Ifcd0d0eb092b357eca357cd53f2e1348ebf8885c
Reviewed-on: https://code.wireshark.org/review/7791
Reviewed-by: Gilbert Ramirez <gram@alumni.rice.edu>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Previously, the http2 heuristics dissector sets a conversation dissector
which overrides the SSL dissector, breaking SSL decryption before http2.
This patch fixes that by checking for an active http2 session in the
http2 heuristics dissector.
Change-Id: Ibacbcde3e29bbb746ad2e394f1c10ca571b07bf5
Reviewed-on: https://code.wireshark.org/review/7782
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
1. Remove proto_tree_add_text (the reason I started the update)
2. Add expert info (mostly related to proto_tree_add_text, but since I was in the neighborhood...)
3. Replace "big functions macros" with "small macro" + real function (for big .o size savings)
4. Remove DebugLog macro (intent seems to duplicate basic functionality of a step-through debugger)
5. Replace HF_EMPTY (and comparible macros) with -1
6. Move header handler array to remove need for many forward declarations.
Change-Id: Ic5467289aae7d54e78c1fd65f93358387d6139aa
Reviewed-on: https://code.wireshark.org/review/7799
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Ensure that a reference to past bytes refers to bytes that actually exist.
Bug: 10978
Change-Id: If95d785ee15243c88edcd7115b5ff25fbaa08e6c
Reviewed-on: https://code.wireshark.org/review/7783
Petri-Dish: Evan Huus <eapache@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Evan Huus <eapache@gmail.com>
When GRNTI does not exist in Packet Measurement Report R5 additions, too many lines are skipped
Fixes an ASAN failure reported by Alexis
Change-Id: I400bc4d9732f1d8e3c6fb8b72bf08a70a636d78c
Reviewed-on: https://code.wireshark.org/review/7772
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
We were doing it similarly, but not the same, in several places; make a
common routine for it.
Have that code check to make sure the DLT_ value in question is actually
supported by the device; if not, pick the first supported DLT_ value, if
any; this keeps it from, for example, picking a bad DLT_ value if your
defaults were set based on monitor mode being on but monitor mode
actually being off, or vice versa.
Change-Id: I1722bfeaf60429bc5c6f665fdea3d466052b13bd
Reviewed-on: https://code.wireshark.org/review/7795
Reviewed-by: Guy Harris <guy@alum.mit.edu>
While improving python 3 compatibility, fix whitespaces and remove the
useless try/except block as these modules are part of core.
Tested with Python 2.5.6, 2.6.6, 2.7.9, 3.2.6, 3.4.3 (with "make"
replaced by "true" and by comparing stdout).
Change-Id: I9c585da89aef76f01672c8f7320ac4a13c6cc7d7
Reviewed-on: https://code.wireshark.org/review/7790
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
Change-Id: Ibe5fce79a195b27e5d8e84c86613298083dabef2
Reviewed-on: https://code.wireshark.org/review/7780
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Change-Id: Ice87c69902a09874d5bdfa996523db9a9af50706
Reviewed-on: https://code.wireshark.org/review/7785
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Change-Id: Iabd6de1e3ca7e7de156847fd33d38a25ac14f1c2
Reviewed-on: https://code.wireshark.org/review/7784
Reviewed-by: Michael Mann <mmann78@netscape.net>
Change-Id: Ibca63a9119b9c45e6a24fe3dc14dc7ed86c3576a
Reviewed-on: https://code.wireshark.org/review/7774
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
It's only used to update the remote interface list, and never updates
anything else (it sets iftype_id to CAPTURE_IFREMOTE and never changes
it, so all tests for whether iftype_id is == or >= CAPTURE_IFREMOTE
succeed); remove the code that would be executed if, somehow, iftype_id
got stomped on, and rename it to update_remote_interface_list().
Change-Id: I3bd80fb19bb14ef5bdf2c1a77a10f1f32bb62aba
Reviewed-on: https://code.wireshark.org/review/7773
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Updated the sercos discriptor for CP0. Some additional flags were added in
AT0 and MDT0 during specification improvement.
Change-ID: I784b1686b6c4adad154fe0747202f299e5c8095b
Reviewed-on: https://code.wireshark.org/review/7061
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Without a fence col_add_fstr will overwrite the whole column on each
message.
Instead of adding a fence and adding the message info use
col_append_sep_str which also supports a separator out of the box.
e.g. "Connect Command, Publish Message, Disconnect Req"
Change-Id: I346d9b659a044143cd31f08081ad145b9186307c
Signed-off-by: Alexander Stein <alexanders83@web.de>
Reviewed-on: https://code.wireshark.org/review/7771
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
There is a IANA reserved port number for MQTT: 1883
Change-Id: I9bc3c83b9d7eda291728fe7311f4b7a817d3a833
Signed-off-by: Alexander Stein <alexanders83@web.de>
Reviewed-on: https://code.wireshark.org/review/7770
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
With this it's possible to fetch the body from a Lua script again.
Change-Id: Ie1502d47ca3c137aedb4197c6a345b3eb340735a
Reviewed-on: https://code.wireshark.org/review/7769
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Stig Bjørlykke <stig@bjorlykke.org>
Add some parentheses to prevent warning:
"logical not is only applied to the left hand side of comparison"
Change-Id: I8f11f93e12d24a1ea09032cf0198042fe9a87068
Reviewed-on: https://code.wireshark.org/review/7768
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Change-Id: I4ec48067e9ca2cbe88e1cf2e6c9dc1e382379221
Reviewed-on: https://code.wireshark.org/review/7767
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
The 1.99.4 is still in progress.
This reverts commit 260c84729c.
Change-Id: I8c24d301c103dd45e2ac2cdb4cda34b918ac5a37
Reviewed-on: https://code.wireshark.org/review/7758
Reviewed-by: Gerald Combs <gerald@wireshark.org>
works as proto_tree_add_item(), but also returns the value of (u)ints
of 8,16,24 and 32 bits length in a 32 bit variable. It's based on Hadriels
previous work.
Change-Id: If3b4b8588b63251f1ee9b954a202acde7c02ce86
Reviewed-on: https://code.wireshark.org/review/7230
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This makes it much easier for other subdissectors (and plugins) to associate themselves with CAN.
Change-Id: I49dd832af51651d0c91f9850c100e544d178b8c4
Reviewed-on: https://code.wireshark.org/review/7734
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
That matches what it is in other structures, and eliminates a compiler
warning.
While we're at it, remove an empty if statement revealed by that change.
Change-Id: I5e8c8f92fdb3567e75800c729443737032a1bcc7
Reviewed-on: https://code.wireshark.org/review/7752
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This "encourages" (forces) dissectors to use the bitmask field of the header_field_info structure to get "bitmask formatting" of a field.
other_decode_bitfield_value should be treated the same (eventually eliminated), but there are still replacements to be made in the dissectors.
Change-Id: I8a0d829c3fef2d5e5a588667a259e231bca559e6
Reviewed-on: https://code.wireshark.org/review/7736
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
We have to find the closing parenthesis before overwriting the opening
parenthesis, otherwise the end of the string, from which strrchr()
searches, is at the point where the opening parenthesis was.
Fix incorrect arithmetic (-1 + -1 + 1 = -1, not 1).
Change-Id: Ida47dd9670b36269eef28368aa845301a7185c3f
Reviewed-on: https://code.wireshark.org/review/7747
Reviewed-by: Guy Harris <guy@alum.mit.edu>
capture_dev_user_descr_find() and capture_dev_user_cfilter_find() return
g_malloc()ated strings; we don't need to g_strdup() them to get a
g_malloc()ated string, and we *do* need to free them if we aren't going
to use them any more.
Document that while we're at it, and give more details for the functions
returning integer user-specified interface parameters as well.
Change-Id: Icf98a48992b1c4168ead54bdc4cc2847da89d665
Reviewed-on: https://code.wireshark.org/review/7745
Reviewed-by: Guy Harris <guy@alum.mit.edu>