Commit Graph

59 Commits

Author SHA1 Message Date
John Thacker 97d59fc20f CFM: Fix check for Management Address [Domain] when Chassis ID Len is 0
According to IEEE 802.1Q 21.5.3.2, if the Chassis ID Length field is 0,
then the Chassis ID Subtype is not present. Thus the number of octets
used for the Chassis ID is 1 (the length field itself) if the length is
0, and 2 plus the length value if the length is > 0.

According to 21.5.3.6, the Management Address Length field should not
be present if the Management Address Domain Length has the value zero.
If it is present anyway (as in the file provided in #13720), handle it
but add an expert info.

Fix #13720
2023-12-29 19:55:44 -05:00
Stig Bjørlykke 2a9bc63325 Remove init of proto variables
Remove init of proto, header field, expert info and subtree variables.
This will reduces the binary size by approximate 1266320 bytes due to
using .bss to zero-initialize the fields.

The conversion is done using the tools/convert-proto-init.py script.
2023-11-20 08:20:54 +01:00
Alexis La Goutte d18193d7f2 cfm: fix typo for tlv senter_id mgmt IPv6 address
'cfm.tlv.sender_id.management_addr.ipv4' exists multiple times with incompatible types: FT_IPv6 and FT_IPv4
2023-09-19 05:17:27 +00:00
Martin Mathieson 011aa3adfd Misc dissector fixes 2023-08-16 18:45:20 +00:00
John Thacker 725c71b0c2 cfm: Test ID TLV has unusual length (bits not octets)
ITU-T G.8013/Y.1731 9.14.2 indicates that the Length field of a
Test ID TLV "must be 32" even though the Value is a 4-octet Test
ID, and IEEE 802.1Q 21.5 "TLV Format" indicates that the "16 bits
of the Length field indicate the size, in octets, of the Value field."

For this specific TLV type, then, if it is 32, treat it as 4 and
add a note.

Fix #19198
2023-07-10 19:28:17 +00:00
Jaap Keuter ec2ca05e15 CFM: overhaul dissector 2023-05-31 07:13:19 +00:00
Jaap Keuter 3e3db6cd3e CFM: Unindent dissector code by restructuring loop conditions
Include missing default switches to handle incorrect protocol values.
2022-03-22 07:37:02 +00:00
Jaap Keuter 6ac2123953 CFM: clean up proto_item encoding, white space and some comments. 2022-02-28 12:29:04 +00:00
João Valverde 8efad466c4 Tools: Fix fix-encoding-args.pl ASCII string validation
Do not require a useless ENC_NA parameter for string encodings.
FT_STRING and FT_STRINGZ types don't have any ndianness.

Follow-up to 6ec429622c.
2022-02-15 11:38:16 +00:00
Jaap Keuter 16e0ba7dd7 CFM: Add 1SL PDU dissection 2022-01-11 17:38:48 +00:00
Jaap Keuter 479175d044 CFM: Add CSF PDU dissection 2022-01-09 10:48:44 +00:00
Martin Mathieson 4a4e50992a More spelling fixes, start of second pass of dissectors.
Now easier to find errors due to script improvements and more complete
dictionary file.
2020-08-30 22:34:34 +01:00
Guy Harris 20800366dd HTTPS (almost) everywhere.
Change all wireshark.org URLs to use https.

Fix some broken links while we're at it.

Change-Id: I161bf8eeca43b8027605acea666032da86f5ea1c
Reviewed-on: https://code.wireshark.org/review/34089
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-07-26 18:44:40 +00:00
Jaap Keuter 8b11de8a03 MPLS: link CFM to designated G-ACh channel type
RFC 6671 allocates a G-ACh channel type to MPLS-TP OAM, which basically
boils down to what is provided in the CFM dissector. Let the CFM
dissector therefore register for this channel type.

Bug: 15887
Change-Id: Ib23b046b3e8d79d4b3d51f10b83892333f593235
Reviewed-on: https://code.wireshark.org/review/33837
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-07-04 03:54:50 +00:00
Dario Lombardo fe219637a6 dissectors: use SPDX identifiers.
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-12 16:49:58 +00:00
Michael Mann cb89fdd1f6 Add support for BASE_OUI
Modeled after BASE_PT_XXX, this will format a FT_UINT24 to look a OUI, in the form of:
XX:XX:XX (Manufacturer Name) for display.
For display filtering, it will treat the value as hexadecimal.

It requires that FT_UINT24 be the field type.

Change-Id: I8716ae4dfcd4e854764a2425e2ff13c50f571d52
Reviewed-on: https://code.wireshark.org/review/23869
Reviewed-by: Richard Sharpe
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-10-15 22:44:47 +00:00
Alexis La Goutte af66f17fb4 cfm: fix 'pinfo' was marked unused but was used [-Wused-but-marked-unused]
Change-Id: I046a37a07cdaad6db2132efbfbbc9dbfa0055bec
Reviewed-on: https://code.wireshark.org/review/23240
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-08-27 19:56:28 +00:00
Gabor Vaszkun 1f44007dd3 Added General Notification Message opcode to CFM
Change-Id: Ieeb3f9ae6b9b261bb68917005d15822197e37b4e
Reviewed-on: https://code.wireshark.org/review/22462
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-06-29 14:26:48 +00:00
Guy Harris 6a14408bf6 Fix typo.
Change-Id: Ie28490c93736c7e95f0b1eaed1e075e61f005e16
Reviewed-on: https://code.wireshark.org/review/18289
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-10-18 20:50:10 +00:00
Joerg Mayer 1489c9e6ff Decode OUI as Ethernet Vendor ID.
Change-Id: I17bca31d383dbbf5c29d7a28f16f4aa0dad9f945
Reviewed-on: https://code.wireshark.org/review/15252
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2016-05-03 10:00:28 +00:00
Michael Mann 31a54708f4 new_register_dissector -> register_dissector for dissector directory.
Change-Id: Ie39ef054a4a942687bd079f3a4d8c2cc55d5f22c
Reviewed-on: https://code.wireshark.org/review/12485
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-09 12:38:06 +00:00
Michael Mann 01f7356f85 register_dissector -> new_register_dissector
Picking off "easy" dissectors that only have one or two exit points at most.

Change-Id: I3d5e576b796556ef070bb36d8b55da0b175dcba8
Reviewed-on: https://code.wireshark.org/review/11805
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-11-13 17:44:24 +00:00
JustinKu 46e5fd833e CFM: fix CFM Type Test signal (TST) without CRC dissection
Bug: 11286
Change-Id: I8efce21e2bab55f9fea50a234419082cdc288f4e
Reviewed-on: https://code.wireshark.org/review/9048
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-06-23 03:52:14 +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 6df5252c2c Add Decode As functionality for MPLS PW Associated Channel Type.
Add CFM and MPLS dissector as possible decoders.

Bug: 10574
Change-Id: Ic39c6b8d68b965ff9d342f5ee789a8eff3134a5a
Reviewed-on: https://code.wireshark.org/review/4935
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-11-12 20:53:45 +00:00
Pascal Quantin a26b751819 CFM: display MEP ID in decimal in OAM Y.1731 Synthetic Loss Message and Reply PDU
Bug: 10500
Change-Id: I70dab8fb86965fedbe8739e265db81fe310518cf
Reviewed-on: https://code.wireshark.org/review/4289
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-09-26 04:12:32 +00:00
Bill Meier 0ec17938fd packet-cfm.c: Update some comments; Add editor modelines.
- Indicate that ITU-T G.8013/Y.1731 (11/2013) is the latest spec
  (and that the cfm dissector has not been updated to reflect same).
- Remove a comment about a "discrepancy in the recommendation
  ITU-T Y.1731". The discrepancy has been corrected in the latest
  spec.

Change-Id: I5a5f873d2a0a5fdee3aef1688403bb317a155cdf
Reviewed-on: https://code.wireshark.org/review/4081
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-11 18:43:59 +00:00
Bill Meier a8fabb94b6 packet-cfm.c: Fix Bug 10385: "Ethernet OAM (CFM) frames including TLV's are wrongly decoded as malformed"
Regression introduced in ga06cccb (svn #50352) [Jul 3 16:43:40 2013]

Bug 10385
Change-Id: I3f5c5518a5804a1f31cac554323a6fa8d3d55d5d
Reviewed-on: https://code.wireshark.org/review/4078
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-11 17:00:26 +00:00
Michael Mann 29ecd114bf convert to proto_tree_add_subtree[_format]
Change-Id: I5f573dffabb8685a8e5a334ff2bfb24d9838daa6
Reviewed-on: https://code.wireshark.org/review/2601
Tested-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-24 23:42:13 +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
Pascal Quantin a59b5388a9 From Andreas Urke via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9091 :
Add support for CFM R-APS/G.8032 version 2

From me: convert a few value_string to true_false_string

svn path=/trunk/; revision=51744
2013-09-03 22:05:22 +00:00
Jakub Zawadzki f4bcbeb9f2 Keep result of [new_]register_dissector in some dissectors. [2 of x]
(don't create new dissector handle if we can use already existing one)

svn path=/trunk/; revision=51159
2013-08-05 19:09:44 +00:00
Alexis La Goutte a06cccbe25 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50352
2013-07-03 16:43:40 +00:00
Anders Broman 43e8a22781 [-Wmissing-prototypes]
Use explicit casts.

svn path=/trunk/; revision=48334
2013-03-15 22:40:15 +00:00
Anders Broman a37c05eb19 Get rid of a non ASCII char.
svn path=/trunk/; revision=45960
2012-11-07 15:04:28 +00:00
Anders Broman 664ae6add7 From Wim Leflere:
Updated the APS dissection and improved the dissection information.

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

svn path=/trunk/; revision=45959
2012-11-07 14:02:15 +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 b18e880040 Update FSF address - part II.
svn path=/trunk/; revision=43538
2012-06-28 23:18:38 +00:00
Chris Maynard c2208aa172 Fix some duplicate display filter names.
svn path=/trunk/; revision=40586
2012-01-19 19:15:13 +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 d65261d344 Use ENC_NA as proto_tree_add_item() encoding arg for FT_ETHER hf[] field type.
(Some minor whitespace cleanup).

svn path=/trunk/; revision=39488
2011-10-20 14:07:54 +00:00
Bill Meier 126aa85393 Convert proto_tree_add_item() 'encoding' arg for field types FT_STRING, FT_STRINGZ, FT_UINT_STRING as follows:
1. If there's no character encoding (ENC_ASCII, ...) specified
    then use ENC_ASCII.
 2. For all but FT_UINT_STRING, always use ENC_NA
    (replacing any existing True/1/FALSE/0
    /ENC_BIG_ENDIAN/ENC_LITTLE_ENDIAN).



svn path=/trunk/; revision=39426
2011-10-15 18:46:26 +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
Anders Broman fc447d3377 Get rid of check_col, while at it set ENC.
svn path=/trunk/; revision=39147
2011-09-26 09:01:17 +00:00
Jaap Keuter c9809b51dc From Peter Nahas:
This patch adds support for the two-way Sythetic Loss Measurement 
opcodes (SLM & SLR) defined in the latest ITU-T Y.1731. 

svn path=/trunk/; revision=37781
2011-06-24 06:49:20 +00:00
Jaap Keuter 48784e79a4 Fix for bug 5517:
MEG ID, ICC-based format is text, not binary.

svn path=/trunk/; revision=35252
2010-12-23 17:45:02 +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
Bill Meier ea1a3de5fc Minor cleanup:
- packet-cfm.h not used elsewhere: incorporate into packet-cfm.c;
- Move proto_register and proto_reg_handoff to the end of the file;
- Localize some variables;
- Remove some unneeded initializers;
- Cleanu some whitesace.

svn path=/trunk/; revision=34334
2010-10-02 14:54:09 +00:00
Bill Meier 055dd62063 #include <string.h> not needed.
svn path=/trunk/; revision=32410
2010-04-06 21:14:01 +00:00
Bill Meier 09764dd969 Remove unneeded #include <stdio.h>
svn path=/trunk/; revision=32367
2010-04-03 21:55:23 +00:00