Make the DOCSIS dissector a built-in dissector.
authorGuy Harris <guy@alum.mit.edu>
Tue, 13 Feb 2018 19:47:23 +0000 (11:47 -0800)
committerGuy Harris <guy@alum.mit.edu>
Tue, 13 Feb 2018 20:15:19 +0000 (20:15 +0000)
Stuff that calls it is built in, and stuff it calls is built in, so
there's not much point in having it be a plugin; we already have
examples of plugin dissectors.

Change-Id: I512e0fda62faedb5f03f476fbece2e267e1d644f
Reviewed-on: https://code.wireshark.org/review/25775
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
17 files changed:
CMakeLists.txt
configure.ac
epan/dissectors/CMakeLists.txt
epan/dissectors/Makefile.am
epan/dissectors/packet-docsis-macmgmt.c [moved from plugins/epan/docsis/packet-macmgmt.c with 99% similarity]
epan/dissectors/packet-docsis-tlv.c [moved from plugins/epan/docsis/packet-tlv.c with 99% similarity]
epan/dissectors/packet-docsis-tlv.h [moved from plugins/epan/docsis/packet-tlv.h with 100% similarity]
epan/dissectors/packet-docsis-vendor.c [moved from plugins/epan/docsis/packet-vendor.c with 100% similarity]
epan/dissectors/packet-docsis.c [moved from plugins/epan/docsis/packet-docsis.c with 99% similarity]
packaging/nsis/wireshark.nsi
packaging/wix/Plugins.wxi
plugins/Makefile.am
plugins/epan/docsis/AUTHORS [deleted file]
plugins/epan/docsis/CMakeLists.txt [deleted file]
plugins/epan/docsis/ChangeLog [deleted file]
plugins/epan/docsis/Makefile.am [deleted file]
plugins/epan/docsis/README [deleted file]

index 22d1e8623edeb0d6144033942685cc034e6b74c5..a84053bf82d92657189bf1661874bfc31e30b952 100644 (file)
@@ -1375,7 +1375,6 @@ if(ENABLE_PLUGINS)
        add_custom_target(plugins)
        set_target_properties(plugins PROPERTIES FOLDER "Plugins")
        set(PLUGIN_SRC_DIRS
-               plugins/epan/docsis
                plugins/epan/ethercat
                plugins/epan/gryphon
                plugins/epan/irda
index de63869854fa1dc4c3c1845dcd59feaa32d7f1da..a1f18a69229963ae22debfd45a299b3eeaf514d5 100644 (file)
@@ -2800,7 +2800,6 @@ AC_CONFIG_FILES(
   packaging/rpm/SPECS/wireshark.spec
   packaging/wix/Makefile
   plugins/Makefile
-  plugins/epan/docsis/Makefile
   plugins/epan/ethercat/Makefile
   plugins/epan/gryphon/Makefile
   plugins/epan/irda/Makefile
index 18e574db6d0ecf5bed980bad986f1558c48b7682..0703f3587dff714d42e63298250c1b09d3beebc3 100644 (file)
@@ -317,6 +317,7 @@ set(DISSECTOR_PUBLIC_HEADERS
        packet-diffserv-mpls-common.h
        packet-disp.h
        packet-dns.h
+       packet-docsis-tlv.h
        packet-dop.h
        packet-dsp.h
        packet-dtls.h
@@ -894,6 +895,10 @@ set(DISSECTOR_SRC
        ${CMAKE_CURRENT_SOURCE_DIR}/packet-dmx.c
        ${CMAKE_CURRENT_SOURCE_DIR}/packet-dnp.c
        ${CMAKE_CURRENT_SOURCE_DIR}/packet-dns.c
+       ${CMAKE_CURRENT_SOURCE_DIR}/packet-docsis.c
+       ${CMAKE_CURRENT_SOURCE_DIR}/packet-docsis-macmgmt.c
+       ${CMAKE_CURRENT_SOURCE_DIR}/packet-docsis-tlv.c
+       ${CMAKE_CURRENT_SOURCE_DIR}/packet-docsis-vendor.c
        ${CMAKE_CURRENT_SOURCE_DIR}/packet-dof.c
        ${CMAKE_CURRENT_SOURCE_DIR}/packet-dplay.c
        ${CMAKE_CURRENT_SOURCE_DIR}/packet-dpnet.c
index 155b7bf742e978bd79770aaf0173f72d17d3f60c..d8c894b92e9dd0d8604eb95a8bfe2bf99ee28784 100644 (file)
@@ -517,6 +517,10 @@ DISSECTOR_SRC = \
        packet-dmx.c            \
        packet-dnp.c            \
        packet-dns.c            \
+       packet-docsis.c         \
+       packet-docsis-macmgmt.c \
+       packet-docsis-tlv.c     \
+       packet-docsis-vendor.c  \
        packet-dof.c            \
        packet-dplay.c          \
        packet-dpnet.c          \
@@ -1563,6 +1567,7 @@ DISSECTOR_INCLUDES = \
        packet-diffserv-mpls-common.h   \
        packet-disp.h           \
        packet-dns.h            \
+       packet-docsis-tlv.h     \
        packet-dop.h            \
        packet-dsp.h            \
        packet-dtls.h           \
similarity index 99%
rename from plugins/epan/docsis/packet-macmgmt.c
rename to epan/dissectors/packet-docsis-macmgmt.c
index 5113f3657ab1c6b5af69ce15960af80ebbc92c69..2bbc6e0ecbeae5bff45f67f3932dcc920fe93d45 100644 (file)
@@ -63,7 +63,7 @@
 #include <epan/packet.h>
 #include <epan/expert.h>
 #include <wsutil/utf8_entities.h>
-#include "packet-tlv.h"
+#include "packet-docsis-tlv.h"
 
 void proto_register_docsis_mgmt(void);
 void proto_reg_handoff_docsis_mgmt(void);
similarity index 99%
rename from plugins/epan/docsis/packet-tlv.c
rename to epan/dissectors/packet-docsis-tlv.c
index 3ab692e8414a27c8c342caf0a7a7c64eed39059a..376be44c24719cb77afc930370071edfd46c478b 100644 (file)
 #include <epan/packet.h>
 #include <epan/expert.h>
 
-#include "packet-tlv.h"
+#include "packet-docsis-tlv.h"
 
 /* This module will dissect the Appendix C TLV's.  Please see:
  * http://www.cablemodem.com/specifications/specifications.html
  *
- * The main dissector is dissect_tlv.  This routine will dissect
+ * The main dissector is dissect_docsis_tlv.  This routine will dissect
  * top level TLV's and call sub-dissectors for the sub-TLV's.
  */
 
@@ -4263,7 +4263,7 @@ dissect_cmts_mc_sess_enc(tvbuff_t * tvb, packet_info* pinfo, proto_tree *tree, i
 
 
 static int
-dissect_tlv (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
+dissect_docsis_tlv (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void* data _U_)
 {
   proto_item *it;
   proto_tree *tlv_tree;
@@ -6487,7 +6487,7 @@ proto_register_docsis_tlv (void)
   expert_docsis_tlv = expert_register_protocol(proto_docsis_tlv);
   expert_register_field_array(expert_docsis_tlv, ei, array_length(ei));
 
-  register_dissector ("docsis_tlv", dissect_tlv, proto_docsis_tlv);
+  register_dissector ("docsis_tlv", dissect_docsis_tlv, proto_docsis_tlv);
 }
 
 void
similarity index 99%
rename from plugins/epan/docsis/packet-docsis.c
rename to epan/dissectors/packet-docsis.c
index 6280ea4728638419c1e84ab220a5fa737423f172..9549620deb3c6b240a9b3da56ac59f19287adfe3 100644 (file)
  * available on Cisco Cable Modem Termination Systems :
  * http://www.cisco.com/univercd/cc/td/doc/product/cable/cab_rout/cmtsfg/ufg_cmon.htm
  *
+ * Captures of DOCSIS 1.1 and DOCSIS 2.0 frames can be facilitated using
+ * the ARRIS Cadant C4 and the ARRIS Cadant C3:
+ * http://www.arrisi.com/products_solutions/product_families/Cadant/index.asp
+ *
  * This dissector depends on the presence of a DOCSIS enapsulation type.
  * There is no simple way to distinguish DOCSIS Frames from Ethernet frames,
  * since the frames are copied from the RF interface on the CMTS to
index c1977f10c8deb771152b6fc3d11431ba58021291..d928107879da4f9cc32c8db1ea17ba477b85eddd 100644 (file)
@@ -1014,7 +1014,6 @@ SectionGroup "Plugins & Extensions" SecPluginsGroup
 Section "Dissector Plugins" SecPlugins
 ;-------------------------------------------
 SetOutPath '$INSTDIR\plugins\${VERSION_MAJOR}.${VERSION_MINOR}\epan'
-File "${STAGING_DIR}\plugins\${VERSION_MAJOR}.${VERSION_MINOR}\epan\docsis.dll"
 File "${STAGING_DIR}\plugins\${VERSION_MAJOR}.${VERSION_MINOR}\epan\ethercat.dll"
 File "${STAGING_DIR}\plugins\${VERSION_MAJOR}.${VERSION_MINOR}\epan\gryphon.dll"
 File "${STAGING_DIR}\plugins\${VERSION_MAJOR}.${VERSION_MINOR}\epan\irda.dll"
index fc9f684ad29c6b65e54b1fe7e187381e3620f720..0c5956505594a4506976e5a41c27fa54b3f81fd3 100644 (file)
@@ -4,9 +4,6 @@
   <!-- Plugins -->
     <Fragment>
         <DirectoryRef Id="dirPluginsVersionEpan">
-            <Component Id="cmpDocsis_dll" Guid="*">
-                <File Id="filDocsis_dll" KeyPath="yes" Source="$(var.Plugins.Dir)\$(var.WiresharkMajorVersion).$(var.WiresharkMinorVersion)\epan\docsis.dll" />
-            </Component>
             <Component Id="cmpEthercat_dll" Guid="*">
                 <File Id="filEthercat_dll" KeyPath="yes" Source="$(var.Plugins.Dir)\$(var.WiresharkMajorVersion).$(var.WiresharkMinorVersion)\epan\ethercat.dll" />
             </Component>
@@ -39,7 +36,6 @@
     </Fragment>
     <Fragment>
         <ComponentGroup Id="CG.Plugins.Dissector">
-            <ComponentRef Id="cmpDocsis_dll" />
             <ComponentRef Id="cmpEthercat_dll" />
             <ComponentRef Id="cmpGryphon_dll" />
             <ComponentRef Id="cmpIrda_dll" />
index 3db6a690ad8b43c98a7c9d3c3f23f81def1e384d..7e56bcf379c72819ee62b5b941f6c2142b941173 100644 (file)
@@ -23,7 +23,6 @@
 
 SUBDIRS = \
        $(_CUSTOM_SUBDIRS_) \
-       epan/docsis             \
        epan/ethercat           \
        epan/gryphon            \
        epan/irda               \
diff --git a/plugins/epan/docsis/AUTHORS b/plugins/epan/docsis/AUTHORS
deleted file mode 100644 (file)
index b9ad1a9..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-Author :
-Anand Narwani <anand[AT]narwani.org>
-Brian Wheeler <brian.wheeler[AT]arrisi.com>
diff --git a/plugins/epan/docsis/CMakeLists.txt b/plugins/epan/docsis/CMakeLists.txt
deleted file mode 100644 (file)
index 63aad88..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-# CMakeLists.txt
-#
-# Wireshark - Network traffic analyzer
-# By Gerald Combs <gerald@wireshark.org>
-# Copyright 1998 Gerald Combs
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-
-include(WiresharkPlugin)
-
-# Plugin name and version info (major minor micro extra)
-set_module_info(docsis 0 0 5 0)
-
-# The sources for the plugin
-set(DISSECTOR_SRC
-       packet-docsis.c
-       packet-macmgmt.c
-       packet-tlv.c
-       packet-vendor.c
-)
-
-set(PLUGIN_FILES
-       plugin.c
-       ${DISSECTOR_SRC}
-)
-
-set(CLEAN_FILES
-       ${PLUGIN_FILES}
-)
-
-set_source_files_properties(
-       ${CLEAN_FILES}
-       PROPERTIES
-       COMPILE_FLAGS "${WERROR_COMMON_FLAGS}"
-)
-
-include_directories(${CMAKE_CURRENT_SOURCE_DIR})
-
-register_plugin_files(plugin.c
-       plugin
-       ${DISSECTOR_SRC}
-)
-
-add_plugin_library(docsis epan)
-
-target_link_libraries(docsis epan)
-
-install_plugin(docsis epan)
-
-file(GLOB DISSECTOR_HEADERS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "*.h")
-CHECKAPI(
-       NAME
-         docsis
-       SWITCHES
-         -g abort -g termoutput -build
-       SOURCES
-         ${DISSECTOR_SRC}
-         ${DISSECTOR_HEADERS}
-)
-
-#
-# Editor modelines  -  http://www.wireshark.org/tools/modelines.html
-#
-# Local variables:
-# c-basic-offset: 8
-# tab-width: 8
-# indent-tabs-mode: t
-# End:
-#
-# vi: set shiftwidth=8 tabstop=8 noexpandtab:
-# :indentSize=8:tabSize=8:noTabs=false:
-#
diff --git a/plugins/epan/docsis/ChangeLog b/plugins/epan/docsis/ChangeLog
deleted file mode 100644 (file)
index 9251dbc..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-Overview of changes in Wireshark DOCSIS Plugin 0.0.2
-* Fixed a number of cosmetic things.
-
-Overview of changes in Wireshark DOCSIS Plugin 0.0.3
-* Added Checks to each TLV Type to validate length. If the length is invalid
- an Exception is thrown.
-* Cleaned up the code in all dissctors so that they are a little more readable.
-
-Overview of changes in Wireshark DOCSIS Plugin 0.0.4
-* Added Support for Baseline Privacy Key Management Messages
-* Added Concatenation Support
-
-Overview of changes in Wireshark DOCSIS Plugin 0.0.5
-* Added Support in packet-tlv.c for SNMPv3 Kickstart TLV's
-* Added Support in packet-tlv.c for Subscriber Management TLV's
diff --git a/plugins/epan/docsis/Makefile.am b/plugins/epan/docsis/Makefile.am
deleted file mode 100644 (file)
index 33200bf..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-# Makefile.am
-#
-# Wireshark - Network traffic analyzer
-# By Gerald Combs <gerald@wireshark.org>
-# Copyright 1998 Gerald Combs
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-include $(top_srcdir)/Makefile.am.inc
-include $(top_srcdir)/plugins/epan/Makefile.am.inc
-
-# the name of the plugin
-PLUGIN_NAME = docsis
-
-PLUGIN_VERSION = 0.0.5
-
-BUILT_SOURCES = \
-       plugin.c
-
-# Non-generated sources to be scanned for registration routines
-NONGENERATED_REGISTER_C_FILES = \
-       packet-docsis.c \
-       packet-macmgmt.c \
-       packet-tlv.c \
-       packet-vendor.c
-
-# Non-generated sources
-NONGENERATED_C_FILES = \
-       $(NONGENERATED_REGISTER_C_FILES)
-
-# Headers.
-CLEAN_HEADER_FILES =   \
-       packet-tlv.h
-
-HEADER_FILES = \
-       $(FLEX_GENERATED_HEADER_FILES) \
-       $(CLEAN_HEADER_FILES)
-
-epan_plugin_LTLIBRARIES = docsis.la
-
-docsis_la_SOURCES = \
-       $(SRC_FILES)    \
-       $(HEADER_FILES)
-
-nodist_docsis_la_SOURCES = \
-       plugin.c
-
-docsis_la_CPPFLAGS = $(AM_CPPFLAGS) $(PLUGIN_CPPFLAGS)
-
-docsis_la_CFLAGS = $(AM_CFLAGS) $(PLUGIN_CFLAGS)
-
-docsis_la_LDFLAGS = $(PLUGIN_LDFLAGS)
-
-DISTCLEANFILES = \
-       plugin.c
-
-EXTRA_DIST = \
-       README                  \
-       CMakeLists.txt
diff --git a/plugins/epan/docsis/README b/plugins/epan/docsis/README
deleted file mode 100644 (file)
index 2e083a8..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-
-Overview:
-=========
-The dissectors provided by this plugin allow the dissection of DOCSIS 1.1
-Frames.  Captures of DOCSIS 1.1 frames can be facilitated using Cisco's 
-Cable Monitor Features found on Cicso UBR7200 and UBR10000 Series Cable Modem 
-Termination Systems.  Captures of DOCSIS 1.1 and DOCSIS 2.0 frames can be
-facilitated using the ARRIS Cadant C4 and the ARRIS Cadant C3.
-
-Features:
-=========
-+ Decode the DOCSIS header + Extended Header.  For Data PDU's it will 
-  automatically decode as far up the stack that it can. 
-+ Decode Mac Management Header. The following Mac Messages 
-  are decoded at present: 
-       REG-REQ 
-       REG-RSP 
-       REG-ACK 
-       RNG-REQ 
-       RNG-RSP 
-       UCC-REQ 
-       UCC-RSP 
-       UCD Messages 
-       MAP Messages 
-       DSA-REQ 
-       DSA-RSP 
-       DSA-ACK 
-       DSC-REQ 
-       DSC-RSP 
-       DSC-ACK 
-       DSD-REQ 
-       DSD-RSP
-       BPKM-REQ
-       BPKM-RSP
-       BPKM Attributes
-+ Decode All Appendix C TLV's
-+ Decode Concatenated Frames via a recursive call to dissect_docsis()
-+ Decode DOCSIS 2.0 packets including:
-        Type 29 UCD Messages (DOCSIS 2.0 only)
-       INT-RNG-REQ
-       
-References:
-===========
-DOCSIS 1.1 and DOCSIS 2.0 Specifications can be found at:
-http://www.cablemodem.com/specifications.html
-
-Information on Cisco's Cable Monitor Feature can be found at:
-http://www.cisco.com/univercd/cc/td/doc/product/cable/cab_rout/cmtsfg/ufg_cmon.htm
-
-Information on the ARRIS Cadant line of products
-http://www.arrisi.com/products_solutions/product_families/Cadant/index.asp