Ethereal-dev: [Ethereal-dev] Ethereal updates for Art-Net and new ENTTEC and RDM protocols
Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.
From: Erwin Rol <mailinglists@xxxxxxxxxxxx>
Date: Mon, 17 Nov 2003 11:57:20 +0100
Hey all,
attached a patch that updates the Art-Net plugin, and adds two new
protocol dissectors ( ENTTEC and RDM). The RDM dissector is used by the
Art-Net dissector since Art-Net encapsulates RDM frames to send them
over Ethernet (RDM is normally a low level RS485 based protocol). The
ENTTEC plugin is in an initial setup state and at the moment does
nothing much more than compile :-)
- Erwin
--
Erwin Rol Software Engineering - http://www.erwinrol.com/
? plugins/enttec
? plugins/rdm
? plugins/acn/acn.diff
? plugins/acn/acn.dump
? plugins/acn/acn.dump1
Index: Makefile.am
===================================================================
RCS file: /cvsroot/ethereal/Makefile.am,v
retrieving revision 1.651
diff -u -r1.651 Makefile.am
--- Makefile.am 11 Nov 2003 08:29:33 -0000 1.651
+++ Makefile.am 17 Nov 2003 10:46:39 -0000
@@ -473,6 +473,7 @@
plugins/artnet/artnet.la \
plugins/asn1/asn1.la \
plugins/docsis/docsis.la \
+ plugins/enttec/enttec.la \
plugins/giop/cosnaming.la \
plugins/giop/coseventcomm.la \
plugins/gryphon/gryphon.la \
@@ -480,6 +481,7 @@
plugins/megaco/megaco.la \
plugins/mgcp/mgcp.la \
plugins/pcli/pcli.la \
+ plugins/rdm/rdm.la \
plugins/rtnet/rtnet.la
if ENABLE_STATIC
@@ -510,6 +512,7 @@
plugins/docsis/packet-uccreq.o \
plugins/docsis/packet-uccrsp.o \
plugins/docsis/packet-ucd.o \
+ plugins/enttec/packet-enttec.o \
plugins/giop/packet-cosnaming.o \
plugins/giop/packet-coseventcomm.o \
plugins/gryphon/packet-gryphon.o \
@@ -517,6 +520,7 @@
plugins/megaco/packet-megaco.o \
plugins/mgcp/packet-mgcp.o \
plugins/pcli/packet-pcli.o \
+ plugins/rdm/packet-rdm.o \
plugins/rtnet/packet-rtnet.o
plugin_src = \
@@ -546,6 +550,7 @@
plugins/docsis/packet-uccreq.c \
plugins/docsis/packet-uccrsp.c \
plugins/docsis/packet-ucd.c \
+ plugins/enttec/packet-enttec.c \
plugins/giop/packet-cosnaming.c \
plugins/giop/packet-coseventcomm.c \
plugins/gryphon/packet-gryphon.c \
@@ -553,6 +558,7 @@
plugins/megaco/packet-megaco.c \
plugins/mgcp/packet-mgcp.c \
plugins/pcli/packet-pcli.c \
+ plugins/rdm/packet-rdm.c \
plugins/rtnet/packet-rtnet.c
else # ENABLE_STATIC
@@ -562,6 +568,7 @@
"-dlopen" plugins/artnet/artnet.la \
"-dlopen" plugins/asn1/asn1.la \
"-dlopen" plugins/docsis/docsis.la \
+ "-dlopen" plugins/enttec/enttec.la \
"-dlopen" plugins/giop/cosnaming.la \
"-dlopen" plugins/giop/coseventcomm.la \
"-dlopen" plugins/gryphon/gryphon.la \
@@ -569,6 +576,7 @@
"-dlopen" plugins/megaco/megaco.la \
"-dlopen" plugins/mgcp/mgcp.la \
"-dlopen" plugins/pcli/pcli.la \
+ "-dlopen" plugins/rdm/rdm.la \
"-dlopen" plugins/rtnet/rtnet.la
plugin_src =
Index: configure.in
===================================================================
RCS file: /cvsroot/ethereal/configure.in,v
retrieving revision 1.230
diff -u -r1.230 configure.in
--- configure.in 2 Nov 2003 23:36:01 -0000 1.230
+++ configure.in 17 Nov 2003 10:46:41 -0000
@@ -816,12 +816,14 @@
plugins/artnet/Makefile
plugins/asn1/Makefile
plugins/docsis/Makefile
+ plugins/enttec/Makefile
plugins/giop/Makefile
plugins/gryphon/Makefile
plugins/lwres/Makefile
plugins/megaco/Makefile
plugins/mgcp/Makefile
plugins/pcli/Makefile
+ plugins/rdm/Makefile
plugins/rtnet/Makefile
tools/Makefile
tools/lemon/Makefile
Index: plugins/Makefile.am
===================================================================
RCS file: /cvsroot/ethereal/plugins/Makefile.am,v
retrieving revision 1.24
diff -u -r1.24 Makefile.am
--- plugins/Makefile.am 28 Oct 2003 07:02:37 -0000 1.24
+++ plugins/Makefile.am 17 Nov 2003 10:46:50 -0000
@@ -21,7 +21,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-SUBDIRS = acn asn1 artnet docsis giop gryphon lwres megaco mgcp pcli rtnet
+SUBDIRS = acn asn1 artnet docsis enttec giop gryphon lwres megaco mgcp pcli rdm rtnet
plugindir = @plugindir@
Index: plugins/Makefile.nmake
===================================================================
RCS file: /cvsroot/ethereal/plugins/Makefile.nmake,v
retrieving revision 1.27
diff -u -r1.27 Makefile.nmake
--- plugins/Makefile.nmake 28 Oct 2003 07:02:37 -0000 1.27
+++ plugins/Makefile.nmake 17 Nov 2003 10:46:50 -0000
@@ -11,7 +11,7 @@
OBJECTS=plugin_api.obj
-all: $(OBJECTS) acn artnet asn1 docsis giop gryphon lwres megaco mgcp pcli rtnet
+all: $(OBJECTS) acn artnet asn1 docsis giop gryphon lwres megaco mgcp pcli rdm rtnet
Xplugin_api.c: plugin_gen.py plugin_api_list.c
@echo **** Plugin api may be out of date, please generate new files:
@@ -44,6 +44,11 @@
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
cd ..
+enttec::
+ cd enttec
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
+ cd ..
+
giop::
cd giop
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
@@ -74,6 +79,11 @@
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
cd ..
+rdm::
+ cd rdm
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
+ cd ..
+
rtnet::
cd rtnet
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
@@ -89,6 +99,8 @@
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ../docsis
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
+ cd ../enttec
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ../giop
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ../gryphon
@@ -101,15 +113,23 @@
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ../pcli
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
+ cd ../rdm
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ../rtnet
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ..
distclean: clean
- cd artnet
+ cd acn
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
+ cd ../artnet
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
+ cd ../asn1
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
cd ../docsis
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
+ cd ../enttec
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
cd ../giop
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
cd ../gryphon
@@ -121,6 +141,8 @@
cd ../mgcp
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
cd ../pcli
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
+ cd ../rdm
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
cd ../rtnet
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
Index: plugins/artnet/ChangeLog
===================================================================
RCS file: /cvsroot/ethereal/plugins/artnet/ChangeLog,v
retrieving revision 1.2
diff -u -r1.2 ChangeLog
--- plugins/artnet/ChangeLog 24 Aug 2003 01:43:59 -0000 1.2
+++ plugins/artnet/ChangeLog 17 Nov 2003 10:46:50 -0000
@@ -1,16 +1,16 @@
$Id: ChangeLog,v 1.2 2003/08/24 01:43:59 sahlberg Exp $
-
-Overview of changes in Ethereal 0.0.2:
+
+Overview of changes in Art-Net Ethereal plugin:
+
+Version 0.0.3:
+
+* Some small changes in the TOD frames
+* Using RDM dissector for ArtRdm packets
+
+Version 0.0.2
* Number of new packets
* Added strings for several fields
* Use "Art-Net" instead of "ArtNET"
* Number of (endian) bugs fixed
-$Id: ChangeLog,v 1.2 2003/08/24 01:43:59 sahlberg Exp $
-
-Overview of changes in Ethereal 0.0.2:
-* Number of new packets
-* Added strings for several fields
-* Use "Art-Net" instead of "ArtNET"
-* Number of (endian) bugs fixed
Index: plugins/artnet/moduleinfo.h
===================================================================
RCS file: /cvsroot/ethereal/plugins/artnet/moduleinfo.h,v
retrieving revision 1.2
diff -u -r1.2 moduleinfo.h
--- plugins/artnet/moduleinfo.h 24 Aug 2003 01:43:59 -0000 1.2
+++ plugins/artnet/moduleinfo.h 17 Nov 2003 10:46:50 -0000
@@ -13,5 +13,5 @@
#endif
/* Version number of package */
-#define VERSION "0.0.2"
+#define VERSION "0.0.3"
Index: plugins/artnet/packet-artnet.c
===================================================================
RCS file: /cvsroot/ethereal/plugins/artnet/packet-artnet.c,v
retrieving revision 1.4
diff -u -r1.4 packet-artnet.c
--- plugins/artnet/packet-artnet.c 5 Sep 2003 07:44:45 -0000 1.4
+++ plugins/artnet/packet-artnet.c 17 Nov 2003 10:47:00 -0000
@@ -267,25 +267,15 @@
{ 0, NULL }
};
-
-#define ARTNET_TRC_TOD_FULL 0x00
-
static const value_string artnet_tod_request_command_vals[] = {
- { ARTNET_TRC_TOD_FULL, "TodFull" },
{ 0, NULL }
};
#define ARTNET_TDC_TOD_FULL 0x00
-#define ARTNET_TDC_TOD_INVALID 0x01
-#define ARTNET_TDC_TOD_ADD 0x02
-#define ARTNET_TDC_TOD_SUB 0x03
#define ARTNET_TDC_TOD_NAK 0xFF
static const value_string artnet_tod_data_command_vals[] = {
{ ARTNET_TDC_TOD_FULL, "TodFull" },
- { ARTNET_TDC_TOD_INVALID, "Invalid" },
- { ARTNET_TDC_TOD_ADD, "TodAdd" },
- { ARTNET_TDC_TOD_SUB, "TodSubtract" },
{ ARTNET_TDC_TOD_NAK, "TodNak" },
{ 0, NULL }
};
@@ -454,6 +444,7 @@
/* ArtTodData */
static int hf_artnet_tod_data = -1;
+static int hf_artnet_tod_data_port = -1;
static int hf_artnet_tod_data_command_response = -1;
static int hf_artnet_tod_data_address = -1;
static int hf_artnet_tod_data_uid_total = -1;
@@ -503,6 +494,7 @@
/* A static handle for the ip dissector */
static dissector_handle_t ip_handle;
+static dissector_handle_t rdm_handle;
static guint
dissect_artnet_poll(tvbuff_t *tvb, guint offset, proto_tree *tree)
@@ -1128,8 +1120,12 @@
guint8 i,uid_count;
proto_tree_add_item(tree, hf_artnet_filler, tvb,
- offset, 2, FALSE);
- offset += 2;
+ offset, 1, FALSE);
+ offset += 1;
+
+ proto_tree_add_item(tree, hf_artnet_tod_data_port, tvb,
+ offset, 1, FALSE);
+ offset += 1;
proto_tree_add_item(tree, hf_artnet_spare, tvb,
offset, 8, FALSE);
@@ -1189,8 +1185,12 @@
}
static guint
-dissect_artnet_rdm(tvbuff_t *tvb, guint offset, proto_tree *tree)
+dissect_artnet_rdm(tvbuff_t *tvb, guint offset, proto_tree *tree, packet_info *pinfo)
{
+ guint size;
+ gboolean save_info;
+ tvbuff_t *next_tvb = NULL;
+
proto_tree_add_item(tree, hf_artnet_filler, tvb,
offset, 2, FALSE);
offset += 2;
@@ -1207,7 +1207,21 @@
offset, 1, FALSE);
offset += 1;
- return offset;
+ size = tvb_reported_length_remaining(tvb, offset);
+
+ save_info=col_get_writable(pinfo->cinfo);
+ col_set_writable(pinfo->cinfo, FALSE);
+
+ if (!next_tvb)
+ next_tvb = tvb_new_subset(tvb, offset, -1, -1);
+
+ call_dissector(rdm_handle, next_tvb, pinfo, tree);
+
+ col_set_writable(pinfo->cinfo, save_info);
+
+ size = tvb_reported_length_remaining(tvb, offset) - size;
+
+ return offset + size;
}
static guint
@@ -1602,7 +1616,7 @@
FALSE);
si = proto_item_add_subtree(hi,ett_artnet);
- size = dissect_artnet_rdm( tvb, offset, si );
+ size = dissect_artnet_rdm( tvb, offset, si, pinfo );
size -= offset;
proto_item_set_len( si, size );
@@ -1667,6 +1681,9 @@
}
break;
}
+
+
+
}
void
@@ -2371,6 +2388,12 @@
FT_NONE, BASE_NONE, NULL, 0,
"Art-Net ArtTodData packet", HFILL }},
+ { &hf_artnet_tod_data_port,
+ { "Port",
+ "artnet.tod_data.port",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "Port", HFILL }},
+
{ &hf_artnet_tod_data_command_response,
{ "Command Response",
"artnet.tod_data.command_response",
@@ -2576,6 +2599,8 @@
static dissector_handle_t artnet_handle;
ip_handle = find_dissector("ip");
+ rdm_handle = find_dissector("rdm");
+
if(!artnet_initialized) {
artnet_handle = create_dissector_handle(dissect_artnet,proto_artnet);
Attachment:
enttec.tgz
Description: application/tgz
Attachment:
rdm.tgz
Description: application/tgz
- Follow-Ups:
- Prev by Date: Re: [Ethereal-dev] colinfo
- Next by Date: [Ethereal-dev] MUST_DO_SELECT in capture.c
- Previous by thread: Re: [Ethereal-dev] colinfo
- Next by thread: Re: [Ethereal-dev] Ethereal updates for Art-Net and new ENTTEC and RDM protocols
- Index(es):





