Commit Graph

301 Commits

Author SHA1 Message Date
Pascal Quantin 1d7bcb28f9 Fix 'Decode As' when used with IPv6-in-IPv6 packets
Add the ability to identify an instance of the dissector table to be modified by 'Decode As' thanks to pinfo->curr_layer_num
For now only IPv6 makes use of it but it could be extended to any other protocol
Also get rid of ipv6.nxt protocol: it is not required for 'Decode As' functionality and was colliding with ipv6.nxt field

Change-Id: I3c7403c77328ad7170e13af028d178f962a2b508
Reviewed-on: https://code.wireshark.org/review/10552
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-09-19 09:28:18 +00:00
João Valverde 9162177db9 Make IPv4/IPv6 DiffServ fields uniform
Replace DSCP/ECT/CE with DSCP/ECN for IPv6.

Introduce short descriptions for DSCP/ECN values.

Formating changes:

 - Make IPv4 and IPv6 as similar as possible.

 - Display short abbreviations only for "Differentiated Services Field".

 - Display DiffServ field as hex for IPv4.

 - Elide leading zeros from hex representation from DiffServ field for IPv6.

 - Display DSCP/ECN as decimal in subtree (same as "IP DSCP" column format).

Change-Id: Ia69d11dc9c1d752eb2e269314287c885506b5353
Reviewed-on: https://code.wireshark.org/review/10360
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-09-18 04:12:45 +00:00
João Valverde 6f84c7b54b IPv6: Make "ip.version" field hidden
Change-Id: Ib9a29205c36b3a50989ffeddb28e349ede16efd3
Reviewed-on: https://code.wireshark.org/review/10474
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-09-16 14:34:45 +00:00
João Valverde b040bda954 IPv6: Introduce more consistent nomenclature for options extension headers
Replace use of "IPv6 option" or *_opt_* to describe extension header.

Change-Id: I84fec8e1b89a22a15c1843de1c86c39417d872ad
Reviewed-on: https://code.wireshark.org/review/10466
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-09-11 06:34:46 +00:00
João Valverde d7420d071d IPv6: Add new line for readability
Change-Id: Ia963b1c12a8e852e75318fc054aa8caf7c63833c
Reviewed-on: https://code.wireshark.org/review/10465
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-09-10 16:09:09 +00:00
João Valverde e9b12916ab IPv6: Rename 'dstopt_tree' variable in dissect_opts()
dissect_opts() is used to dissect both hop-by-hop options and
destination options.

Change-Id: I2cb8716a30cf521772d9128155c87c0f92598ef6
Reviewed-on: https://code.wireshark.org/review/10459
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-09-10 07:58:48 +00:00
João Valverde ee729df973 Add the IPv6 DSCP value to the IP DSCP column
Bug: 7030

Change-Id: If4dac85d1406023829220fa9d58a6e642dbcec67
Reviewed-on: https://code.wireshark.org/review/10409
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-09-08 18:23:03 +00:00
João Valverde af6365a834 Allow "Decode As" for IPv6 over UDP
Change-Id: Ib28206e9573f1dd624be1d3c265fef405f65b19a
Reviewed-on: https://code.wireshark.org/review/10351
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>
2015-09-02 14:32:33 +00:00
João Valverde 6b41d2c202 Do not treat all unknown IP protocols as unknown IPv6 extension headers
Change-Id: I229260ce668b60a9756cd3f2e343c278ae27c211
Bug: 9996
Reviewed-on: https://code.wireshark.org/review/10196
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-08-26 06:13:06 +00:00
João Valverde 571f254ba8 Replace "IPv6 header length" with the more correct "payload length"
Change-Id: I3e667ba2e3ac49ce99e7a2035d9ff604fd7cbcca
Reviewed-on: https://code.wireshark.org/review/10205
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-08-25 10:57:49 +00:00
João Valverde 2af57832b6 Add more validity checks to the IPv6 dissector
Check for IP version and header size

Change-Id: I69102dda4e0e91ac1617d9a48fe9b0bab26aa9fe
Reviewed-on: https://code.wireshark.org/review/10218
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-08-25 07:35:59 +00:00
João Valverde d7e3076c90 IPv6 RPL: "cmprI" should be "cumprE"
Bug: 10560
Change-Id: I7cf9fb8ad39d128ed375abb8703937be8e3795b3
Reviewed-on: https://code.wireshark.org/review/10228
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-08-24 11:48:55 +00:00
João Valverde bc0d8d18a6 Remove space from field description for consistency
Change-Id: I74b0be1724d0754b7d1b724e177d44c4894d0e6b
Reviewed-on: https://code.wireshark.org/review/10198
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-24 10:57:17 +00:00
João Valverde 47c9aa4673 Check if IPv6 payload length exceeds framing byte length
Bug: 11418
Change-Id: Icbb980fda4f7addf52db59bc4f2aa27fc8f85837
Reviewed-on: https://code.wireshark.org/review/10176
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-08-24 07:31:48 +00:00
João Valverde d097968285 Make IPv6 extension header protocol names uniform and consistent with RFC 2460
Example from RFC 2460 (page 7):

  IPv6 header
  Hop-by-Hop Options header
  Destination Options header (note 1)
  Routing header
  Fragment header
  Authentication header (note 2)
  Encapsulating Security Payload header (note 2)
  Destination Options header (note 3)

Change-Id: I03c1ebedf581f71047b303856052609574110c61
Reviewed-on: https://code.wireshark.org/review/10173
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-08-21 12:41:52 +00:00
João Valverde d9395b7e34 Rename 'ip_next_header_dissector_table' to 'ipv6_next_header_dissector_table' in IPv6 dissector
Provides better readability, the dissector table is only used for IPv6
extension headers.

Change-Id: I87d877a89c6465d4475f2f0a40636ccd1b6cdd92
Reviewed-on: https://code.wireshark.org/review/10174
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-08-21 03:08:23 +00:00
João Valverde e328fa5a3e IPv6: Minor variable name fix
Change-Id: Iaef41fa2a212577f1fbdf7705eca65a928faa8c3
Reviewed-on: https://code.wireshark.org/review/10122
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-08-19 08:08:27 +00:00
João Valverde d5caba6df0 [IPv6] Make "ip.version" field pretty(er)
Change-Id: I1e32f666118e36f48edcc1678d75db3ca3f62776
Reviewed-on: https://code.wireshark.org/review/10075
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-08-19 01:45:15 +00:00
João Valverde c32c1f0608 IPv6 Jumbogram expert info cleanup
Change-Id: Ic06e50a30330758d6ed0b1b1d9ba0d7f74929a9a
Reviewed-on: https://code.wireshark.org/review/10111
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-08-19 01:35:57 +00:00
João Valverde 677d4d6be2 Add IPv6 Jumbogram support (RFC 2675)
Change-Id: Icea1659395d7bc16e367b74a695586926b33149b
Reviewed-on: https://code.wireshark.org/review/9968
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>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-15 06:51:04 +00:00
João Valverde 6d8b4afb49 Cleanup variable name in dissect_frag6()
Change-Id: Ib6bdea5dbc95b5221e41ca30c11288ff8c1dbb7f
Reviewed-on: https://code.wireshark.org/review/9952
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-10 04:44:07 +00:00
Peter Wu 80f7ee063d Call reassembly_table_destroy for some dissectors
This patch adds reassembly_table_destroy calls as cleanup function for
dissectors which have a simple init routine that just calls
reassembly_table_init (comments are ignored).

The changes were automatically generated using
https://git.lekensteyn.nl/peter/wireshark-notes/diff/one-off/cleanup-rewrite.py?id=4cc0aec05dc67a51926a045e1955b7a956757b5e
(with the if and assignment parsers disabled).

The only difference from the autogenerated output is that the XXX
comments from the init routines in smb-pipe and tds dissectors are kept.

Change-Id: I64aedf7189877247282b30b0e0f83757be6199e7
Reviewed-on: https://code.wireshark.org/review/9222
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-03 23:34:28 +00:00
Robert Cragie cedaa0d7f3 Support for MPL
(https://tools.ietf.org/html/draft-ietf-roll-trickle-mcast-12)

Change-Id: Idde0f0ef6c23b4c91f08fed1d5b18c68e8c5cf4e
Reviewed-on: https://code.wireshark.org/review/8885
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>
2015-06-15 14:36:19 +00:00
Guy Harris 0db5490f26 Register the IPv4 and IPv6 dissectors directly with WTAP_ENCAP_RAW_IP{4,6}.
No need to run them through the "raw IP" dissector.

Change-Id: I63639651873f00326a20b88a08ecb4ab3b9a83b3
Reviewed-on: https://code.wireshark.org/review/8459
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-05-14 07:47:17 +00:00
Jesse Gross 26a3573f90 Add support for IPv6 heuristic dissectors.
This adds limited support for heuristic subdissectors with IPv6.
The initial motivation is STT but it should transparently work
for other protocols using IP heuristic dissectors in a manner
similar to the non-heuristic dissectors.

The limitation is in regards to IPv6 extension headers. IPv6 has
multiple checks against the next protocol table when determining
when the protocol is an unknown extension header or not. This
assumes that the check is cheap and has no side effects, neither
of which is true for heuristic dissectors. As a compromise, this
assumes that the next protocol is registered as protocol, even
if is not the one that is ultimately dissected. Although not
strictly correct, in practice this is true for existing protocols
and likely future ones because the heuristic dissectors are
overriding non-heuristic ones.

Change-Id: Iff8cfc148ced5ca16191cc2b1879ad87e38d23cd
Reviewed-on: https://code.wireshark.org/review/8197
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-05-03 18:30:31 +00:00
Alexis La Goutte c2740149ba IPv6: fix using extended field designator is an extension [-Wextended-offsetof]
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>
2015-03-22 14:18:49 +00:00
Michael Mann 9c55903029 Use COPY_ADDRESS_SHALLOW instead of duplicating TVB_SET_ADDRESS and SET_ADDRESS calls for the same address.
Change-Id: I0c9cc5d574fdd73ecf1f8b32dbbf0ddb2b885116
Reviewed-on: https://code.wireshark.org/review/7437
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-03-01 12:54:33 +00:00
Michael Mann 13531d36fb Convert dissectors to use address_with_resolution_to_str instead of two separate calls for address string and name resolution.
Change-Id: I7c8cfbcf201b3b73afe731302572646ce7833d64
Reviewed-on: https://code.wireshark.org/review/7284
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-02-21 15:33:56 +00:00
Michael Mann 403be722ce Remove emem from GeoIP
Change-Id: Ifa96dc38a277b86c28f762489251dcc595afae67
Reviewed-on: https://code.wireshark.org/review/6603
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-18 04:14:03 +00:00
Michael Mann 22b4ec91c0 Replace ep_display_to_address with wmem equivalent display_to_address.
Almost all instances require using "manual" memory management, but it gets some ep_ calls out of the GUI.

Change-Id: Ifa7303766b08d09442ccf3d7063cbe061578ecd9
Reviewed-on: https://code.wireshark.org/review/6318
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-05 13:55:04 +00:00
Pascal Quantin 17dcd95f2b IPv6: do not allocate tap data on stack
Bug: 10780
Change-Id: I2526fb9a5a2dfd61b19dff5ba1b7902f77927f4a
Reviewed-on: https://code.wireshark.org/review/6276
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-01-03 19:50:16 +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
Michael Mann 1d598bbff7 Replace ip6_to_str and ip6_guint8_to_str with address_to_str and tvb_ip_to_str.
Change-Id: I1d258923a7a63539ec8456d3e306bca5016a1e4b
Reviewed-on: https://code.wireshark.org/review/6060
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>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-28 14:09:27 +00:00
Martin Mathieson 9d7709e7b7 Restore prefs.h for ipv6 too
Change-Id: Ibdc7098532c1aff7ec6135b8e4460056049f9089
Reviewed-on: https://code.wireshark.org/review/6020
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-12-23 15:16:04 +00:00
Martin Mathieson 86ed26f0b8 Deleting unnecessary #includes from dissectors.
Third batch (packet-icmpv6.c -> packet-mac-lte.c).

Will look at cleaning up and committing script afterwards.

Change-Id: Ib91e36ad200db01c3000605f6a7a21125b96a640
Reviewed-on: https://code.wireshark.org/review/6018
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-12-23 14:44:28 +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
Michael Mann 1f031808e1 Use new color_dissector_filters.[ch] to refactor (color) conversation generation in GTK menus.
Change-Id: I5868a40b71a989a3a1522cb091064bb0aaec6daf
Reviewed-on: https://code.wireshark.org/review/5828
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>
2014-12-19 07:59:28 +00:00
Bill Meier f412c9a01a Use ENC_BIG_ENDIAN when fetching FT_U?INT8 fields ...
(for some dissectors which fetch all other integral fields using
   ENC_BIG_ENDIAN).

Change-Id: Ic18e3172aad76af12b12d6732c88497be22aed56
Reviewed-on: https://code.wireshark.org/review/5748
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-13 18:45:56 +00:00
Michael Mann a971768530 Refactor "color" conversation filters
Have dissectors register their desire to be part of "color" conversation filters and have the GUI use that registered list.  GUI actually using API will come in a separate commit.

Change-Id: I5ffe922d97894fe7bf3182056b76ab5839a9461a
Reviewed-on: https://code.wireshark.org/review/5658
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-12-10 09:04:00 +00:00
Michael Mann f92ed4df2d Remove ipproto member of packet_info.
All situations can be handled with "shimmed" dissector functions.

Change-Id: Ic85483b32d99d3270b193c9f6b29574d8fad46a8
Reviewed-on: https://code.wireshark.org/review/5327
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: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-11-16 13:45:18 +00:00
Michael Mann d1ccc338d6 Add dissector table for sFlow header dissection.
Change-Id: I189a5b2d5f769395fa5e387f8be49b81903fb252
Reviewed-on: https://code.wireshark.org/review/5262
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>
2014-11-13 05:21:52 +00:00
Michael Mann 055e4768ec Add subdissector table for MPLS PW Associated Channel Type
Change-Id: Id72fcbe74b91b4eb25fb4d3f3d47a1d53c2857b2
Reviewed-on: https://code.wireshark.org/review/5212
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-11-09 19:49:09 +00:00
Michael Mann f7ac077630 Create a subdissector table for juniper payload protocols.
Change-Id: I60fd9c6c486b9b3b90e32fb9ccce3973569cc2ee
Reviewed-on: https://code.wireshark.org/review/5204
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: Evan Huus <eapache@gmail.com>
2014-11-09 13:56:37 +00:00
Alexis La Goutte e7b07ae73e IPv6: QuickStart option Nonce is read incorrectly
In Wireshark, the option's TTL field looks ok, but the [TTL diff] field points to the byte after the TTL field, which is part of the nonce field.
The nonce field is being read one byte after where it should be read and so the value being read is incorrect.
Moreover, the option data length says 6 but because of the extra byte being read 7 bytes are being read for this option data and the next option is read one byte later incorrectly so the options after the QuickStart option are being read incorrectly.

Found by boaz
Bug:10575

Change-Id: Icd836b2a5c2f92cef7b6fea61957a85fca5e3352
Reviewed-on: https://code.wireshark.org/review/4815
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-10-18 17:40:36 +00:00
Alexis La Goutte 0444c473b7 IPv6: Calipso option length is not used properly
This field indeed indicates the length of the Compartment Bitmap but *in 32-bit words*, which means that the value of 12 means the compartment bitmap is 48 bytes long.

Issue found by boaz
Bug:10561

Change-Id: I6c6ac25d0680837594d7cc6d2e4807a60a523b80
Reviewed-on: https://code.wireshark.org/review/4697
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-10-15 14:09:48 +00:00
Alexis La Goutte 631834ff51 IPv6: use proto_tree_add_item for IPv6 Routing Header Next and Length
Like other header (Fragment, Hop by Hop...)

Change-Id: I5d0a85bf285b37eed38345d659439400c5f50d06
Reviewed-on: https://code.wireshark.org/review/4634
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-10-13 18:16:39 +00:00
Alexis La Goutte 24b6a1141a IPv6 RPL option is read as less bytes than it is
Add check if the opt len equal to the "calculcate" length
and display expert info if not.. also replace offset by the opt len

Bug:10559
Bug:10561
Change-Id: I6e80e4055b6d0c5ef3f030c544cd1629e6b9abec
Reviewed-on: https://code.wireshark.org/review/4627
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-10-13 15:47:05 +00:00
Alexis La Goutte 71ae57e38d IPv6: Fix typo for Fragment nxt (Next Header)
Change-Id: Id7d6cd4a4c09238890394d5dc887ec840dc2d2af
Reviewed-on: https://code.wireshark.org/review/4633
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-10-13 12:18:30 +00:00
Michael Mann b563a84db6 Eliminate proto_tree_add_text from IP dissectors
Change-Id: I81fc364cbff3c5b305d61b2d444bf8599fbd19e7
Reviewed-on: https://code.wireshark.org/review/4631
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>
2014-10-13 06:45:13 +00:00
Alexis La Goutte 5518513eef IPv6 RPL: Display RPL flag on HEX
Change-Id: I0b3bb9e1a0de388135a71bc6a97602d6abf6a9dc
Reviewed-on: https://code.wireshark.org/review/4628
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-10-13 02:13:04 +00:00
Bill Meier 18d72987cb Do encoding-arg changes (all benign)
For:
- FT_BYTES: Always use just ENC_NA
- integral/floating (other than FT_[U]INT8): Do ENC_NA --> ENC_BIG_ENDIAN

Also:
- FT_UINT... --> FT_UINT8 in a few cases (to match proto_tree_add_item...)
- Change one case of incorrect '||' to '|'

Change-Id: I427e0e61618ff8faf55691c8a695930f67d455b0
Reviewed-on: https://code.wireshark.org/review/4184
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-19 01:38:08 +00:00
Michael Mann 8a580b3e28 Make all "padding" fields filterable
Change-Id: Ic4e4d9142a9b05ef3b628fac2e8766014c5fccec
Reviewed-on: https://code.wireshark.org/review/4073
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-09-11 01:57:02 +00:00
Wasim Abu Moch 401469880b packet-erf: added dissector table for "erf.types.type" type field.
1- removed unnecessary include <wiretap/erf.h>
2- used fall through in protocol switch case instead of calling same
function with same params.

fixes/changes after review with Evan Huus, changes ETH/IPv4/IPv6/Infiniband/InfinibandLink
to use dissector table instead of direct function calls.
other protocols should be called in the same way, we'll do it when have
the time.

instead of calling subdissector directly from packet-erf.c code it's
easier to declare this and each time we need to register a new
protocol over erf format we sould easily extend it from the protcol module
instead using "dissector_add_uint()" function.

the change is still backward compatible, if no upper protocol is
registered for the specifc type an old fasion direct function call
is performed.

Change-Id: I3ae1ccfdd49ab8f90667185296cc950dc2184475
Reviewed-on: https://code.wireshark.org/review/3670
Petri-Dish: Evan Huus <eapache@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-08-21 02:20:17 +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 ebff85fdbb Clean up Internet checksum handling.
Add macros to set entries of a vec_t, one for use when you have a
pointer to private data, and one for use when you have data in a tvbuff.
The latter wraps the use of tvb_get_ptr(), so that you're not directly
calling it in a dissector.

Move ip_checksum() to epan/in_cksum.c, and add an ip_checksum_tvb() that
wraps the use of tvb_get_ptr().

In the CARP dissector, give the length variable an unsigned type -
there's no benefit to it being signed, and that requires some casts to
be thrown around.

In the DCCP dissector, check only against the coverage length to see if
we have enough data, combine the "should we check the checksum?" check
with the "*can* we check the checksum?" check in a single if, and throw
a dissector assertion if the source network address type isn't IPv4 or
IPv6.

Get rid of inclues of <epan/in_cksum.h> in dissectors that don't use any
of the Internet checksum routines.

In the HIP dissector, make sure we have the data to calculate the
checksum before doing so.

Change-Id: I2f9674775dbb54c533d33082632809f7d32ec8ae
Reviewed-on: https://code.wireshark.org/review/3517
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-08-09 01:09:34 +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 Mann e8a8d62dc3 proto_tree_add_subtree[_format]
Change-Id: I7e016f10fcfdc0523bf2fe8c11295c0334f7c332
Reviewed-on: https://code.wireshark.org/review/2694
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-29 14:52:33 +00:00
Michael Mann 65700bd2e0 Make a dissector table out of IPv6 Next header.
This cleans up the implementation of the extension header, but also allows Decode As functionality for Next Header fields. This allows "old" SHIM6 IP protocol number (not IANA registered) to still be dissected.

bug:9995
Change-Id: I6f29a1f7db144478c5b6416d27da2c9c5a7a1de1
Reviewed-on: https://code.wireshark.org/review/1378
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-04-28 23:50:15 +00:00
Guy Harris c8f7e16b57 Some routine name changes.
"get_addr_name()" -> "ep_address_to_display()", to 1) indicate that it
returns a string with ephemeral scope and 2) indicate that it maps an
address to a "displayable" form - a name if possible, an address string
if not.

"se_get_addr_name()" -> "get_addr_name()", to indicate that its strings
have the same scope as "get_ether_name()", "get_hostname()", and
"get_hostname6()".

Change-Id: If2ab776395c7a4a163fef031d92b7757b5d23838
Reviewed-on: https://code.wireshark.org/review/1216
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-04-19 19:07:06 +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
Bill Meier 93fe4d53e2 Remove trailing whitespace.
Change-Id: Ia03a1cd4590aceda30ead4aa93ad413d90c6aea6
Reviewed-on: https://code.wireshark.org/review/372
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Tested-by: Bill Meier <wmeier@newsguy.com>
2014-02-25 16:36:38 +00:00
Alexis La Goutte 7af7c87898 Fix packet-ipv6.c:585:13: error: will never be executed [-Werror,-Wunreachable-code]
Change-Id: Ic2696aac59e001db1e4f62942680150a065ebbb1
Reviewed-on: https://code.wireshark.org/review/326
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-02-25 15:34:47 +00:00
Jakub Zawadzki 62d05c80ff Fix some warnings
svn path=/trunk/; revision=54109
2013-12-14 22:07:26 +00:00
Jakub Zawadzki 5c79cbf152 Fix some trivial warnings.
svn path=/trunk/; revision=54085
2013-12-14 10:29:26 +00:00
Bill Meier 5a2dd0e9ac Use a consistent indentation: 4 spaces;
Use #if 0/#endif instead of '/* */' to comment out some code;

svn path=/trunk/; revision=53983
2013-12-12 20:39:11 +00:00
Guy Harris a2b9f02e59 Fix some cases where STR_UNICODE was used with FT_DOUBLE.
svn path=/trunk/; revision=53831
2013-12-07 19:43:59 +00:00
Jakub Zawadzki 7ab18667e5 Drop proto_tree_add_unicode_string() from IP, IPv6, JSON dissectors.
Set .display to STR_UNICODE (instead of STR_ASCII).

svn path=/trunk/; revision=53827
2013-12-07 15:48:35 +00:00
Michael Mann 55c6869980 Remove ip_ttl from packet_info structure.
Part of the fix includes having the IPv6 dissector populate as much of a ws_ip structure as possible to pass to subdissectors of the "ip.proto" table, so the ttl value can be picked up.

svn path=/trunk/; revision=53522
2013-11-23 19:16:05 +00:00
Michael Mann 76ab93ea94 Provide "Decode As" functionality through dissectors themselves instead of the GUI. Bug 9450 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9450)
The basic idea behind this design is to have dissectors register with a "decode as list" with their name and dissector table.  When "Decode As" dialog is launched, any "registered" dissector found in the packet will cause a tab to be created in the dialog.

This patch includes just the dissector portion of the functionality (minus packet-dcerpc.[ch] because it has hooks to the current GUI)

svn path=/trunk/; revision=53445
2013-11-20 19:17:08 +00:00
Michael Mann 8c64c5da89 Remove iplen and iphdrlen from struct _packet_info.
Dissectors should just use (reported) tvb length and taps have other ways to get the data.

svn path=/trunk/; revision=52899
2013-10-27 20:38:42 +00:00
Gerald Combs 1701f42969 Fix warnings found by Clang 5.0 (-Wself-assign and -Wparentheses-equality).
Move code from ipv6-utils.h to packet-ipv6.c since that was the only
place it was used. Comment out unused code.

svn path=/trunk/; revision=52645
2013-10-16 17:19:59 +00:00
Michael Mann 346f803d42 Convert proto_tree_add_uint_format to proto_tree_add_uint_format_value if hf_ field name is the first part of the formatted string. This was all manual inspection and most cases were either:
1. Case sensitivity differences between hf_ field name and formatted string.
2. Unnecessary whitespace between hf_ field name and colon in formatted string

There are cases where the hf_ field name doesn't quite match the proto_tree_add_uint_format, but it's close enough that one of them should be "right", I'm just not sure which is, I just know the string in proto_tree_add_uint_format is the one displayed.

svn path=/trunk/; revision=52098
2013-09-16 10:39:06 +00:00
Pascal Quantin 9486a3d974 More wmem conversion (leaving uat related functions aside)
svn path=/trunk/; revision=52055
2013-09-15 13:46:13 +00:00
Michael Mann b38ee917b1 Convert proto_tree_add_uint_format to proto_tree_add_uint_format_value if hf_ field name is the first part of the formatted string. This was done with a perl script on the dissectors directory (packet-*.c), followed by manual inspection of the output. The manual inspection yielded a few cases that really should have been proto_tree_add_uint or proto_tree_add_item, so I updated them accordingly.
The script didn't catch as many as I would have liked, but it's a start.

The most common (ab)use of proto_tree_add_uint_format was for appending strings to CRC/checksum values to note good or bad CRC/checksum.

svn path=/trunk/; revision=52045
2013-09-15 01:48:30 +00:00
Chris Maynard 5cd898cd80 Rename frame relay NLPID dissector table from "fr.ietf" to "fr.nlpid".
svn path=/trunk/; revision=51960
2013-09-11 21:55:00 +00:00
Chris Maynard f2c276ec21 Change the name of the Cisco HDLC dissector table from chdlctype to chdlc.protocol and change the UI name to match. It is by far much more common to name the tables after the field than to pick another name.
svn path=/trunk/; revision=51958
2013-09-11 21:37:58 +00:00
Gerald Combs 6986eb4866 Move a lot of includes from follow_stream_dialog.h to
follow_stream_dialog.cpp. Remove the ones that we don't use. Use
QMessageBox in place of simple_dialog.

Move IP6OPT_HOME_ADDRESS and related definitions to packet-ipv6.c. It
looks like we only use it there and it conflicts with WinPcap.

Mark some items unused.

svn path=/trunk/; revision=51951
2013-09-11 17:39:49 +00:00
Michael Mann 9e3f9b449f expert_add_info_format_text -> expert_add_info_format
svn path=/trunk/; revision=51852
2013-09-09 00:44:09 +00:00
Jakub Zawadzki a18172147f Remove fragment_data, add fragment_head, fragment_item - for now alias it to the same structure.
This is begin of work to split fragment head and fragments items.

svn path=/trunk/; revision=50708
2013-07-17 21:12:24 +00:00
Michael Mann 7878e93cad expert_add_info_format_text + proto_tree_add_text = proto_tree_add_expert_format, where applicable.
svn path=/trunk/; revision=50377
2013-07-03 23:43:26 +00:00
Jeff Morriss df5c2548dd ip_proto.h now requires expert.h.
svn path=/trunk/; revision=50249
2013-06-30 11:06:32 +00:00
Michael Mann 0f0c111119 Remove check_col() and the occasional tree.
svn path=/trunk/; revision=49920
2013-06-14 01:02:11 +00:00
Michael Mann 6229ab6266 Batch of filterable expert infos.
svn path=/trunk/; revision=49845
2013-06-08 02:06:24 +00:00
Guy Harris a2414d8909 Don't wire into the reassembly code the notion that reassemblies should
be done on flows from one address to another; reassembly for protocols
running atop TCP should be done on flows from one TCP endpoint to
another.

We do this by:

	adding "reassembly table" as a data structure;

	associating hash tables for both in-progress reassemblies and
	completed reassemblies with that data structure (currently, not
	all reassemblies use the latter; they might keep completed
	reassemblies in the first table);

	having functions to create and destroy keys in that table;

	offering standard routines for doing address-based and
	address-and-port-based flow processing, so that dissectors not
	needing their own specialized flow processing can just use them.

This fixes some mis-reassemblies of NIS YPSERV YPALL responses (where
the second YPALL response is processed as if it were a continuation of
a previous response between different endpoints, even though said
response is already reassembled), and also allows the DCE RPC-specific
stuff to be moved out of epan/reassembly.c into the DCE RPC dissector.

svn path=/trunk/; revision=48491
2013-03-22 23:59:54 +00:00
Anders Broman 6bde918078 From beroset:
remove C++ incompatibilities 
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48426
2013-03-19 20:00:52 +00:00
Jaap Keuter f5791fbd2d I'm pretty sure that reassembled IPv6 data does not fit in a uint32.
svn path=/trunk/; revision=47791
2013-02-21 07:37:10 +00:00
Guy Harris 8ed7a73e22 Fix a bunch of warnings.
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
sizeof.

Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
strtol() and strtoul().

Change some data types to avoid those implicit conversion warnings.

When assigning a constant to a float, make sure the constant isn't a
double, by appending "f" to the constant.

Constify a bunch of variables, parameters, and return values to
eliminate warnings due to strings being given const qualifiers.  Cast
away those warnings in some cases where an API we don't control forces
us to do so.

Enable a bunch of additional warnings by default.  Note why at least
some of the other warnings aren't enabled.

randpkt.c and text2pcap.c are used to build programs, so they don't need
to be in EXTRA_DIST.

If the user specifies --enable-warnings-as-errors, add -Werror *even if
the user specified --enable-extra-gcc-flags; assume they know what
they're doing and are willing to have the compile fail due to the extra
GCC warnings being treated as errors.

svn path=/trunk/; revision=46748
2012-12-26 05:57:06 +00:00
Jeff Morriss 49466f95bc Introduce, and start using, TVB_SET_ADDRESS() and TVB_SET_ADDRESS_HF(). They
are like the non-TVB versions except that they take a TVB and an offset
instead of (frequently) a pointer into the TVB.

Calling tvb_get_ptr() before modifying the rest of the fields should help fix
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7960 (though I can't
reproduce that problem).


Replace a bunch of calls like:

SET_ADDRESS(..., AT_XXX, length, tvb_get_ptr(tvb, offset, length));

with:

TVB_SET_ADDRESS(..., AT_XXX, tvb, offset, length);

svn path=/trunk/; revision=46324
2012-12-02 04:49:13 +00:00
Bill Meier 303ce49ecd From Stephen Tarr: Fix 'misspelling (typo) in display filter field name'.
ipv6.framgent --> ipv6.fragment
#BACKPORT

svn path=/trunk/; revision=46098
2012-11-21 00:41:32 +00:00
Alexis La Goutte c07227bef3 From report of VinsWorldcom via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7938 IPv6 Option Pad1 Incorrect dissection
Wireshark 1.8.3 does not decode the IPv6 Option Pad1 (RFC 2460 Section 4.2)

RFC say : NOTE! the format of the Pad1 option is a special case -- it does not have length and value fields.

#BACKPORT(1.8)

svn path=/trunk/; revision=45843
2012-10-31 08:35:20 +00:00
Jakub Zawadzki da00b4089e Continuation of r43335
- ipv6.traffic_class.dscp use ext string so and need BASE_EXT_STRING flag (fix SIGSEGV)
- dscp_vals was removed from .h file, so make it static
- export dscp_vals_ext

svn path=/trunk/; revision=45380
2012-10-08 09:50:47 +00:00
Jeff Morriss 2552c750e5 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45017
2012-09-20 02:03:38 +00:00
Jeff Morriss aa5d9d78dd From Robert Bullen via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7683 :
The reassembled fragments tree in the Packet Details view is awesome, but it
lacks one thing: a field that exposes the reassembled data.

tcp.data already exists for exposing a single TCP segment's payload as a byte
array. It would be handy to have something similar for a single application
layer PDU when TCP segment reassembly is involved. I propose
tcp.reassembled.data, named and placed after the already existing field
tcp.reassembled.length.

My primary use case for this feature is outputting tcp.reassembled.data with
tshark for further processing with a script.

The attached patch implements this very feature. Because the reassembled
fragment tree code is general purpose, i.e. not specific to just TCP, any
dissector that relies upon it can add a similar field very cheaply. In that
vein I've also implemented ip.reassembled.data and ipv6.reassembled.data, which
expose reassembled fragment data as a single byte stream for IPv4 and IPv6,
respectively. All other protocols that use the reassembly code have been left
alone, other than inserting NULL into their initializer lists for the newly
introduced struct field reassemble.h:fragment_items.hf_reassembled_data.

svn path=/trunk/; revision=44802
2012-09-07 02:09:59 +00:00
Bill Meier 638d74d43f Use val_to_str_const() where appropriate;
Also (for a few files):
- create/use some extended value strings;
- remove unneeded #include files;
- remove unneeded variable initialization;
- re-order fcns slightly so prefs_reg_handoff...() at end, etc

svn path=/trunk/; revision=44438
2012-08-10 22:55:02 +00:00
Evan Huus a234b68ff0 Fix some system header files that were #included with "" instead of <>.
They made cppcheck unhappy.

svn path=/trunk/; revision=43779
2012-07-18 02:47:56 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Jeff Morriss 030a76319c Correct the IPv6 fragment offset shown in COL_INFO.
Make some Fragment header fields filterable (add_text() -> add_item()).
Display (and make filterable) the reserved octet and bits.

svn path=/trunk/; revision=43389
2012-06-19 20:20:18 +00:00
Jakub Zawadzki 85aad38347 Add proto_tree_add_unicode_string() to add UTF-8 string to tree.
Convert some proto_tree_add_string_format_value(..., val, "%s", val); to use new function.

svn path=/trunk/; revision=43363
2012-06-19 14:32:24 +00:00
Gerald Combs 0bf0ece483 Integrate r43221 and 43222 with 43211. (Revert back to having only
dscp_vals_ext.)

svn path=/trunk/; revision=43335
2012-06-18 17:23:10 +00:00
Jörg Mayer f679b89649 Revert r41952
BACKPORT to 1.8

svn path=/trunk/; revision=43222
2012-06-12 10:44:57 +00:00
Jörg Mayer 9228ece476 Manually revert r41953
BACKPORT to 1.8

svn path=/trunk/; revision=43221
2012-06-12 10:38:22 +00:00
Bill Meier 70cc6362fe Don't define value_string arrays in a .h file (included in multiple places).
Also:
 - don't use val_to_str_const() with a "format" default string;
 - rename 'opt_len_type' enumeration  identifiers to be less generic.

svn path=/trunk/; revision=43210
2012-06-11 18:47:42 +00:00
Anders Broman 867de6145e From Sheetal Kshirsagar and Andrew Williams:
Updating the RPL SRH dissector and implementing RPL Options header dissection.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6986

svn path=/trunk/; revision=42937
2012-05-31 07:25:11 +00:00
Jakub Zawadzki 4c3735771a Fix bug #5077 in IPv6.
svn path=/trunk/; revision=42909
2012-05-30 05:39:39 +00:00
Jakub Zawadzki a2dac52152 Cleanup geoip support in ipv6.
svn path=/trunk/; revision=42908
2012-05-30 05:33:37 +00:00
Gerald Combs 691ea690c8 Fix a few scan-build warnings along with some whitespace.
svn path=/trunk/; revision=42630
2012-05-15 19:11:08 +00:00
Alexis La Goutte f5a1787a06 Enhance Unknown IPv6 Extension Header
svn path=/trunk/; revision=42511
2012-05-08 17:34:46 +00:00
Anders Broman 3f4d248357 Use common code to have the same hf field for DSCP in IPv4 and IPv6.
svn path=/trunk/; revision=41953
2012-04-05 10:35:39 +00:00
Anders Broman 60c4bd3eeb Use common code to add ip version to the tree.
svn path=/trunk/; revision=41952
2012-04-05 08:38:26 +00:00
Anders Broman 3472f44238 Use common value string for DSCP.
svn path=/trunk/; revision=41951
2012-04-05 08:02:32 +00:00
Alexis La Goutte 2ddb826f55 Add IPv6 Option : RPL Option RFC-ietf-6man-rpl-option-06
svn path=/trunk/; revision=41797
2012-03-27 13:50:50 +00:00
Alexis La Goutte 22e69ad398 Add IPv6 Option :
* Tunnel Encapsulation Limit (RFC 2473)
* CALIPSO (RFC 5570)
* Experimental Option (RFC 4727)

svn path=/trunk/; revision=41796
2012-03-27 13:42:54 +00:00
Alexis La Goutte fa68273f40 Add Quick Start IPv6 Option ( And shared Quick Start option between IPv4/IPv6/TCP )
svn path=/trunk/; revision=41681
2012-03-20 08:51:05 +00:00
Alexis La Goutte d033740bc7 Fix typo (wrong proto_item is used... when there is PAD1 Option)
svn path=/trunk/; revision=41636
2012-03-18 11:54:23 +00:00
Alexis La Goutte c604cb5fa9 Remove dissect_ipv6_options function (unused from Revision 16302...)
svn path=/trunk/; revision=41624
2012-03-16 21:01:32 +00:00
Alexis La Goutte 20a52095aa Enhance and update IPv6 Option of Extension Header
* Make field filterable...
* Display unknown option payload 

svn path=/trunk/; revision=41513
2012-03-12 23:13:03 +00:00
Chris Maynard 3db18f185e Fix some typos.
svn path=/trunk/; revision=40787
2012-02-01 02:05:19 +00:00
Alexis La Goutte 0a8ea997e1 Fix indent and add modelines information
svn path=/trunk/; revision=40258
2011-12-21 14:18:28 +00:00
Chris Maynard ec5aa661d9 Explicitly display "Source or Destination Address/Host" like IPv4.
svn path=/trunk/; revision=40095
2011-12-05 19:12:24 +00:00
Chris Maynard 8e83e11d3f Call tap_queue_packet() after pinfo data is updated. Also, like IPv4, display next header field in decimal instead of hexadecimal (REF: http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xml)
svn path=/trunk/; revision=40083
2011-12-03 17:03:06 +00:00
Chris Maynard a5924e3fa3 Some code needs to execute (potentially) whether the tree is NULL or not. Also, changed "Left Segments" to read, "Segments Left" to better match RFC 2460 and RFC 3775 terminology.
svn path=/trunk/; revision=40077
2011-12-03 04:32:08 +00:00
Chris Maynard 33c8389976 If a type 2 Mobile IP routing header is present, only set pinfo->dst if seg_left is non-zero. Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6560
svn path=/trunk/; revision=40076
2011-12-03 04:07:20 +00:00
Alexis La Goutte a21d6f0a96 Remove unused code (Add in Revision 836)
Fix also some Clang/GCC Warning about unused variable

svn path=/trunk/; revision=40000
2011-11-25 10:41:11 +00:00
Bill Meier 30cee99009 Fix a number of proto_tree_add_item() encoding args.
svn path=/trunk/; revision=39774
2011-11-09 17:33:18 +00:00
Jeff Morriss f5e838b602 Remove comma at the end of several enumerator lists.
svn path=/trunk/; revision=39700
2011-11-01 01:23:10 +00:00
Bill Meier 794757ae8f For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.
Also: remove trailing whitespace for a number of files.

svn path=/trunk/; revision=39503
2011-10-21 02:10:19 +00:00
Bill Meier cca6984ab9 Do some more conversions of proto_tree_add_item() 'encoding' arg
(previously missed).

svn path=/trunk/; revision=39450
2011-10-18 00:17:48 +00:00
Bill Meier 293049dfba Do some conversions of proto_tree_add_item() 'encoding' arg.
(previously missed).

    57   FT_BOOLEAN:       FALSE-->ENC_BIG_ENDIAN
    31   FT_BOOLEAN:       TRUE-->ENC_LITTLE_ENDIAN

    10   FT_BYTES:         ENC_BIG_ENDIAN-->ENC_NA
     1   FT_BYTES:         ENC_LITTLE_ENDIAN-->ENC_NA
    21   FT_BYTES:         FALSE-->ENC_NA
     2   FT_BYTES:         TRUE-->ENC_NA

     2   FT_IPXNET:        ENC_BIG_ENDIAN-->ENC_NA

     6   FT_IPv6:          ENC_BIG_ENDIAN-->ENC_NA
     1   FT_IPv6:          FALSE-->ENC_NA

     6   FT_NONE:          ENC_BIG_ENDIAN-->ENC_NA
    19   FT_NONE:          FALSE-->ENC_NA
     3   FT_NONE:          TRUE-->ENC_NA

     1   FT_STRING:        ENC_BIG_ENDIAN-->ENC_ASCII|ENC_NA
     1   FT_STRING:        ENC_LITTLE_ENDIAN-->ENC_ASCII|ENC_NA
     5   FT_STRING:        FALSE-->ENC_ASCII|ENC_NA
     1   FT_STRING:        TRUE-->ENC_ASCII|ENC_NA

     4   FT_STRINGZ:       ENC_NA-->ENC_ASCII|ENC_NA
     8   FT_STRINGZ:       FALSE-->ENC_ASCII|ENC_NA

     1   FT_INT32:         FALSE-->ENC_BIG_ENDIAN
     1   FT_INT32:         TRUE-->ENC_LITTLE_ENDIAN

    11   FT_UINT8:         0-->ENC_BIG_ENDIAN
   111   FT_UINT8:         FALSE-->ENC_BIG_ENDIAN
    17   FT_UINT8:         TRUE-->ENC_LITTLE_ENDIAN
     1   FT_UINT16:        0-->ENC_BIG_ENDIAN
    68   FT_UINT16:        FALSE-->ENC_BIG_ENDIAN
    18   FT_UINT16:        TRUE-->ENC_LITTLE_ENDIAN
     4   FT_UINT24:        FALSE-->ENC_BIG_ENDIAN
    70   FT_UINT32:        FALSE-->ENC_BIG_ENDIAN
     1   FT_UINT32:        TRUE-->ENC_LITTLE_ENDIAN
     4   FT_UINT64:        FALSE-->ENC_BIG_ENDIAN
     1   FT_UINT64:        TRUE-->ENC_LITTLE_ENDIAN

     1   FT_UINT_STRING:   FALSE-->ENC_ASCII|ENC_BIG_ENDIAN


svn path=/trunk/; revision=39442
2011-10-16 23:38:49 +00:00
Gerald Combs 583ac864c0 Enable GeoIP lookups by default. Don't add GeoIP subtrees if we didn't
find any databases.

svn path=/trunk/; revision=39363
2011-10-11 17:57:09 +00:00
Bill Meier 67ee5049d4 Convert 'encoding' parameter of certain proto_tree_add_item() calls in non-autogenerated epan/dissectors:
Specifically:  Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as
  the encoding parameter for proto_tree_add_item() calls which directly reference
  an item in hf[] which has a type of:
     FT_BOOLEAN
     FT_IPv4
     FT_EUI64
     FT_GUID
     FT_UINT_STRING

Also: For type FT_ITv6 use ENC_NA. (This was missed in SVN #39260)

svn path=/trunk/; revision=39328
2011-10-10 00:39:31 +00:00
Gerald Combs 210262ad24 Assume all strings coming from GeoIP are ISO-8859-1. Fix IPv6
destination GeoIP lookups.

svn path=/trunk/; revision=39299
2011-10-06 19:33:15 +00:00
Bill Meier 4e57694d4a Convert 'encoding' parameter of certain proto_tree_add_item() calls in non-autogenerated epan/dissectors:
Specifically:  Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as
 the encoding parameter for proto_tree_add_item() calls which directly reference
 an item in hf[] which has a type of:
    FT_UINT8
    FT_UINT16
    FT_UINT24
    FT_UINT32
    FT_UINT64
    FT_INT8
    FT_INT16
    FT_INT24
    FT_INT32
    FT_INT64
    FT_FLOAT
    FT_DOUBLE


svn path=/trunk/; revision=39288
2011-10-06 03:35:44 +00:00
Gerald Combs 2841728510 Fix GeoIP-sans-IPv6 compilation.
svn path=/trunk/; revision=39281
2011-10-05 22:37:00 +00:00
Gerald Combs b9b05239f1 Add GeoIP IPv6 database support. Tested with GeoIP 1.4.7, but older
versions *should* be supported.

svn path=/trunk/; revision=39280
2011-10-05 22:27:51 +00:00
Bill Meier 94f36ca4ff Use ENC_NA as encoding for proto_tree_add_item() calls which directly reference an hf item (in hf[] with types:
FT_NONE
   FT_BYTES
   FT_IPV6
   FT_IPXNET
   FT_OID

Note: Encoding field set to ENC_NA only if the field was previously TRUE|FALSE|ENC_LITTLE_ENDIAN|ENC_BIG_ENDIAN

svn path=/trunk/; revision=39260
2011-10-04 22:44:31 +00:00
Bill Meier 2bf572bc41 Remove unneeded #includes: proto.h,tvbuff.h,value_string.h,stdlib.h,...
svn path=/trunk/; revision=38413
2011-08-08 17:59:32 +00:00
Bill Meier d2269ce7d5 Fix gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings.
svn path=/trunk/; revision=37716
2011-06-19 18:47:35 +00:00
Alexis La Goutte 08dcc37848 From Colin O'Flynn via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5980
Add draft-ietf-6man-rpl-routing-header-03 Support (RH4 RPL Routing Header)

From me :
* Display Bytes of Address and Full Address (Generated)
* Fix some Whitespace and minor enhance...




svn path=/trunk/; revision=37632
2011-06-09 18:02:13 +00:00
Stig Bjørlykke 516442af8f Prefix "fragments" with IPv6, as is done with IPv4.
svn path=/trunk/; revision=37071
2011-05-12 10:27:30 +00:00
Stig Bjørlykke 84bc28bd6a Introduce "Fragment count" filter element for all protocols doing reassembly.
svn path=/trunk/; revision=35705
2011-01-30 21:01:07 +00:00
Jeff Morriss 61876001c3 Replace some tvb_get_ptr()s with tvb_get_ephemeral_string()s to ensure the
return string is NULL terminated.

There's no need to pass the result of tvb_get_ptr() as the 'value' in
proto_tree_add_*(): just use proto_tree_add_item().

svn path=/trunk/; revision=35548
2011-01-16 03:57:12 +00:00
Guy Harris a8bc4a0d13 Rename the routines that handle dissector tables with unsigned integer
keys to have _uint in their names, to match the routines that handle
dissector tables with string keys.  (Using _port can confuse people into
thinking they're intended solely for use with TCP/UDP/etc. ports when,
in fact, they work better for things such as Ethernet types, where the
binding of particular values to particular protocols are a lot
stronger.)

svn path=/trunk/; revision=35224
2010-12-20 05:35:29 +00:00
Jaap Keuter 57a7873857 Fix for bug 5252:
Use real IPv6 destination address when RH0 has 0 segments left.

svn path=/trunk/; revision=34199
2010-09-23 06:58:55 +00:00
Jeff Morriss 381664535b As suggested by Kovarththanan Rajaratnam in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3548 :
Clean up hf fields some more: mostly removing leading and trailing spaces from names and blurbs.

svn path=/trunk/; revision=34165
2010-09-21 03:14:49 +00:00
Gerald Combs 2f6dd574b7 Display 6to4 gateway IPv4 addresses and SLA IDs.
svn path=/trunk/; revision=33984
2010-08-28 20:55:32 +00:00
Gerald Combs 5fb37af39a De-obfuscate the Teredo client address and add a de-obfuscated port.
svn path=/trunk/; revision=33982
2010-08-28 19:46:20 +00:00
Gerald Combs a3cbcbffb8 Display Teredo encapsulated IPv4 server and client addresses.
svn path=/trunk/; revision=33959
2010-08-27 19:52:17 +00:00
Gerald Combs a875855c39 Display ISATAP encapsulated IPv4 addresses.
svn path=/trunk/; revision=33900
2010-08-24 00:24:44 +00:00
Gerald Combs a766c88c52 Add a "summary in tree" option similar to v4.
svn path=/trunk/; revision=33878
2010-08-21 17:45:03 +00:00