aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-icmp.c
AgeCommit message (Collapse)AuthorFilesLines
2019-01-02Make dissect_icmp_extension_structure into a dissector function.Michael Mann1-4/+8
That way there isn't a need for packet-icmp-int.h. Change-Id: Ib523c36ab2fdf6a43ee6ff32dadfcd53e9d9bf14 Reviewed-on: https://code.wireshark.org/review/31290 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-01Add a "failed" return for tap packet routines.Guy Harris1-3/+3
This allows taps that can fail to report an error and fail; a failed tap's packet routine won't be called again, so they don't have to keep track of whether they've failed themselves. We make the return value from the packet routine an enum. Don't have a separate type for the per-packet routine for "follow" taps; they're expected to act like tap packet routines, so just use the type for tap packet routines. One tap packet routine returned -1; that's not a valid return value, and wasn't one before this change (the return value was a boolean), so presume the intent was "don't redraw". Another tap routine's early return, without doing any work, returned TRUE; this is presumably an error (no work done, no need to redraw), so presumably it should be "don't redraw". Clean up some white space while we're at it. Change-Id: Ia7d2b717b2cace4b13c2b886e699aa4d79cc82c8 Reviewed-on: https://code.wireshark.org/review/31283 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-11-25packet-icmp.c: Add some unused fields and fix a logic errorJoerg Mayer1-73/+46
- Adding rfc4884 support failed to properly add the unused fields if no length field was present. - The was a logic error when both length and MTU size were present. - reformat the lines in that section to no longer adhere to 80 columns Change-Id: I3bcca25cc7d5e866a040c5c6a8011144ebc3370e Reviewed-on: https://code.wireshark.org/review/30781 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-20ICMPv6: Add Extended Echo (Probe) RFC8335Uli Heilmeier1-6/+7
Implementing ICMP extended echo (RFC8335) for IPv6. To dissect ICMP Extension objects we use the IPv4 implementation. Bug: 14457 Change-Id: I5be59ccf9058466369c072cfed3ad1cd17bf243b Reviewed-on: https://code.wireshark.org/review/30563 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-09ICMP: Add Extended Echo (Probe) RFC8335Uli Heilmeier1-1/+255
Implementing ICMP extended echo (RFC8335) for IPv4. Ping-Bug: 14457 Change-Id: Id7ae6fce88ef43f8b6a62b06285257416acd0a77 Reviewed-on: https://code.wireshark.org/review/30552 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-06-21Indicate why we ahve to check the address type.Guy Harris1-1/+2
Change-Id: I223eba466680e7ef6003e3412084eb1009d8d38d Reviewed-on: https://code.wireshark.org/review/28369 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-06-20Check the address type, not the address length, in multicast/broadcast tests.Guy Harris1-3/+3
The tests assume an IPv4 address; check for IPv4 addresses. They're always 4 octets long, so no need to check the length. Change the XXX comment to ask whether the check for an IPv4 address is even necessary. Change-Id: Ic55d2c208d5472ec995aa0c150b09a2118f04a76 Reviewed-on: https://code.wireshark.org/review/28353 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-03-15Epan+Qt: Invalidate cached column strings.Gerald Combs1-2/+2
Add col_data_changed, which checks to see if we have updated column info. Add col_append_frame_number, which adds a frame number and sets col_data_changed. Call col_append_frame_number instead of col_append_fstr from some dissectors. Add PacketListRecord::invalidateAllRecords, which invalidates any cached record data. Add PacketListModel::invalidateAllColumnStrings which calls invalidateAllRecords and signals that our data has changed. Call invalidateAllColumnStrings when we have new name resolution or column information. Bug: 11414 Bug: 11468 Change-Id: I2671594a722f4f9436fe1df84d43489a148e0cee Reviewed-on: https://code.wireshark.org/review/26373 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2018-02-12dissectors: use SPDX identifiers.Dario Lombardo1-13/+1
Change-Id: I92c94448e6641716d03158a5f332c8b53709423a Reviewed-on: https://code.wireshark.org/review/25756 Petri-Dish: Dario Lombardo <lomato@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-04Don't assume address data is aligned.Guy Harris1-5/+9
The data for an address is *not* guaranteed to be aligned on any particular boundary, so, for IPv4 addresses, don't assume it's aligned on a 32-bit boundary - to get it in host byte order, fetch it with pntoh32(), which fetches a 32-bit value that's in network byte order, and isn't necessarily aligned on any particular boundary, and returns it in host byte order. Change-Id: Ic512ab4b1e0f2815d9f0af0e33714f456a08a45d Reviewed-on: https://code.wireshark.org/review/25589 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-01-01ICMP: Resolve Extension Object Class valueUli Heilmeier1-4/+10
Resolve ICMP Extension Object Class value to name as defined at https://www.iana.org/assignments/icmp-parameters/icmp-parameters.xhtml#icmp-parameters-ext-classes Ping-Bug: 6632 Change-Id: I73ce9dbef5b09aa49f16c73a04ce474cd46f5695 Reviewed-on: https://code.wireshark.org/review/25098 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-30Add wsutil/inet_ipv4.h.Guy Harris1-2/+1
It defines a ws_in4_addr type, which is intended to hold IPv4 addresses in network byte order, and some macros to test for IPv4 addresses in the local network control block and multicast IPv4 addresses. Use those macros in places where dissectors had their own code for that purpose. Change-Id: I4252b410e37207157be85119a332e2a6913b332f Reviewed-on: https://code.wireshark.org/review/24178 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-10-29Add conversation endpoint typeMichael Mann1-4/+4
For the moment this mirrors the port_type enumeration (PT_XXX), but the intent is to move away from using "port types", eliminating most (if not all) Added conversation_pt_to_endpoint_type() so that conversations deal with the correct enumeration. This is for dissector that use pinfo->ptype as input to conversation APIs. Explicit use of port types are converted to using ENDPOINT_XXX type. Change-Id: Ia0bf553a3943b702c921f185407e03ce93ebf0ef Reviewed-on: https://code.wireshark.org/review/24166 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-26Include VLAN ID in key for ICMP request/response trackingChristopher Maynard1-8/+23
Add global preference to allow for "stricter" conversation tracking Bug: 13518 Change-Id: I166a084c402374fa76dac7bb54f941e2e9c9325a Reviewed-on: https://code.wireshark.org/review/22842 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-09-23Have sequence analysis properly use filters from taps.Michael Mann1-21/+18
Sequence analysis has its own "filtering" system that required its tap functions to look for some "filter flags". register_tap_listener() already comes with a filter argument, so use that to simplify logic of tap functions in dissectors. Also have Qt GUI for Flow Graph look like other dialogs that have a "Limit to display filter" checkbox. Change-Id: I91d9d9599309786892f5b50c98692e52651e7174 Reviewed-on: https://code.wireshark.org/review/23659 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-09-20Explicitly add ICMP and ICMPv6 to Flow graph.Michael Mann1-0/+44
Functionality for ICMP was "hidden" in the frame/"any" flow. Pull it out into its own using the new sequence analysis API. Change-Id: I2035f1a59a9e46ea1086443ad4b4a9723dc13883 Reviewed-on: https://code.wireshark.org/review/23625 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>
2017-09-02Have a single IPv6 tapJoão Valverde1-1/+1
Optimize code and open possibility for enriching IPv6 tap data. Change-Id: I5a204d7464cde32123d5bfe664cc9b6bcf08dbe1 Reviewed-on: https://code.wireshark.org/review/23340 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>
2017-09-01Avoid use of global protocol variablesJoão Valverde1-1/+2
Change-Id: I006d872a83649e72a6c83abac68cbae064457162 Reviewed-on: https://code.wireshark.org/review/23346 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-04-13Bugfix bad checksum of ICMP extension header.Michael Mann1-2/+9
Use offset in tvb, not 0 for computation. Also add check for checksum = 0, which means checksum isn't present. Bug: 13586 Change-Id: I18812894104c35e50ecb99aa8eca6b030c78c486 Reviewed-on: https://code.wireshark.org/review/21070 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-11packet-icmp.c: Remove tree check that prevents expert infoMichael Mann1-4/+0
proto_tree_add_checksum uses expert info and shouldn't be "NULL tree protected" Change-Id: If8a367c2be69252e9c6613329b7f78ad7e1e34eb Ping-Bug: 13586 Reviewed-on: https://code.wireshark.org/review/21012 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>
2017-03-23icmp: Fix name for addr_entry_sizeStig Bjørlykke1-1/+1
Use "Address entry size" as name for icmp.addr_entry_size Change-Id: Ibf118ef4e05e9bda4d90a4576dd844204c3ca5ed Ping-Bug: 13515 Reviewed-on: https://code.wireshark.org/review/20678 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-03-19ICMP: display C-Type when unknown object in extensionAlexis La Goutte1-3/+5
Change-Id: I465341919675783999f4b131a7485ef2f6b8059f Reviewed-on: https://code.wireshark.org/review/20583 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-12-31Dissectors don't need a journey of self discovery.Michael Mann1-3/+3
They already know who they are when they register themselves. Saving the handle then to avoid finding it later. Not sure if this will increase unnecessary register_dissector functions (instead of using create_dissector_handle in proto_reg_handoff function) when other dissectors copy/paste, but it should make startup time a few microseconds better. Change-Id: I3839be791b32b84887ac51a6a65fb5733e9f1f43 Reviewed-on: https://code.wireshark.org/review/19481 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>
2016-12-20ICMP: fix typoAlexis La Goutte1-1/+1
Change-Id: Iffa10a3a14ec2ff32e51d92a1936d7e110a76bd4 Reviewed-on: https://code.wireshark.org/review/19364 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-12-20ICMP: fix indent (use always tab)Alexis La Goutte1-1/+1
Change-Id: I939bf83ef6f6385dbad642aeef38673862c04bf0 Reviewed-on: https://code.wireshark.org/review/19363 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-12-09[ICMP] use abs() in detecting timestamp heuristicsMichael Mann1-2/+3
The code was making the assumption that the ICMP data time will always be greater than or equal to the frame time, but not earlier, but that is not always the case and the heuristics can fail. Bug: 13161 Change-Id: I4bc7bd8d22d717d3b1f08afdd651f8a70cb7aef2 Reviewed-on: https://code.wireshark.org/review/19157 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-28Implement registration of capture dissectors by nameJoão Valverde1-1/+3
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-09-07ICMP: Avoid spurious reply not found for broadcast pingJoão Valverde1-6/+18
Bug: 12830 Change-Id: Ie73b2b6e75c396660d0d2f2fc975c57bbb58d2eb Reviewed-on: https://code.wireshark.org/review/17541 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-29Register IPv6 extension header dissectors to "ip.proto" tableJoão Valverde1-1/+0
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-27Follow up for proto_tree_add_checksum.Michael Mann1-5/+7
Fill in the "gaps" so that all dissectors that verify checksums have both a status and expert info field. Also address comments from original proto_tree_add_checksum patch that didn't make it. Ping-Bug: 8859 Change-Id: I2e6640108fd6bb218cb959fe9e4ba98a13e43a2f Reviewed-on: https://code.wireshark.org/review/16590 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>
2016-07-24Don't even *mention* the TTL/hop limit if we don't have it.Guy Harris1-2/+7
That's cleaner than reporting it as 0. Change-Id: I862130c98131ba83f9689201d852e2f1aab34770 Reviewed-on: https://code.wireshark.org/review/16619 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-07-21Add proto_tree_add_checksum.Michael Mann1-53/+15
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-03ICMP: Avoid "no response found" for multicast pingJoão Valverde1-1/+9
Ping-Bug: 12581 Change-Id: I6943d275de988e9de66bc01e2b421901947a5b95 Reviewed-on: https://code.wireshark.org/review/16252 Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-05-09Give the time_[m]secs_to routines names that begin with "[un]signed_".Guy Harris1-4/+4
Indicate whether they take a signed time delta or an unsigned time delta. Export unsigned_time_secs_to_str() while we're at it. Change-Id: I0fbe87f1825efa886364caa61a3358b79d285947 Reviewed-on: https://code.wireshark.org/review/15324 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-03-20Create call_data_dissector() to call data dissector.Michael Mann1-10/+4
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-20Manually add protocol dependencies derived from find_dissector.Michael Mann1-1/+1
Started by grepping call_dissector_with_data, call_dissector_only and call_dissector and traced the handles passed into them to a find_dissector within the dissector. Then replaced find_dissector with find_dissector_add_dependency and added the protocol id from the dissector. "data" dissector was not considered to be a dependency. Change-Id: I15d0d77301306587ef8e7af5876e74231816890d Reviewed-on: https://code.wireshark.org/review/14509 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-02-22Fix some hf_ field datatype conflicts.Michael Mann1-8/+7
'ieee17221.clock_source_id' exists multiple times with NOT compatible types: FT_UINT16 and FT_UINT64 'ieee17221.stream_format' exists multiple times with NOT compatible types: FT_NONE and FT_UINT64 'afp.unknown' exists multiple times with NOT compatible types: FT_UINT16 and FT_BYTES 'afp.toc_offset' exists multiple times with NOT compatible types: FT_NONE and FT_UINT64 'bootp.client_id.iaid' exists multiple times with NOT compatible types: FT_UINT32 and FT_STRING 'bthfp.chld.mode' exists multiple times with NOT compatible types: FT_STRING and FT_UINT8 'canopen.pdo.data' exists multiple times with NOT compatible types: FT_STRINGZ and FT_BYTES 'canopen.sdo.data' exists multiple times with NOT compatible types: FT_UINT32 and FT_BYTES 'ceph.msg.' exists multiple times with NOT compatible types: FT_UINT32 and FT_UINT64 'ceph.version' exists multiple times with NOT compatible types: FT_UINT16 and FT_UINT64 'cip.linkaddress' exists multiple times with NOT compatible types: FT_STRING and FT_UINT8 'dnp3.al.ana' exists multiple times with NOT compatible types: FT_FLOAT and FT_INT32 'dnp3.al.anaout' exists multiple times with NOT compatible types: FT_FLOAT and FT_INT32 'dtls.handshake.cert_url.url_hash_len' exists multiple times with NOT compatible types: FT_STRING and FT_UINT16 'ssl.handshake.cert_url.url_hash_len' exists multiple times with NOT compatible types: FT_STRING and FT_UINT16 'dvb-s2_gse.label' exists multiple times with NOT compatible types: FT_UINT24 and FT_ETHER 'fcdns.rply.fc4type' exists multiple times with NOT compatible types: FT_NONE and FT_UINT8 'fcdns.req.fc4type' exists multiple times with NOT compatible types: FT_NONE and FT_UINT8 'icmp.int_info.name' exists multiple times with NOT compatible types: FT_STRING and FT_BOOLEAN 'icmpv6.ilnp.nb_locs' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT8 'icmpv6.ilnp.nb_locs' exists multiple times with NOT compatible types: FT_UINT32 and FT_UINT64 'mausb.clear_transfers.status' exists multiple times with NOT compatible types: FT_BOOLEAN and FT_NONE 'mikey.v' exists multiple times with NOT compatible types: FT_BOOLEAN and FT_NONE 'mswsp.rangeboundry.ultype' exists multiple times with NOT compatible types: FT_STRING and FT_UINT32 'mswsp.arrayvector.address64' exists multiple times with NOT compatible types: FT_UINT32 and FT_UINT64 'nlm.lock.l_offset' exists multiple times with NOT compatible types: FT_UINT32 and FT_UINT64 'nlm.lock.l_len' exists multiple times with NOT compatible types: FT_UINT32 and FT_UINT64 'pflog.saddr' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4 'pflog.daddr' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4 'pflog.saddr' exists multiple times with NOT compatible types: FT_BYTES and FT_IPv6 'pflog.daddr' exists multiple times with NOT compatible types: FT_BYTES and FT_IPv6 'pgm.spm.path' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4 'pgm.nak.src' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4 'pgm.nak.grp' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4 'pgm.poll.path' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4 'pgm.opts.ccdata.acker' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4 'pgm.opts.ccdata.acker' exists multiple times with NOT compatible types: FT_IPv4 and FT_IPv6 'pgm.opts.ccdata.acker' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4 'pgm.opts.redirect.dlr' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4 Change-Id: Iaf694699d108a12db172da8dd9fbab211adb329d Reviewed-on: https://code.wireshark.org/review/14070 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-01-25Move the proto data stuff out of frame_data.[ch].Guy Harris1-0/+1
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-24Add the packet number to the packet_info structure, and use it.Guy Harris1-7/+7
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-23Add more fields to packet_info structure and use them.Guy Harris1-7/+7
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>
2015-12-22Don't limit capture packet counts to a fixed set of protocols.Michael Mann1-1/+1
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-21ICMP timestamp is in mseconds, not seconds.Michael Mann1-3/+3
Introduced in Iad5e28aa Bug: 11910 Change-Id: I80be5f156786ddb9f7bbe25460b48dbb4588cb8d Reviewed-on: https://code.wireshark.org/review/12755 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-12-17Create capture dissector "info" structure (capture_packet_info_t)Michael Mann1-2/+2
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-14Create some more capture dissector tables.Michael Mann1-0/+10
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-09new_register_dissector -> register_dissector for dissector directory.Michael Mann1-1/+1
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-11-07Remove some unnecessary includes.Guy Harris1-1/+0
Either remove them completely, or put them inside an #ifdef. Change-Id: Iceff4909e250c17812f38d94e067f7c37ab72e1b Reviewed-on: https://code.wireshark.org/review/11630 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-08-28Preparation Host Flows: make ICMP(v6) code and type retrieval more robustPascal Quantin1-1/+7
Do not retrieve type and code base on the info column content. Instead store type and code in pinfo structure and retrieve them in sequence analysis tap. Change-Id: I71cd505d7faf713c2372731495d47b45928a41f8 Reviewed-on: https://code.wireshark.org/review/10280 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Pascal Artho <pascalartho@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-08-18Preparation Host Flows: Dissector Packet ICMP and ICMPv6Pascal Artho1-0/+1
see https://code.wireshark.org/review/#/c/9976/ Change-Id: Ic301db4deea1a02b9e08c123b3e21e70817a2c85 Reviewed-on: https://code.wireshark.org/review/10097 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-15icmp,wimax: Fix undefined shiftPeter Wu1-6/+4
Fixes these warnings reported by Undefined Behavior Sanitizer (UBSan) while running the test suite: icmp: left shift of 55099 by 16 places cannot be represented in type 'int' wimax: left shift of 1 by 31 places cannot be represented in type 'int' Change-Id: I72913a901b61033098750da9c8f1617b055999a1 Reviewed-on: https://code.wireshark.org/review/8913 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: Anders Broman <a.broman58@gmail.com>
2015-05-09ICMP: Fix Logically dead code (CID 1295678)Alexis La Goutte1-5/+5
Mistake when remove proto_tree_add_text calls Change-Id: I820264b7a90a2563f846b6e6472416cd3e3278a4 Reviewed-on: https://code.wireshark.org/review/8368 Reviewed-by: Michael Mann <mmann78@netscape.net>