Commit Graph

227 Commits

Author SHA1 Message Date
Michael Mann 860cb393d8 tshark: Add endpoints statistics
"stat name" has been official changed to "endpoints" for all dissectors, rather than a mixture of "host"/"endpoints" based on dissector.

Change-Id: If34bcb5165b493948e784ba038ab202803a59843
Reviewed-on: https://code.wireshark.org/review/6154
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
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>
2015-01-02 00:02:18 +00:00
Alexis La Goutte 493e413636 SCTP: fix Nesting level does not match indendation (CID 1159213 & 1159215 )
Change-Id: Icd04c5f1f09b9cf704828e4b6a598cd2c1f6dd15
Reviewed-on: https://code.wireshark.org/review/6172
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-31 15:21:48 +00:00
Martin Mathieson adb81f335d Deleting unnecessary #includes from dissectors.
Fifth batch (packet-rtp.c -> end).

Will look at cleaning up and committing script afterwards.

Change-Id: I8ed61dc941d98d3f7259a9d1f74e214eb7b4bfa2
Reviewed-on: https://code.wireshark.org/review/6052
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-12-25 22:43:20 +00:00
Bill Meier b5d7b7ab6e Cleanup use of #includes in non-generated epan/dissector/*.c
Specifically:
- Set packet.h to be the first wireshark #include after
   config.h and "system" #includes.
   packet.h added as an #include in some cases when missing.
- Remove some #includes included (directly/indirectly) in
   packet.h. E.g., glib.h.
   (Done only for those files including packet.h).
- As needed, move "system" #includes to be after config.h and
   before wireshark #includes.
- Rework various #include file specifications for consistency.
- Misc.

Change-Id: Ifaa1a14b50b69fbad38ea4838a49dfe595c54c95
Reviewed-on: https://code.wireshark.org/review/5923
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-21 05:46:22 +00:00
Guy Harris 2b006ad30e Have a heur_dissector_list_t be an opaque handle.
This allows dissector lists to be looked up by name, so they can be
shared by multiple dissectors.

(This means that there's no "udplite" heuristic dissector list, but
there shouldn't be one - protocols can run atop UDP or UDPLite equally
well, and they share a port namespace and uint dissector table, so they
should share a heuristic dissector table as well.)

Change-Id: Ifb2d2c294938c06d348a159adea7a57db8d770a7
Reviewed-on: https://code.wireshark.org/review/5936
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-21 04:14:24 +00:00
Alexis La Goutte 1952fefb8d SCTP: Missing break in switch (CID 1135556)
Change-Id: I00939bb9699493fe7af21497d9e9c013cc3d2e62
Reviewed-on: https://code.wireshark.org/review/5650
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-12-09 05:56:35 +00:00
Alexis La Goutte 5f79940d6c Endpoint: wrong filter when select a SCTP endpoint (INVALID == a.x.y.z ...)
Change-Id: I396e9af7971ee8be6fc9548162ff37fe704f0289
Reviewed-on: https://code.wireshark.org/review/5651
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-07 19:20:30 +00:00
Jeff Morriss 18fabb4733 Strengthen association matching when we haven't seen the INIT/INIT-ACK.
The fact that the vtag matches the initiate tag doesn't mean much if both are 0
(uninitialized).

Also leave in some (commented-out) debug to make debugging this stuff easier
in the future.

Change-Id: Id007de8bf9d2d4e0bb18309ed3e2572fedda45f1
Reviewed-on: https://code.wireshark.org/review/5571
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-12-05 14:14:55 +00:00
Michael Mann a2c2f872f4 Remove the use of pinfo->private_data from dissectors that just save it to restore it.
Change-Id: I13197cc48068bb35ee12a7023cfe5f76bbc4e264
Reviewed-on: https://code.wireshark.org/review/5486
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-11-26 16:20:59 +00:00
Michael Tüxen 67ab27a15b Add support for PAD chunks.
Add support for PAD chunks as defined in RFC 4820.

Change-Id: I66a83d5d133429154fe40ccef26687c8350463cf
Reviewed-on: https://code.wireshark.org/review/5393
Reviewed-by: Michael Tüxen <tuexen@wireshark.org>
2014-11-19 14:58:54 +00:00
Michael Tüxen d7179ac0ff Fix the length reported as value length.
The length reported as value length for unknown chunks
was actually the chunk length. Therefore it was off by 4.

Change-Id: Ieea79d2c51b4729fc139395174625d1f362d1ee5
Reviewed-on: https://code.wireshark.org/review/5392
Reviewed-by: Michael Tüxen <tuexen@wireshark.org>
2014-11-19 14:38:30 +00:00
Jeff Morriss ab6ad63e25 Show the sctp.checksum_bad filter rather than hiding it.
Follow TCP's lead by putting the filter in a subtree under the checksum.

Change-Id: I9351ee865011cd04bc3d3e88c51e8dbb3dc23f07
Reviewed-on: https://code.wireshark.org/review/4082
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-09-11 19:18:00 +00:00
Jeff Morriss 6e81f1d18c Don't use tvb_bytes_exist() to check if we captured the whole frame, just
compare captured_length to reported_length (which we've already retrieved
anyway).

Replace calls to tvb_length() with non-deprecated versions.

Change-Id: I9f6f3461915573fb21716a87cb6af416a3656097
Reviewed-on: https://code.wireshark.org/review/4080
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-09-11 18:13:39 +00:00
Alexis La Goutte eaaa35fc4d conv is always used, remove _U_ (unused) flag
Change-Id: I648b365b662bd902e26e0c61f6d3499e8543e504
Reviewed-on: https://code.wireshark.org/review/3935
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-31 18:47:01 +00:00
Alexis La Goutte 852493ad7f TCP/UDP/SCTP: fix Dereference of null pointer found by Clang Analyzer
The warning coming after change in g018b84de8

Change-Id: Ia96cdb2993a6283d8de2647c6723ec6b2b0977eb
Reviewed-on: https://code.wireshark.org/review/3752
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-27 22:20:19 +00:00
Michael Tüxen 59b750c087 Update the SCTP PPIDs.
Change-Id: I0b34e544d4332f2b5d8dcc287861636db86ac1b9
Reviewed-on: https://code.wireshark.org/review/3801
Petri-Dish: Michael Tüxen <tuexen@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Tüxen <tuexen@wireshark.org>
2014-08-23 12:09:56 +00:00
Michael Mann 018b84de84 Refactor "common" hostlist/endpoint table functionality.
This is very similar in architecture to the changes made to the Conversation table functionality.  Since all conversations have endpoints/hostlists, the "registered" list is shared for both.

Change-Id: Ie8c6910a68a1b3f27c5b18c4494f49b9404a7b31
Reviewed-on: https://code.wireshark.org/review/3214
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>
2014-08-18 04:24:39 +00:00
Guy Harris 532a98dc8c Wrap tvb_get_ptr() calls in the CRC routines.
That doesn't eliminate them, but at least it encapsulates them.

Change-Id: I78f0202cb7d2eb86e2dce220b2b97acc256d1e42
Reviewed-on: https://code.wireshark.org/review/3489
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-08-08 03:59:05 +00:00
Bill Meier 72c2a33437 Do various minor dissector changes:
- remove unneeded initializers;
- replace tabs in files with editor mode line 'expandtabs';
- col_set_str() --> col_add_str() (in one case);
- tvb_length() -- > tvb_reported_length() (in one case);
- do some whitespace & indentation fixes/changes.

Change-Id: Ib8ffbbcdb6e4a74c0df6021a75430ae1ef9ae089
Reviewed-on: https://code.wireshark.org/review/3435
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-08-05 19:07:28 +00:00
Pascal Quantin 7a7a72e155 Fix TCP/UDP/SCTP conversations broken by g59ef97d and g31ecdf5
Bug: 10336
Change-Id: Ia0dbe3abfade59a1c9714eacd8a854eafa6cf879
Reviewed-on: https://code.wireshark.org/review/3379
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: Anders Broman <a.broman58@gmail.com>
2014-08-03 15:32:22 +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
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
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
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
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
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
Michael Mann 14824e6adf Revert "Fixup: tvb_* -> tvb_captured"
https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html

This reverts commit 246fe2ca4c.

Change-Id: Ib24bae0198c13a84bd7f731bf4af921212109a8f
Reviewed-on: https://code.wireshark.org/review/2430
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19 18:25:59 +00:00
Dario Lombardo 246fe2ca4c Fixup: tvb_* -> tvb_captured
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f
Reviewed-on: https://code.wireshark.org/review/2377
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18 14:14:58 +00:00
Dario Lombardo 971ffd683e Fixup: tvb_get_string(z) -> tvb_get_string(z)_enc
Change-Id: I63a3704effe3fcab01a193dc39b6a22e9f1cf3fe
Reviewed-on: https://code.wireshark.org/review/2376
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18 14:13:58 +00:00
Evan Huus e0aabd97d8 Convert more time_to_str functions to wmem
Change-Id: Ibaae0e79935dc62f12f713f2df5b57d0f3f799b9
Reviewed-on: https://code.wireshark.org/review/2254
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-16 19:10:59 +00:00
Michael Tüxen 74774fd8e3 Update reference for I-Bit support.
Also remove the reference to the original ID.
Change-Id: I51357fc04699a40af2d34ec2bd36518d09d3b180
Reviewed-on: https://code.wireshark.org/review/1848
Reviewed-by: Michael Tüxen <tuexen@wireshark.org>
2014-05-28 17:01:42 +00:00
AndersBroman 2cfda31ff0 Change the signature of dissector_try_heuristic() to return hdtbl_entry
which can be used to call the found heuristic dissector on the next pass.

Introduce call_heur_dissector_direct() to be used to call a heuristic
dissector which accepted the frame on the first pass.

Change-Id: I524edd717b7d92b510bd60acfeea686d5f2b4582
Reviewed-on: https://code.wireshark.org/review/1697
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-21 20:17:29 +00:00
Guy Harris 97869f2dec More name changes.
Add ep_ to routines that may return ephemeral strings.

Change "get_XXX" to "XXX_to_display" if the routine returns a formatted
string if it can't get a name.

Change-Id: Ia0e82784349752cf4285bf82788316c9588fdd88
Reviewed-on: https://code.wireshark.org/review/1217
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-04-19 19:30:17 +00:00
Pascal Quantin ad33357e62 Exported PDU: add support for more than 32 tags
Change-Id: Idc9f105164919827a8a81c88b5a56de4fa25df0b
Reviewed-on: https://code.wireshark.org/review/1197
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-18 20:15:04 +00:00
Jeff Morriss 6328f6eb12 Add a couple more in_error_pkt checks.
Don't attempt reassembly and squash an expert info when we're in an error
packet.

Change-Id: I7d19e4ab7add78829bf1e28ad92dce3a7431c37d
Reviewed-on: https://code.wireshark.org/review/964
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
Tested-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-04-06 17:34:04 +00:00
Jeff Morriss e2ded09289 Don't do TSN analysis on data chunks embedded in PKTDROP chunks; set in_error_pkt too.
Add a comment indicating what we should be doing when the PKTDROP chunk contains
a truncated data chunk.

Change-Id: Icbba4c6dafc5c2656fc337734a1a570ef4a055d2
Reviewed-on: https://code.wireshark.org/review/950
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-04 04:09:36 +00:00
AndersBroman ffe7134b18 Get the NEXT protocol not the previous top one.
Change-Id: I261a740cbc369d905c89236b5173944e2780af59
Reviewed-on: https://code.wireshark.org/review/751
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-20 14:44:25 +00:00
ruengeler 27ad4c0331 Add a new case to find existing assocs when only the information of an INIT chunk is provided.
Change-Id: I88c5367652fb59a3da2cfd8895a1c0cc5176b859
Reviewed-on: https://code.wireshark.org/review/740
Reviewed-by: Michael Tüxen <tuexen@wireshark.org>
Tested-by: Michael Tüxen <tuexen@wireshark.org>
2014-03-19 16:38:11 +00:00
Pascal Quantin 488f2a0974 Exported PDU: add support for data length on the wire
Change-Id: Iff14ec4d0297ec85f3597b33871fb0ab5256a597
Reviewed-on: https://code.wireshark.org/review/728
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-19 05:13:30 +00:00
Pascal Quantin d832cb18db Fix OS-X compilation broken by gc354675
Change-Id: Ie32a2c256055059d1eade29af69eaad9011ca78b
Reviewed-on: https://code.wireshark.org/review/727
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-03-18 17:28:07 +00:00
AndersBroman c354675c41 Dechunk/export sctp payloads trough export PDU.
Change-Id: I86d21cadcbd3e85b7a91d509ffd3c317d76a2ce2
Reviewed-on: https://code.wireshark.org/review/726
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-18 17:08:50 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(Using sed : sed -i '/^ \* \$Id\$/,+1 d')

Fix manually some typo (in export_object_dicom.c and crc16-plain.c)

Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8
Reviewed-on: https://code.wireshark.org/review/497
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04 14:27:33 +00:00
Evan Huus 9afdd44eec Improve SCTP association lookup.
It's still O(n) in the worst case since the comparison function doesn't appear
to be suitable for use in a tree or hash-table, but at least we no longer spend
O(n) by default just finding the end of the list so we can iterate backwards.

Discovered while investigating bug #9823, but probably not the cause of that
bug.

Change-Id: Ib6c3691cff8e7fa49703df7c75635ef797c8fbe8
Reviewed-on: https://code.wireshark.org/review/443
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-02 21:52:09 +00:00
Jeff Morriss 7e94ee9942 Enable SCTP reassembly by default.
This was suggested in:
http://ask.wireshark.org/questions/29660/sctp-protocols-in-frame-problem

Since desegmentation is enabled by default in TCP, it makes sense to me to do
the same in SCTP as well.

Change-Id: I3cb4c7900c600d21668d95003149f87b9a006f66
Reviewed-on: https://code.wireshark.org/review/200
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-02-13 22:21:10 +00:00
Gilbert Ramirez 4cc694839d Fix all -fstrict-alias warnings found by gcc 4.1.2
The majority of the fixes are for calls to uat_new(). Instead of
having each caller cast its private data to (void**), we use void*
in the uat_new() API itself. Inside uat_new(), we cast the void*
to void**.

Some dissectors use val64_string arrays, so a VALS64() macro was
added for those, to avoid using VALS(), which is useful only for
value_string arrays.

packet-mq.c was changed because dissect_nt_sid() requires
a char**, not a guint**. All other callers of dissect_nt_sid() use
char*'s (and take the address of it) for their local storage. So,
this was changed to follow the other practices.

A confusion between gint and absolute_time_display_e in packet-time.c
was cleared up.

The ugliest fix is the addition of ip6_guint8_to_str(), for exactly
one caller. The caller uses one type of ip6 address byte array,
while ip6_to_str() expects another. This new function is in place
until the various address implementations can be consolidated.

Add VALS64() to the developer documentation.

Change-Id: If93ff5c6c8c7cc3c9510d7fb78fa9108e4552805
Reviewed-on: https://code.wireshark.org/review/48
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-03 09:26:10 +00:00
Jeff Morriss b20e6a20eb Make the SCTP Decode-As dialog more consistent with the TCP one.
Rename the 2nd SCTP Transport tab to "SCTP(PPID)" to make it obvious what it
is.

Fix up casing and code formatting in both SCTP and TCP Decode-As code.

svn path=/trunk/; revision=54391
2013-12-23 16:50:25 +00:00
Bill Meier 026fae3855 Don't use 'L' as a constant modifier.
svn path=/trunk/; revision=54343
2013-12-21 21:42:18 +00:00
Evan Huus 2ae8edccea Rename more to_str functions to have ep_ in the name if they return ephemeral
buffers. Remove two unused functions.

svn path=/trunk/; revision=54250
2013-12-19 16:28:39 +00:00
Irene Rüngeler 796bf409b0 Add dialogs and graphs to analyse SCTP behavior similar to the GTK version.
svn path=/trunk/; revision=54026
2013-12-13 07:25:30 +00:00
Anders Broman 2939977a4b - Make local functions static.
- Forward declaration of register functions.

svn path=/trunk/; revision=53942
2013-12-11 20:04:37 +00:00