Commit Graph

274 Commits

Author SHA1 Message Date
João Valverde d47551982b Implement registration of capture dissectors by name
Mirror it after protocol dissector API.

Change-Id: I7985bcfa9e07654c7cf005efec94efc205d7a304
Reviewed-on: https://code.wireshark.org/review/18496
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-10-28 17:39:04 +00:00
ruengeler c63f895159 SCTP: find right assoc id
Change-Id: I107b7f4c585ef5e080d6473a37b3db9a97f12365
Reviewed-on: https://code.wireshark.org/review/18325
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-10-25 16:24:51 +00:00
Michael Mann 2eb7b05b8c Convert most UDP dissectors to use "auto" preferences.
Similar to the "tcp.port" changes in I99604f95d426ad345f4b494598d94178b886eb67,
convert dissectors that use "udp.port".

More cleanup done on dissectors that use both TCP and UDP dissector
tables, so that less preference callbacks exist.

Change-Id: If07be9b9e850c244336a7069599cd554ce312dd3
Reviewed-on: https://code.wireshark.org/review/18120
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-10-13 02:51:18 +00:00
Guy Harris a4c8ebc18b Don't do any Decode As stuff for dissector tables not used with Decode As.
Have all dissector tables have a "supports Decode As" flag, which
defaults to FALSE, and which is set to TRUE if a register_decode_as()
refers to it.

When adding a dissector to a dissector table with a given key, only add
it for Decode As if the dissector table supports it.

For non-FT_STRING dissector tables, always check for multiple entries
for the same protocol with different dissectors, and report an error if
we found them.

This means there's no need for the creator of a dissector table to
specify whether duplicates of that sort should be allowed - we always do
the check when registering something for "Decode As" (in a non-FT_STRING
dissector table), and just don't bother registering anything for "Decode
As" if the dissector table doesn't support "Decode As", so there's no
check done for those dissector tables.

Change-Id: I4a1fdea3bddc2af27a65cfbca23edc99b26c0eed
Reviewed-on: https://code.wireshark.org/review/17402
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-08-31 00:08:01 +00:00
Irene Ruengeler 0d5cf54483 Set correct length for Req_Seq_Nr field
Change-Id: Iec228708423743e0268305da6ed606d464d1e1ea
Reviewed-on: https://code.wireshark.org/review/16854
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-08-03 11:15:51 +00:00
João Valverde b6d13ef90d Register IPv6 extension header dissectors to "ip.proto" table
We may want to add expert infos for IPv6 extension headers over IPv4 (TODO).
Any side-effects that don't make sense (e.g: IPv6 Routing over IPv4) are
ignored.

The IPv6 Next Header decode as is replaced by IP Proto decode as. It
didn't fit a conceptual model well and it also was not working very well
in practice (for multiple extension headers).

We now support decoding any IP Protocol number as an extension header.

Bug: 12673
Change-Id: Icbde019aba8990cc556ef2bd832f64cba76c24b6
Reviewed-on: https://code.wireshark.org/review/16681
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2016-07-29 16:36:32 +00:00
Michael Mann ad6fc87d64 Add proto_tree_add_checksum.
This is an attempt to standardize display/handling of checksum fields for all dissectors.
The main target is for dissectors that do validation, but dissectors that just report the
checksum were also included just to make them easier to find in the future.

Bug: 10620
Bug: 12058
Ping-Bug: 8859
Change-Id: Ia8abd86e42eaf8ed50de6b173409e914b17993bf
Reviewed-on: https://code.wireshark.org/review/16380
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-21 12:35:22 +00:00
Michael Tuexen d131898723 Add support for the U-bit in I-FORWARD-TSN chunks.
This adds support for the upcoming Internet Draft
draft-ietf-tsvwg-sctp-ndata-07.

Change-Id: Icb7c464504c41a743aa9c61d449f54bf400c1cd3
Reviewed-on: https://code.wireshark.org/review/16525
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>
2016-07-18 11:45:24 +00:00
Michael Mann be12a252dd Provide new interface for Export PDU.
Rather than have a bitmask for each desired field, have a dissector
provide a list of structures that represent data that goes into
the PDU.

Change-Id: I125190cbaee489ebffb7d9f5d8bc6f3be2d06353
Reviewed-on: https://code.wireshark.org/review/16122
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-06-29 18:53:46 +00:00
Michael Mann 0ef1d941ea Allow control of individual columns to be (un)writable.
Most protocols just want to limit COL_INFO or COL_PROTOCOL
so give that level of granularity.

Bug: 12144
Bug: 5117
Bug: 11144
Change-Id: I8de9b7d2c69e90d3fbfc0a52c2bd78c3de58e2f8
Reviewed-on: https://code.wireshark.org/review/15894
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
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>
2016-06-15 06:03:57 +00:00
Michael Tuexen 2b2a989681 Add support for the I-FORWARD-TSN chunk.
Change-Id: I4b9d2c33ba4d19bb542c11660f298ad2ff7e52c6
Reviewed-on: https://code.wireshark.org/review/14832
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>
2016-04-06 23:28:11 +00:00
Michael Mann 1e60d63c8c Create call_data_dissector() to call data dissector.
This saves many dissectors the need to find the data dissector and store a handle to it.

There were also some that were finding it, but not using it.
For others this was the only reason for their handoff function, so it could be eliminated.

Change-Id: I5d3f951ee1daa3d30c060d21bd12bbc881a8027b
Reviewed-on: https://code.wireshark.org/review/14530
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-20 17:38:03 +00:00
Michael Mann e37275bfde Associate dissector tables and heuristic subdissector lists with a protocol.
This will make it easier to determine protocol dependencies.

Some LLC OUI dissector tables didn't have an associated protocol, so they were left without one (-1 used)

Change-Id: I6339f16476510ef3f393d6fb5d8946419bfb4b7d
Reviewed-on: https://code.wireshark.org/review/14446
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-17 00:05:17 +00:00
Guy Harris 099698445b Move the proto data stuff out of frame_data.[ch].
It's not tied to the frame_data structure any more, so it belongs by
itself.

Clean up some #includes while we're at it; in particular, frame_data.h
doesn't use anything related to tvbuffs, so don't have it gratuitiously
include tvbuff.h.

Change-Id: Ic32922d4a3840bac47007c5d4c546b8842245e0c
Reviewed-on: https://code.wireshark.org/review/13518
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-25 02:24:34 +00:00
Guy Harris bc5a0374bf Add the packet number to the packet_info structure, and use it.
That removes most of the uses of the frame number field in the
frame_data structure.

Change-Id: Ie22e4533e87f8360d7c0a61ca6ffb796cc233f22
Reviewed-on: https://code.wireshark.org/review/13509
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-24 03:41:28 +00:00
Guy Harris 9141bd9700 Add more fields to packet_info structure and use them.
Add fields for the absolute time stamp (and another field for a presence
flag for the absolute time stamp) and the packet encapsulation for the
packet.

This lets us remove the field for the packet encapsulation in the
frame_data structure; do so.

Change-Id: Ifb910a9a192414e2a53086f3f7b97f39ed36aa39
Reviewed-on: https://code.wireshark.org/review/13499
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-23 03:50:58 +00:00
Guy Harris c0c7e88804 Include ws_symbol_export.h explicitly.
Change-Id: I8c50d84cb7a84e907d6409572dd9f6545a284c5d
Reviewed-on: https://code.wireshark.org/review/13216
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-12 08:35:38 +00:00
Guy Harris a5dee51a1a Move some definitions and declarations around.
This removes duplicates (including one incorrect duplicate), and also
means we have only one chunk_type_values[] value_string.

Change-Id: I4c3035b1cfb5c86cc7a5bf79feb9a5b0204b6dcc
Reviewed-on: https://code.wireshark.org/review/13212
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-12 07:22:30 +00:00
moshekaplan cd7026951b Fix a lot of typos and misspellings
Change-Id: I8512cfa1d424f82a873a0e0e1d22c7b075fdd7f3
Reviewed-on: https://code.wireshark.org/review/13069
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>
2016-01-08 20:04:56 +00:00
Michael Mann f2b8504740 Don't limit capture packet counts to a fixed set of protocols.
Kept backwards compatibility with GTK+ capture info dialog by keeping the protocols tracked hardcoded, but Qt should have more freedom.

Change-Id: I497be71ec761d53f312e14858daa7152d01b8c72
Reviewed-on: https://code.wireshark.org/review/12724
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-12-22 05:23:06 +00:00
Michael Mann f342fdcdb8 Create capture dissector "info" structure (capture_packet_info_t)
While it currently only contains packet_counts, it will hopefully stabilize the capture function signature if more fields are added.

Change-Id: I003552c58043c7c2d67aec458187b12b233057e2
Reviewed-on: https://code.wireshark.org/review/12690
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-17 04:01:56 +00:00
Guy Harris 68ca26ec75 Don't report an error for a non-multiple-of-4 chunk length.
To quote RFC 4960:

Chunk Length: 16 bits (unsigned integer)

      This value represents the size of the chunk in bytes, including
      the Chunk Type, Chunk Flags, Chunk Length, and Chunk Value fields.
      Therefore, if the Chunk Value field is zero-length, the Length
      field will be set to 4.  *The Chunk Length field does not count any
      chunk padding.*

      Chunks (including Type, Length, and Value fields) are padded out
      by the sender with all zero bytes to be a multiple of 4 bytes
      long.  This padding MUST NOT be more than 3 bytes in total.  The
      Chunk Length value does not include terminating padding of the
      chunk.  However, it does include padding of any variable-length
      parameter except the last parameter in the chunk.  The receiver
      MUST ignore the padding.

      Note: A robust implementation should accept the chunk whether or
      not the final padding has been included in the Chunk Length.

so the the chunk is *not* required to include the length of the final
padding in the chunk, although any padding *between* variable-length
parameters in the chunk must be included in the length (obviously, as
it's part of the chunk data).

Change-Id: I99d64fdd907c41229aa9ad10a230fff4bcdfa5f4
Reviewed-on: https://code.wireshark.org/review/12664
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-16 00:45:18 +00:00
Michael Mann d835b27167 Create some more capture dissector tables.
These were created from capture dissector functions that had switch statements determine "next" protocol/dissector.  The registration decreases the need for function declarations in header files.

Added new capture dissection tables for IP, IPv6, TCP and UDP as that seems like the next logical place to expand

Change-Id: I1ec0cd54eecda4f400669ee5b026bf6e2b46545a
Reviewed-on: https://code.wireshark.org/review/12634
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-14 22:35:15 +00:00
Michael Mann 31a54708f4 new_register_dissector -> register_dissector for dissector directory.
Change-Id: Ie39ef054a4a942687bd079f3a4d8c2cc55d5f22c
Reviewed-on: https://code.wireshark.org/review/12485
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-09 12:38:06 +00:00
Michael Tüxen d382c7d321 SCTP: It is odd that the body of dissect_heartbeat_ack_chunk' function is fully equivalent to the body of 'dissect_heartbeat_chunk' function found by PVS Studio (V524)
This is just a cosmetic change, which makes sense. No funtional
change.

Change-Id: Id24d162379093207863608e70f405e66f789276c
Reviewed-on: https://code.wireshark.org/review/12440
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Tüxen
Reviewed-by: Michael Tüxen <tuexen@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
2015-12-06 02:59:50 +00:00
Michael Tüxen 4b12491e66 Add missing table entry.
Add a missing table entry for Stream Reset Response parameters.

Change-Id: I45172cace57cd3f628a94fd61c4cb37a6c2e17ed
Reviewed-on: https://code.wireshark.org/review/12439
Reviewed-by: Michael Tüxen
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-05 12:21:02 +00:00
Pascal Quantin 1b32d505a5 SCTP: add another NULL dereference check
This is a follow-up of g2259bf8

Change-Id: I4dfb839fcd016a8d7a7210e6358d230025eb96a3
Reviewed-on: https://code.wireshark.org/review/12171
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-11-26 08:35:44 +00:00
Pascal Quantin 2259bf8a82 SCTP: verify frame pointer before dereferencing it
Bug: 11767
Change-Id: Icd01550e0aaa4cd0cc33ae3acc0ef702c38f4db4
Reviewed-on: https://code.wireshark.org/review/12146
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
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>
2015-11-25 23:59:58 +00:00
Michael Mann 28ea58251c register_dissector -> new_register_dissector
Picking off "easy" dissectors that only have one or two exit points at most.
This concludes a "first pass" over the dissector directory.

Change-Id: If5ce5484214be50fe541cba478da1de62e354297
Reviewed-on: https://code.wireshark.org/review/11830
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-14 21:54:27 +00:00
Michael Mann 74541a9596 Don't allow multiple registrations of a protocol in dissector tables.
The target here is the Decode As dialog where protocols have multiple registrations into a dissector table and that shows up as multiple entries in the Decode As dialog list with the same name so users are unsure which "dissector" they are choosing.

The "default" behavior (done in this commit) is to not allow duplicates for a dissector table, whether its part of Decode As or not.  It's just ENFORCED for Decode As.

Bug: 3949
Change-Id: Ibe14fa61aaeca0881f9cc39b78799e314b5e8127
Reviewed-on: https://code.wireshark.org/review/11405
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-04 12:39:40 +00:00
Guy Harris ff9f9fc431 Don't include "file.h" if you don't need it.
It ends up dragging in libwireshark headers, which programs not linking
with libwireshark shouldn't do.  In particular, including
<epan/address.h> causes some functions that refer to libwireshark
functions to be defined if the compiler doesn't handle "static inline"
the way GCC does, and you end up requiring libwireshark even though you
shouldn't require it.

Move plurality() to wsutil/str_util.h, so that non-libwireshark code can
get it without include epan/packet.h.  Fix includes as necessary.

Change-Id: Ie4819719da4c2b349f61445112aa419e99b977d3
Reviewed-on: https://code.wireshark.org/review/11545
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-04 08:46:30 +00:00
Gerald Combs 86fe2be4dc Use address functions instead of ADDRESS macros in asn1 and epan
Replace CMP_ADDRESS, COPY_ADDRESS, et al with their lower-case
equivalents in the asn1 and epan directories.

Change-Id: I4043b0931d4353d60cffbd829e30269eb8d08cf4
Reviewed-on: https://code.wireshark.org/review/11200
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.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>
2015-10-22 11:45:56 +00:00
Pascal Quantin a37ac98c5e SCTP: fix dissection of DATA chunks
Regression introduced in gd52322e

Change-Id: I57baf53d81c7e95ea8ad15e4799033d341e4ee61
Reviewed-on: https://code.wireshark.org/review/10845
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-10-06 21:31:14 +00:00
João Valverde a459ac72a2 Add BASE_PT_ field display types
Avoid displaying duplicate port numbers with transport name resolution disabled and
make some dissector code simpler.

Introduces port_with_resolution_to_str_buf() function and amends UDP/TCP/DCCP/SCTP to
use the new field display type.

Change-Id: Ifb97810b9c669ccbb1a310a2c0ffd6e2b63af210
Reviewed-on: https://code.wireshark.org/review/10625
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-05 18:10:48 +00:00
ruengeler d52322efb3 SCTP I-DATA support
Change-Id: I459942b9e3287d500dda517568252d4cb56d3216
Reviewed-on: https://code.wireshark.org/review/10802
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
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>
2015-10-05 17:38:08 +00:00
João Valverde c00420efa2 Move utf8_entities.h to wsutil
Change-Id: I6298b3de5f0a1cb988014ff16082eaf8c2a3c3c0
Reviewed-on: https://code.wireshark.org/review/10786
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>
2015-10-05 14:34:53 +00:00
Michael Tüxen c53d2f0d0e Revert "SCTP: Add I_DATA support"
This reverts commit 4e9361dc88.

Change-Id: Ia7aee9ffbe5bc5d3ae88e957c234cbee7b65f457
Reviewed-on: https://code.wireshark.org/review/10723
Reviewed-by: Michael Tüxen <tuexen@wireshark.org>
2015-10-01 14:22:12 +00:00
ruengeler 4e9361dc88 SCTP: Add I_DATA support
Change-Id: Ib8566b7d94fdafdb9735b356d129f378c94af3cf
Reviewed-on: https://code.wireshark.org/review/10716
Reviewed-by: Michael Tüxen <tuexen@wireshark.org>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
2015-10-01 11:47:04 +00:00
Peter Wu ea46cf4f73 Split init of misc dissectors into init/cleanup functions
Convert remaining dissectors to use cleanup routines when possible.
(Single-)linked lists require NULL, so do reset their pointers to NULL.

Generated with
https://git.lekensteyn.nl/peter/wireshark-notes/diff/one-off/cleanup-rewrite.py?id=69af86e6c2cf965ba3d7f9636b647b195f0b7d57
(with AUDIT = ALWAYS_EMIT_CLEANUP_CODE = True)

Remaining dissectors which did not need further changes:
epan/dissectors/packet-aeron.c
epan/dissectors/packet-bootp.c
epan/dissectors/packet-brdwlk.c
epan/dissectors/packet-drda.c
epan/dissectors/packet-etch.c
epan/dissectors/packet-fix.c
epan/dissectors/packet-fw1.c
epan/dissectors/packet-lbm.c
epan/dissectors/packet-ldss.c
epan/dissectors/packet-simulcrypt.c
epan/dissectors/packet-spdy.c
epan/dissectors/packet-starteam.c
epan/dissectors/packet-udp.c

Change-Id: Idcacfea6a5de38d40e67db4cdcd0452ad9f9a6a9
Reviewed-on: https://code.wireshark.org/review/9228
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-03 23:37:18 +00:00
Pascal Quantin cdc7d25004 Add ability to export PDUs for heuristic dissectors also
Change-Id: I1bf1aa9794f9b4f106edffd4986fc0b1014522fa
Reviewed-on: https://code.wireshark.org/review/9099
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-06-25 00:10:13 +00:00
Evan Huus 9723c7a2f8 Remove more deprecated tvb_length calls
Change-Id: Ie40a195db622ebfb096fa5088c5467a1385e69bf
Reviewed-on: https://code.wireshark.org/review/9062
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-06-23 18:13:41 +00:00
Jeff Morriss f01a0faf5f Use FT_FRAMENUM_ACK in SCTP too.
Also fix up the hf description to make it clearer (to me) that this frame number is pointing *to* the ACK, not *from* it.

Change-Id: Ic60e949e65f3988f9ac34fff39d4addc28a1fdbc
Reviewed-on: https://code.wireshark.org/review/7658
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-12 22:23:15 +00:00
Guy Harris 859511db14 Make UAT record update callbacks return a success/failure indication.
Have them return TRUE on success and FALSE on failure.  Check the return
value rather than whether the error string pointer is null or not.

Change-Id: I800a03bcd70a6bbb7b217cf7c4800e9cdcf2189c
Reviewed-on: https://code.wireshark.org/review/7222
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-18 00:41:09 +00:00
Jeff Morriss 0da88ba505 Don't send an effectively empty message (no TVBs) to the SCTP tap.
This prevents the tap from crashing (asserting out) because there's no
(initialized) TVB to look at.

Bug: 9849
Change-Id: I370a49ef32a67e504c30cf1762a2180bf13c56ca
Reviewed-on: https://code.wireshark.org/review/7190
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>
2015-02-17 12:18:14 +00:00
Guy Harris bc23f79729 UAT error string pointers should not be const pointers.
UAT error strings are usually allocated by g_strdup() or
g_strdup_printf(), and must ultimately be freed by the caller.

Make the pointer-to-error-string-pointer arguments to various functions
be "char **", not "const char **".

Fix cases that finds where a raw string was being used, as that won't
work if you try to free it; g_strdup() it instead.

Add a missing free of an error string.

Remove some no-longer-necessary casts.

Remove some unnecessary g_strdup()s (the string being handed to it was
already g_malloc()ated).

Change some variable declarations to match.

Put in XXX comments for some cases where the error string is just freed,
without being shown to the user.

Change-Id: I40297746a2ef729c56763baeddbb0842386fa0d0
Reviewed-on: https://code.wireshark.org/review/6525
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-13 20:20:03 +00:00
Michael Mann 2d448f0d5d Eliminate proto_tree_add_text from some dissectors.
Change-Id: Ief4c377d56748e1a8ed0ef7fe5ba03b9be00cd8d
Reviewed-on: https://code.wireshark.org/review/6267
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-08 14:30:52 +00:00
Michael Mann 2209678149 ep_<protocol>_port_to_display -> <protocol>_port_to_display
Adjust any other ep_ related APIs related to the transition.

Change-Id: I961b371c2c4bda557e0f1817705c27eef0dae66c
Reviewed-on: https://code.wireshark.org/review/6388
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-08 05:32:32 +00:00
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