Commit Graph

60 Commits

Author SHA1 Message Date
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
Michael Mann 3d3f97320b Replace ip_to_str with [ep_]address_to_str and tvb_ip_to_str.
Change-Id: I40d0c8253743183aecef252040b7dd6742ae5c71
Reviewed-on: https://code.wireshark.org/review/5934
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-26 21:17:10 +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
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
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
Peter Wu f2b4daf400 Add printf-format annotations, fix garbage
The WRETH dissector showed up some garbage in the column display. Upon
further inspection, it turns out that the format string had a trailing
percent sign which caused (unsigned)-1 to be returned by
g_printf_string_upper_bound (in emem_strdup_vprintf). Then ep_alloc is
called with (unsigned)-1 + 1 = 0 memory, no wonder that garbage shows
up. ASAN could not even catch this error because EP is in charge of
this.

So, start adding G_GNUC_PRINTF annotations in each header that uses
the "fmt" or "format" paramters (grepped + awk). This revealed some
other errors. The NCP2222 dissector was missing a format string (not
a security vuln though).

Many dissectors used val_to_str with a constant (but empty) string,
these have been replaced by val_to_str_const. ASN.1 dissectors
were regenerated for this.

Minor: the mate plugin used "%X" instead of "%p" for a pointer type.

The ncp2222 dissector and wimax plugin gained modelines.

Change-Id: I7f3f6a3136116f9b251719830a39a7b21646f622
Reviewed-on: https://code.wireshark.org/review/2881
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-06 23:00:40 +00:00
Evan Huus 08ce84ebbe Grab-bag of dead initializers and two actual bugs.
All caught by cppcheck. The two (semi)-interesting bugs are:
- in asn1/atn-cpdlc/packet-atn-cpdlc-template.c where the break statement should
  have been inside the brace, causing potential control-flow weirdness with
  exceptions
- in epan/dissectors/packet-ieee80211.c where the bounds check for tag_len did
  not match the expert info given

Change-Id: Ie173fb8d917aabb9b4571435d671d6f16e1c7569
Reviewed-on: https://code.wireshark.org/review/1793
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-05-25 18:12:00 +00:00
Alexis La Goutte de29a8dd68 LISP : error: declaration of 'address' shadows a global declaration [-Werror=shadow]
Change-Id: I3f490ec40ae3241e9836e0914d43424ff9565fb5
Reviewed-on: https://code.wireshark.org/review/1744
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-05-23 15:08:42 +00:00
Lorand Jakab c94987d5c7 Dissect Nonce Locator LCAF
Change-Id: I23f05cf3a0bc43baac4c4c31f5ce0dc0dffcade1
Signed-off-by: Lorand Jakab <ljakab@ac.upc.edu>
Reviewed-on: https://code.wireshark.org/review/1745
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-05-23 15:08:14 +00:00
Lorand Jakab 839339015c Dissect AS Number LCAF
Change-Id: I03c839a23c037a4d7da63d74e5407f0470301697
Signed-off-by: Lorand Jakab <ljakab@ac.upc.edu>
Reviewed-on: https://code.wireshark.org/review/1742
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-23 13:16:34 +00:00
Lorand Jakab a15098800c Dissect Multicast Group Membership Information LCAF
Bug: 10126
Change-Id: I81d643978d663d6905070d3cd7e751286c316fcd
Signed-off-by: Lorand Jakab <ljakab@ac.upc.edu>
Reviewed-on: https://code.wireshark.org/review/1716
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-05-21 17:21:15 +00:00
Lorand Jakab 3a60f8df42 LISP: Add support for MAC address AFI
Change-Id: I105ba5a9623d482c912c94d2c21a1c02d869db56
Signed-off-by: Lorand Jakab <ljakab@ac.upc.edu>
Reviewed-on: https://code.wireshark.org/review/1715
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-05-21 17:09:04 +00:00
Lorand Jakab 87573a6561 Dissect Replication List Entries LCAF
Bug: 10124
Change-Id: Ided4fff8259bbf1b5cb4b5209be6e3931ab09fe5
Signed-off-by: Lorand Jakab <ljakab@ac.upc.edu>
Reviewed-on: https://code.wireshark.org/review/1711
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-05-21 13:03:14 +00:00
Lorand Jakab 93630b591b Add value to correct tree in Key/Value LCAF
Change-Id: Icd4ae54bff25e30406c70739c6c799db2484255b
Signed-off-by: Lorand Jakab <ljakab@ac.upc.edu>
Reviewed-on: https://code.wireshark.org/review/1713
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-05-21 12:05:37 +00:00
Lorand Jakab 5d8c3cc450 Dissect Source/Destination 2-Tuple Lookups LCAF
Change-Id: I0e8595ab5cf5385a7fda636a1804b0788f9eb869
Signed-off-by: Lorand Jakab <ljakab@ac.upc.edu>
Reviewed-on: https://code.wireshark.org/review/1707
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-05-21 02:49:32 +00:00
Lorand Jakab c7cea8f233 Update ELP LCAF dissection to new draft revision
There was a change in the ELP LCAF packet format between
draft-ietf-lisp-lcaf revisions -03 and -04 reversing the flags and AFI
fields, to be more consistent with other LCAF types.

    http://tools.ietf.org/rfcdiff?difftype=--hwdiff&url2=draft-ietf-lisp-lcaf-04.txt

Change-Id: I2c572050f413696f2d388969e7db24238783bd56
Signed-off-by: Lorand Jakab <ljakab@ac.upc.edu>
Reviewed-on: https://code.wireshark.org/review/1704
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-05-20 18:35:38 +00:00
Lorand Jakab e9f5dcf46f Dissect Key/Value Address Pair LCAF
Change-Id: Ic1640a823816c5cd225c573147ff9b6b8c88879e
Signed-off-by: Lorand Jakab <ljakab@ac.upc.edu>
Reviewed-on: https://code.wireshark.org/review/1702
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-20 16:23:29 +00:00
Lorand Jakab 7aebb0cec9 Fix issues reported by clang-analyzer
Change-Id: Iefb52c674be99af167eef7b2eba249607c1dfefd
Signed-off-by: Lorand Jakab <ljakab@ac.upc.edu>
Reviewed-on: https://code.wireshark.org/review/1406
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-28 06:25:59 +00:00
Lorand Jakab 742acca3f8 Dissect all details in NAT-T LCAF type...
... and remove last remaining proto_tree_add_text() calls!

Change-Id: I22e5446a06c22ba1f30f342b21f7676641a7f2e7
Signed-off-by: Lorand Jakab <ljakab@ac.upc.edu>
Reviewed-on: https://code.wireshark.org/review/1352
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-04-26 02:00:43 +00:00
Lorand Jakab 1c024bc29a Dissect all details in ELP LCAF type...
... and remove more of the remaining proto_tree_add_text() calls.

Change-Id: I0286af7fd6953b9276c15b3e7ce7d80c1bd39e8a
Signed-off-by: Lorand Jakab <ljakab@ac.upc.edu>
Reviewed-on: https://code.wireshark.org/review/1350
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-25 14:07:25 +00:00
Lorand Jakab 93a853f4b2 Fix encodings (found by fix-encoding-args.pl)
Change-Id: I9bbdf61b6ac0b24dea4993f07b2608538ef220b2
Signed-off-by: Lorand Jakab <ljakab@ac.upc.edu>
Reviewed-on: https://code.wireshark.org/review/1336
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-25 06:22:21 +00:00
Lorand Jakab 11d77dab0f Improve Instance ID LCAF type handling
Change-Id: I66b1f4746b67ff88c56c4127647c4baa2d504a93
Signed-off-by: Lorand Jakab <ljakab@ac.upc.edu>
Reviewed-on: https://code.wireshark.org/review/1325
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-24 14:16:16 +00:00
AndersBroman 3f569932d8 Fix warning: declaration of 'address' shadows a global declaration.
Change-Id: I0be594aca0e8fac3c55492f6c168b0b8c13e63e5
Reviewed-on: https://code.wireshark.org/review/1324
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-24 08:54:47 +00:00
Lorand Jakab f37116aa92 Add support for Geo Coordinates LCAF type
Additionally, improve the way LCAF top-level tree item shows details
from the information gathered later, including for AFI List LCAF types.
For someone interested just in the summary from an LCAF type, this can
save one or two clicks opening subrees.

Change-Id: I40ea05ddf922bcb2a2a934f5e791f87133ca32cc
Signed-off-by: Lorand Jakab <ljakab@ac.upc.edu>
Reviewed-on: https://code.wireshark.org/review/1323
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-24 08:22:11 +00:00
Alexis La Goutte bf2d8f96da Fix Warning: Found soft-deprecated APIs in epan/dissectors/packet-lisp.c: tvb_length
and also fix warning found by fix-encodings-args

Change-Id: I20193d9f2700e8ede439dcc848390ff7672239b3
Reviewed-on: https://code.wireshark.org/review/1318
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-04-24 06:48:35 +00:00
Lorand Jakab 8759da846f Improve LCAF handling
Also, remove some more proto_tree_add_text() occurrences.

Change-Id: Ie46e16308b95f190229c22d06c5235ea3464394a
Signed-off-by: Lorand Jakab <ljakab@ac.upc.edu>
Reviewed-on: https://code.wireshark.org/review/1317
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-24 05:57:16 +00:00
Lorand Jakab d41a6e4feb Fix LISP dissectior regressions introduced in 1.11
This patch fixes dissection of some fields and restores some of the
output before the dissector was updated not to use proto_tree_add_text()
calls.

While at it improve the consistency in the code.

Change-Id: Ic30e60de1382f4325bd75e814444205f2fc5a359
Signed-off-by: Lorand Jakab <ljakab@ac.upc.edu>
Reviewed-on: https://code.wireshark.org/review/1283
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-04-23 06:56:08 +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
Jakub Zawadzki 1053e722ed Fix warnings
svn path=/trunk/; revision=54089
2013-12-14 12:45:57 +00:00
Jakub Zawadzki 1899903f69 Include <epan/to_str.h> only when needed.
svn path=/trunk/; revision=53189
2013-11-09 13:41:10 +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 9e3f9b449f expert_add_info_format_text -> expert_add_info_format
svn path=/trunk/; revision=51852
2013-09-09 00:44:09 +00:00
Michael Mann 5405b34469 Batch of filterable expert info.
svn path=/trunk/; revision=51688
2013-09-02 23:32:31 +00:00
Michael Mann 1f4f0d535a Remove expert_add_undecoded_item in favor of proto_tree_add_expert.
svn path=/trunk/; revision=51632
2013-09-01 16:41:29 +00:00
Alexis La Goutte c617a6a64b Enhance LISP Dissector (Mapping, Locator and Record type...)
Convert proto_tree_add_text calls to proto_tree_add_item

(the end of my original commit...)

svn path=/trunk/; revision=51187
2013-08-07 13:44:44 +00:00
Jeff Morriss 0995eb9edd Remove some set-but-no-longer-used variables.
svn path=/trunk/; revision=51186
2013-08-07 13:26:05 +00:00
Martin Mathieson 9b85c5b17f Try to fix build by removing proto_tree_add_text() call replaced by items
svn path=/trunk/; revision=51185
2013-08-07 12:56:39 +00:00
Alexis La Goutte b4beea213f Enhance LISP Dissector (Mapping, Locator and Record type...)
Convert proto_tree_add_text calls to proto_tree_add_item

svn path=/trunk/; revision=51183
2013-08-07 12:05:11 +00:00
Jakub Zawadzki 5fa2a99087 Keep result of [new_]register_dissector in some dissectors.
svn path=/trunk/; revision=51156
2013-08-05 18:09:43 +00:00
Jeff Morriss 0d75d64949 From Lorand Jakab via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8852 :
The I and R flags in Map-Notify LISP control packets are shown at an incorrect
position.  The attached patch fixes the bug.

svn path=/trunk/; revision=50210
2013-06-28 12:52:19 +00:00
Michael Mann e5fe6b1dca LISP control packet incorrectly identified as LISP data based when UDP source port is 4341. Bug 8627 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8627)
Also did some minor cleanup/improvements while I was there.

svn path=/trunk/; revision=49154
2013-05-04 02:20:59 +00:00
Pascal Quantin 1a37ac1aa7 From Loránd Jakab via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8578 :
Fix LISP site-ID dissection bug

svn path=/trunk/; revision=48836
2013-04-13 14:56:19 +00:00
Alexis La Goutte 0e3bb34fba From Loránd Jakab via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8555 More features for the Locator/ID Separation Protocol (LISP) dissector
This patch adds support in the LISP dissector for the following:

* dissect Map-Referral packet subtype
* dissect individual fields in mapping records, which are now filterable
* some code cleanup

The NAT traversal draft added another field to go together with the xTR-ID, the site-ID field.
Add support for this field as well.

svn path=/trunk/; revision=48772
2013-04-07 17:08:46 +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
Jakub Zawadzki 5a8783f5b1 Initial commit to support yet another method of passing data between dissectors.
Add new parameter 'data' to heur_dissector_t and new_dissector_t, for now it's always NULL

svn path=/trunk/; revision=44860
2012-09-10 21:40:21 +00:00
Guy Harris c2a8aa2bee Put the state of flags in the hop_flags field into the summary line.
Note in the introductory comment what "LISP" refers to, for the benefit
of those of us who grew up thinking it stood for "LISt Processing".

svn path=/trunk/; revision=44617
2012-08-22 21:01:46 +00:00
Pascal Quantin ae7d61bd1c Try to make Ubuntu buildbot happy
svn path=/trunk/; revision=44615
2012-08-22 20:15:54 +00:00
Pascal Quantin 7210419f96 From Loránd Jakab via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7654:
Add features to the Locator/ID Separation Protocol (LISP) dissector

svn path=/trunk/; revision=44613
2012-08-22 16:37:41 +00:00
Michael Mann 4108285179 fix subtle g_strdup_printf() memory leaks with ephemeral memory
svn path=/trunk/; revision=44491
2012-08-14 16:29:38 +00:00