Commit Graph

52928 Commits

Author SHA1 Message Date
Peter Wu e6d6183e1b ip: display calculated checksum
This patch adds a new "ip.checksum_calculated" field that can be used
for display in a column.

Based on d7c4bde279 ("tcp: display
calculated checksum").

Change-Id: Ide5eb6640d51ded88b1df309092a0a3aaf482b03
Reviewed-on: https://code.wireshark.org/review/1676
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-05-19 02:21:40 +00:00
Peter Wu 12d9fb7df0 udp: display calculated checksum
This patch adds a new "udp.checksum_calculated" field that can be used
for display in a column or tshark.

Based on d7c4bde279 ("tcp: display
calculated checksum").

Change-Id: Iefcfd8395adeff7a3ac58a1bfff1a3c97976aa56
Reviewed-on: https://code.wireshark.org/review/1675
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-05-19 02:21:36 +00:00
Michael Mann e5353bf119 Use g_ alloced memory (instead of emem) when printing fields. emem shouldn't be used for GUI functions anyway.
emem was exposed because of its memory limits trying to output PDML for a very large byte field in a capture file.

When converting from proto_construct_match_selected_string to fvalue_to_string_repr remember proto_construct_match_selected_string includes fieldname + value, not just value

bug:10081
Change-Id: I4fc6ea7fd1f63cff410207c8b30562771af40ada
Reviewed-on: https://code.wireshark.org/review/1578
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-05-19 01:46:55 +00:00
Alexis La Goutte f75f47b7ae MySQL: fix soft-deprecated APIs
tvb_length -> tvb_reported_length
tvb_get_string -> tvb_get_string_enc

Change-Id: I98d46b5603e0d840d17968f6c81b33d9bdbb9dea
Reviewed-on: https://code.wireshark.org/review/1687
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-05-19 00:22:50 +00:00
Alexis La Goutte ca6441eede MySQL: add new (extended) Capability flags
http://dev.mysql.com/doc/internals/en/capability-flags.html

Change-Id: I0aef20fef5346bd24d610444fdbc89cbe720c3c4
Reviewed-on: https://code.wireshark.org/review/1686
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-05-19 00:21:02 +00:00
Alexis La Goutte faeb050b44 Mysql : add new flag for server status flags
http://dev.mysql.com/doc/internals/en/status-flags.html

Change-Id: Ic08e2aa449eeb6963c5ebf7e65b5bf39e9da76d9
Reviewed-on: https://code.wireshark.org/review/1685
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-05-19 00:18:04 +00:00
Alexis La Goutte fe053839f0 Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: I9bf53014d90857b7d71efbb09b5ceb708b3df6ca
Reviewed-on: https://code.wireshark.org/review/1683
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-05-18 20:28:37 +00:00
AndersBroman 5235dc6ca0 Only call ep_tcp_port_to_display/ep_udp_port_to_display once for sorce and
destination ports.

Change-Id: I490a716b7991d0d7dfcaecd722a267c77af2e776
Reviewed-on: https://code.wireshark.org/review/1682
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-05-18 20:13:52 +00:00
Joerg Mayer 5701cead4b - Modify Cisco Compatible Extentions MFP dissection
- Add Cisco Compatible Extensions DTPC dissection

Change-Id: I3dc7075865c0041ee964d9260339028d0adf17e0
Reviewed-on: https://code.wireshark.org/review/1684
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-05-18 19:37:42 +00:00
Gerald Combs 9705c9bc60 [Automatic manuf, services and enterprise-numbers update for 2014-05-18]
Change-Id: Ia3d139ee0f02588ccc8aa1c83768ae51bd832d15
Reviewed-on: https://code.wireshark.org/review/1679
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-05-18 16:18:50 +00:00
Guy Harris 2d0507e33a Use gsize rather than int, to avoid some complaints about shortening.
Change-Id: Ic673525a05cd106677226a4063af825d0f22c97c
Reviewed-on: https://code.wireshark.org/review/1677
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-05-17 22:29:27 +00:00
Jakub Zawadzki ea95c837fe Introduce col_add_lstr(), use it instead of slower col_add_fstr.
We have callgrind benchmarks which shows that col_add_fstr() takes
5% of Ir count cause of formatting done in g_vsnprintf().

New col_add_lstr() can be used in few dissectors without much ugliness,
and it should be a little faster.

Change-Id: Ifddd951063dfd3a27c2a7da4dafce9b242c0472c
Reviewed-on: https://code.wireshark.org/review/1629
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-17 21:33:26 +00:00
Peter Wu 24082972a3 lua: fix buffer underrun
A line containing just "\n" will cause a buffer underrun.

Test:
tshark -r test/captures/sipmsg.log -X lua_script:test/lua/acme_file.lua -w /dev/null

Caught by ASAN.

Change-Id: Idf38f1af2b211101b3929ee3fbd83c54c99c1e21
Reviewed-on: https://code.wireshark.org/review/1673
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-05-17 17:39:51 +00:00
Peter Wu cea149aa89 wiretap: fix regression, missing initialization
wtap_dump_open() allocates an empty wtap_dumper struct such that
interface_data is not initialized. Fix this by adding the member back.

Regression from 3aee917058 ("wiretap:
remove unused code, drop number_of_interfaces").

Bug: 10113
Change-Id: Ia6259bf50b25d5e7aa837b0fb7396b07d5d3c72c
Reviewed-on: https://code.wireshark.org/review/1672
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-05-17 17:22:37 +00:00
Peter Wu 3aee917058 wiretap: remove unused code, drop number_of_interfaces
While investigating an ASAN issue (fixed in
commit dcdd076ab0), I got greatly confused
by three different types having the same "interface_data" field name:

 * pcapng_t *pn stores an array of interface_data_t objects.
 * wtap *wth stores an array of wtapng_if_descr_t objects.
 * pcapng_dump_t should store an array of interface_data_t objects.

pcapng_dump_t and friends are unused since
commit c7f1a431d2, so drop it.

To fix the confusion, rename the interface_data_t type to
interface_info_t type and use the local variable "iface_info"
everywhere. Rename interface_data of pcapng_t to "interfaces" and
add a comment what this exactly means (interfaces listed in the capture
file).

Drop the number_of_interfaces field for interfaces as the array
length is already available from GArray. Now interface_data is always
initialized for wth (which also gets copied to idb).

s/int/guint/g and replace cast at some places.

There are no regressions for the in-tree test suite.

Change-Id: I2d5985c9f1e43f8230dbb4a73bd1e243c4858170
Reviewed-on: https://code.wireshark.org/review/1656
Reviewed-by: Evan Huus <eapache@gmail.com>
Tested-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-05-17 12:41:50 +00:00
Evan Huus 9fe221a42f Fix newly optimized strdup_vprintf.
As Jakub pointed out, our +1/-1 logic for null terminators wasn't quite right.
Also be sure to re-copy the va_list parameter if we need to re-use it, as
otherwise things break oddly.

Change-Id: Ibeaa95af602f565791e9378a6cfce434f13025eb
Reviewed-on: https://code.wireshark.org/review/1670
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-05-17 12:30:03 +00:00
Jakub Zawadzki 72a6a8cb5c Fixes after wmem_strdup_vprintf() optimization
- g_vsnprintf()[1] buffer size can includes space for terminating NUL,
  this simplifies code, and fix problems with string truncation

- g_vsnprintf() returns number of bytes without terminating NUL, so we
  need to do + 1

- second g_vsnprintf() call use already consumed 'ap2' va_arg, which
  makes wmem_strdup_vprintf() doesn't work/ crash for FORMATTED string length > 80

[1] https://developer.gnome.org/glib/stable/glib-String-Utility-Functions.html#g-vsnprintf

Change-Id: I0ebb7f452e3e89c9b55f8ac889166f02e8a7c982
Reviewed-on: https://code.wireshark.org/review/1667
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-05-17 12:20:50 +00:00
Evan Huus 25ba4a2a44 Guard closing capture window with ifdef.
That variable is only defined if we HAVE_LIBPCAP. Should fix OSX10.5 buildbot.

Change-Id: I0bafc48955ef4af3c0b8d9d7a35b1e8b27577d31
Reviewed-on: https://code.wireshark.org/review/1669
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-05-17 12:07:45 +00:00
Evan Huus 8129c2d13d Add casts to fix OSX 10.6 buildbot
Change-Id: Ice852356201ba222290d2705d9f5526ce242b031
Reviewed-on: https://code.wireshark.org/review/1668
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-05-17 12:04:29 +00:00
Chun-Yeow Yeoh 89a72f328a Add SAE authentication algorithm in 802.11
Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>

Change-Id: If3500dda55aed45bbecd0261191ce1ec6cfbdbca
Reviewed-on: https://code.wireshark.org/review/1661
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Yeoh Chun-Yeow <yeohchunyeow@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-17 07:21:44 +00:00
AndersBroman a42df4818f Use a pre allocated buffer in wmem_strdup_vprintf() reduces the function
cost by more than half.

Change-Id: I6ad2ae407325d2091ffb60919cb3ed74f78f39fa
Reviewed-on: https://code.wireshark.org/review/1662
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-17 07:21:07 +00:00
Martin Mathieson ba3c0d7c4d Show EMM and ESM causes in the Info column
Change-Id: I2e3be18e997d6be0b250fbd8e664779d0d2a8228
Reviewed-on: https://code.wireshark.org/review/1666
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-05-16 22:17:45 +00:00
Gerald Combs 0a249087c3 Build with GTK+ 2.24.23.
Change-Id: Ic5c385c0fcef4d40a8cb9e7a271d14eb80905460
Reviewed-on: https://code.wireshark.org/review/1665
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Tested-by: Gerald Combs <gerald@wireshark.org>
2014-05-16 16:25:38 +00:00
Alexis La Goutte 33750ab4b4 IP Protocol : Update description of IP Protocol
From Boaz

In IANA the two IPv4 protocols are defined:

35	IDPR	Inter-Domain Policy Routing Protocol
45	IDRP	Inter-Domain Routing Protocol
http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml

However, in Wireshark, they are named:

{ IP_PROTO_IDPR,    "Interdomain routing" },    /* 35 IDPR Inter-Domain Policy Routing Protocol [Martha_Steenstrup] */
{ IP_PROTO_IDRP,    "IDRP" },                   /* 45 IDRP Inter-Domain Routing Protocol [Sue_Hares] */

Which is somewhat confusing.

I think IDPR should be named "Inter-Domain Policy Routing".
And IDRP should be named "Inter-Domain Routing Protocol".

Change-Id: I69b34ea8d9b3169fd779357710edb44cfb5cb2b3
Reviewed-on: https://code.wireshark.org/review/1664
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-16 14:18:02 +00:00
Alexis La Goutte c3513b4f35 Add modelines info
Change-Id: Ia37dd9c79e70b839063e131c532ae2b724293600
Reviewed-on: https://code.wireshark.org/review/1663
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-16 14:16:59 +00:00
Alexis La Goutte c24ede3450 DNS: fix soft-deprecated APIs
tvb_length -> tvb_reported_length
tvb_get_string -> tvb_get_string_enc

Change-Id: Ia511f0e9d3f8ae3d7a1a965431016336ec47188d
Reviewed-on: https://code.wireshark.org/review/1660
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-16 06:58:53 +00:00
Alexis La Goutte 6989febd47 DNS: Use acronyms from RFC7218 for DANE / TLSA
http://tools.ietf.org/html/rfc7218

Change-Id: Icd276c6cb4680aa53b081c239cb8eb2d8fc109c6
Reviewed-on: https://code.wireshark.org/review/1659
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-16 06:57:09 +00:00
Michael Mann 59eb8cf404 Make (almost) all fields filterable and use "normal" dissection functions to do it.
Removed the additional "parseFields" layer as it was unnecessary and IMO ends up creating more work for a developer if they want to add additional filterable fields.  That layer also hid the (large) number of unfilterable fields that were in the dissector that would normally be caught by counting the number of proto_tree_add_text function calls.

Change-Id: I6f9607938c2386de40bdd3dae652614f07dda31e
Reviewed-on: https://code.wireshark.org/review/1653
Reviewed-by: Peter Ross <peter.ross@rmit.edu.au>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-05-16 05:34:05 +00:00
Evan Huus aa922b0624 Try to fix stack-buffer-overflow caught by ASAN
Use wmem_array_append rather than wmem_array_append_one to make sure the pointer
types match up. _append_one automatically takes the address of its argument,
which causes problems if that argument is already a pointer.

Thanks to Alexis for catching this.

Change-Id: Ie702bb2c776f9fcf31bd64073c756edd75d888e8
Reviewed-on: https://code.wireshark.org/review/1657
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-05-16 02:38:49 +00:00
Alexis La Goutte 7ba7612da9 STUN dissector: fix (soft) warning about tvb_length
Change-Id: I2b6c4e44d406585204b805ae3efa53c31e7d2574
Reviewed-on: https://code.wireshark.org/review/1655
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-15 20:19:37 +00:00
Alexis La Goutte 37fd797a01 STUN dissector: fix hf name (stun_... => hf_stun_....)
Change-Id: I0a4a12cc18a03824827a3bb57b7e58a8f1bd6ba8
Reviewed-on: https://code.wireshark.org/review/1654
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-15 20:18:38 +00:00
Masayuki Takemura 773c02da8f diameter_3gpp: Dissect Feature-List flags in Gx message
With this patch, wireshark dissects the Feature-List flags field in Gx message
and displays the name and value of each of Feature bit.

Change-Id: I18af8a133ae7db4da5a126a81521c474d1553719
Reference: 3GPP TS 29.212 V11.7.0, Section 5.4.1.
Reviewed-on: https://code.wireshark.org/review/1652
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-15 14:32:45 +00:00
ruengeler 53eeff6c91 Do not leave the Options Interfaces Dialog open, when the Main Window is closed.
Change-Id: Ifd4fb88ceff24561131fad1d72531889e323f5ac
Reviewed-on: https://code.wireshark.org/review/1651
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-15 11:58:57 +00:00
Guy Harris 45da41d6fe Fix declaration to match definition.
Change-Id: I9fcfddb34b2a22c3e2cf8f8fc9671eed2e8aef43
Reviewed-on: https://code.wireshark.org/review/1649
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-05-15 04:17:01 +00:00
Guy Harris 84fcadcb05 Get rid of some uses of tvb_get_ptr().
Change-Id: I85232f984f273c9a6ceccd12df5b77a4d131596c
Reviewed-on: https://code.wireshark.org/review/1648
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-05-15 03:23:38 +00:00
Guy Harris 09bf1702a6 Get rid of some uses of tvb_get_ptr().
Introduce a new tvb_ipxnet_to_string() routine to help that.

Change-Id: Icb27f7cdd6e6e7de67e765715e450063d7de6072
Reviewed-on: https://code.wireshark.org/review/1647
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-05-15 03:16:15 +00:00
Guy Harris 1bfe396ca4 Get rid of some uses of tvb_get_ptr().
Change-Id: Ib49575e5d92419e0860bf92810a7ac69f30e9699
Reviewed-on: https://code.wireshark.org/review/1646
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-05-15 03:02:02 +00:00
Guy Harris b8f0e8cf03 Eliminate some calls to tvb_get_ptr().
Change-Id: I1c5e10467d68ed7372dfaa9109b350238418ffc1
Reviewed-on: https://code.wireshark.org/review/1645
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-05-15 02:31:14 +00:00
Evan Huus d7f1ac33f6 wmem documentation updates
Change-Id: Ief20460ed8ec1b4bd1286cc2a5490d9aeefdf98f
Reviewed-on: https://code.wireshark.org/review/1643
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-05-14 20:05:14 +00:00
AndersBroman 9c07e97272 Add an expert info for GT with no digits.
Change-Id: I3595af1cae77fb07be942289b4a53c9edbd768fb
Reviewed-on: https://code.wireshark.org/review/1561
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-05-14 20:04:48 +00:00
Balint Reczey 99e92aca85 Drop unused voip_bg.xpm
Change-Id: I1130d9dbfb0aaf9b1de460cd26e136514b9b80b2
Reviewed-on: https://code.wireshark.org/review/1642
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-05-14 19:18:29 +00:00
Pascal Quantin bc15fad105 AMQP: always display its name in protocol column, whatever the protocol version
Bug: 10101
Change-Id: I41105b250384bd44c37c0707ad41c9d76700bc75
Reviewed-on: https://code.wireshark.org/review/1641
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-05-14 18:53:03 +00:00
Evan Huus a1b939313f Revert "Don't throw for offset at end of TVB with len -1."
This reverts commit fe195c0c97.

Conflicts:
	epan/tvbuff.c

Change-Id: I1af618d0bd1e6211281b6d67c0ad197cfa513a0c
Reviewed-on: https://code.wireshark.org/review/1639
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-05-14 17:12:12 +00:00
Peter Wu d7c4bde279 tcp: display calculated checksum
While debugging a network issue, I found incorrect TCP checksums. These
are shown in the packet details, but are not available as column. This
patch adds the "tcp.checksum_calculated" field which is only available
if a checksum can be calculated (i.e., checksumming is enabled and the
full segment is available).

The fields are added separately for each checksum case to make it appear
before "Checksum Bad/Good" and to avoid calculating the expected field
value for the "good" cases.

Change-Id: I36af7894d526382ef636c5fa51e74871212b2909
Reviewed-on: https://code.wireshark.org/review/1627
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-05-14 16:59:04 +00:00
Bill Meier aa5d91284b Add a comment indicating that 'PLATFORM' is apparently set only for X64.
Change-Id: I5248c421e53a4347789c076433af004697a1b682
Reviewed-on: https://code.wireshark.org/review/1637
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-14 15:45:49 +00:00
AndersBroman fbf3391246 - curr_layer_num got wrong for STUN.
- Change depreciated API.

Change-Id: I6f83f45d2d007d42efc9d81cbaa58c50e67373f1
Reviewed-on: https://code.wireshark.org/review/1636
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-14 15:44:35 +00:00
Evan Huus beb119f911 Don't use -1 as length in frame dissector.
Additional belated followup to gfe195c0c9 per conversation on -dev about the use
of -1 and when we should throw exceptions. See also g867a1827e7.

Should (in theory) permit reverting gfe195c0c9.

Bug:9999
Bug:10030
Change-Id: I56e5f4e5dc12fe82268243d0b113cfc9ff5fdd17
Reviewed-on: https://code.wireshark.org/review/1603
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-14 15:42:27 +00:00
Mark Weel b2055d73a8 Update enums to SISO_REF_010-00v20-0 Annex A, section A.1 and A.2
Change-Id: Ic4099145d84541297d72b018b21f88b4a120b138
Reviewed-on: https://code.wireshark.org/review/1634
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-14 15:41:32 +00:00
AndersBroman 836530e985 - Replace tvb_length_remaining -> tvb_captured_length_remaining,
- Use length_remaining in tvb_find_line_end() rather than -1 it should
  give a faster code path.

Change-Id: Ia6c289f1701add48429b25152db8a8e5cea9e053
Reviewed-on: https://code.wireshark.org/review/1632
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-14 10:50:22 +00:00
ruengeler 2828bf7777 The filter string can only be valid, if an interface is selected.
Change-Id: I578f6b46d5e2631c6315eb0a8b6141ba93ee21bb
Reviewed-on: https://code.wireshark.org/review/1631
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-14 10:46:15 +00:00