Ethereal-dev: Re: [ethereal-dev] Regarding EIGRP dissector (patch included)
Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.
From: Paul Ionescu <ipaul@xxxxxxxxx>
Date: Mon, 22 May 2000 12:23:27 +0300
Guy Harris wrote: > If it's encapsulated in more than IP, then it should go into its own > file. > > However, if all the protocols in which it's encapsulated support > "dissector_add()"-style tables, it doesn't have to be global; > unfortunately, IPX and AppleTalk currently don't support them, so, for > now, it'd have to be global. Ok. I will separate the eigrp code in the future. For moment, I did a patch to support AppleTalk and IPX dissectors for EIGRP. Also, I did made just a "packet-eigrp.h" to declare dissect_eigrp() function. Attached to the email are : packet-eigrp.h file a patch for AT and IPX eigrp and a sample capture file of EIGRP Hello for IPX and AT. You may commit it. BTW. What command or option can I give to "cvs diff some.files" to also include in patch the new files which I created ?
Index: ethereal/packet-ipx.c
===================================================================
RCS file: /cvsroot/ethereal/packet-ipx.c,v
retrieving revision 1.58
diff -u -r1.58 packet-ipx.c
--- packet-ipx.c	2000/05/19 19:48:01	1.58
+++ packet-ipx.c	2000/05/22 09:11:10
@@ -41,6 +41,7 @@
 #include "packet-ipx.h"
 #include "packet-nbipx.h"
 #include "packet-ncp.h"
+#include "packet-eigrp.h"
 #include "resolv.h"
 
 #include "packet-snmp.h"
@@ -111,6 +112,9 @@
 static void
 dissect_ipxmsg(const u_char *pd, int offset, frame_data *fd, proto_tree *tree);
 
+static void
+dissect_eigrp_ipx(const u_char *pd, int offset, frame_data *fd, proto_tree *tree);
+
 typedef	void	(dissect_func_t)(const u_char *, int, frame_data *, proto_tree *);
 
 #define UDP_PORT_IPX    213		/* RFC 1234 */
@@ -154,6 +158,7 @@
 #define IPX_SOCKET_ATTACHMATE_GW	0x055d
 #define IPX_SOCKET_IPX_MESSAGE		0x4001
 #define IPX_SOCKET_ADSM                 0x8522 /* www.tivoli.com */
+#define IPX_SOCKET_EIGRP                0x85be /* cisco ipx eigrp */
 #define IPX_SOCKET_WIDE_AREA_ROUTER	0x9001
 #define IPX_SOCKET_SNMP_AGENT           0x900F /* RFC 1906 */
 #define IPX_SOCKET_SNMP_SINK            0x9010 /* RFC 1906 */
@@ -190,6 +195,7 @@
 	{ IPX_SOCKET_TCP_TUNNEL, NULL, "TCP Tunnel" },
 	{ IPX_SOCKET_TCP_TUNNEL, NULL, "TCP Tunnel" },
 	{ IPX_SOCKET_ADSM, NULL, "ADSM" },
+	{ IPX_SOCKET_EIGRP, dissect_eigrp_ipx, "Cisco EIGRP for IPX" },
 	{ IPX_SOCKET_WIDE_AREA_ROUTER, NULL, "Wide Area Router" },
 	{ 0x0000,				NULL,
 				NULL }
@@ -819,6 +825,11 @@
 	}
 }
 
+static void
+dissect_eigrp_ipx(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
+{                                                                                                 
+	dissect_eigrp(pd,offset,fd,tree);                                                                 
+}                                                                                                 
 
 void
 proto_register_ipx(void)
Index: ethereal/packet-ip.c
===================================================================
RCS file: /cvsroot/ethereal/packet-ip.c,v
retrieving revision 1.85
diff -u -r1.85 packet-ip.c
--- packet-ip.c	2000/05/11 08:15:11	1.85
+++ packet-ip.c	2000/05/22 09:11:12
@@ -55,8 +55,8 @@
 #include "llcsaps.h"
 #include "packet-ip.h"
 #include "packet-ipsec.h"
+#include "packet-eigrp.h"
 
-static void dissect_eigrp(const u_char *, int, frame_data *, proto_tree *);
 static void dissect_icmp(const u_char *, int, frame_data *, proto_tree *);
 static void dissect_igmp(const u_char *, int, frame_data *, proto_tree *);
 
@@ -1518,7 +1518,7 @@
 	{ 0,				NULL }    
 };
 
-static void
+void
 dissect_eigrp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
   e_eigrp     ih;
   proto_tree *eigrp_tree;
Index: ethereal/packet-atalk.c
===================================================================
RCS file: /cvsroot/ethereal/packet-atalk.c,v
retrieving revision 1.34
diff -u -r1.34 packet-atalk.c
--- packet-atalk.c	2000/05/11 08:14:55	1.34
+++ packet-atalk.c	2000/05/22 09:11:13
@@ -35,6 +35,7 @@
 #include <glib.h>
 #include "packet.h"
 #include "packet-atalk.h"
+#include "packet-eigrp.h"
 #include "etypes.h"
 #include "ppptypes.h"
 
@@ -104,6 +105,7 @@
 #define DDP_RTMPREQ	0x05
 #define DDP_ZIP		0x06
 #define DDP_ADSP	0x07
+#define DDP_EIGRP	0x58
 #define DDP_HEADER_SIZE 13
 
 gchar *
@@ -132,6 +134,7 @@
   {DDP_RTMPREQ, "AppleTalk Routing Table request"},
   {DDP_ZIP, "AppleTalk Zone Information Protocol packet"},
   {DDP_ADSP, "AppleTalk Data Stream Protocol"},
+  {DDP_EIGRP, "Cisco EIGRP for AppleTalk"},
   {0, NULL}
 };
 
@@ -421,6 +424,9 @@
   offset += DDP_HEADER_SIZE;
 
   switch ( ddp.type ) {
+    case DDP_EIGRP:
+      dissect_eigrp(pd, offset, fd, tree);
+      break;
     case DDP_NBP:
       dissect_nbp(pd, offset, fd, tree);
       break;
/* packet-eigrp.h * * $Id: packet-eigrp.h,v 1.1 2000/02/15 21:02:05 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@xxxxxxxx> * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ void dissect_eigrp(const u_char *, int, frame_data *, proto_tree *);
Attachment:
eigrp.pcap
Description: Binary data
- Follow-Ups:
- Re: [ethereal-dev] Regarding EIGRP dissector (patch included)
- From: Guy Harris
 
 
 - Re: [ethereal-dev] Regarding EIGRP dissector (patch included)
 
- References:
- [ethereal-dev] Regarding EIGRP dissector
- From: Paul Ionescu
 
 - Re: [ethereal-dev] Regarding EIGRP dissector
- From: Guy Harris
 
 
 - [ethereal-dev] Regarding EIGRP dissector
 
- Prev by Date: Re: [ethereal-dev] RE: Correct sniffdecomp.c attached
 - Next by Date: [ethereal-dev] Force a different parsing of a packet, after capture
 - Previous by thread: Re: [ethereal-dev] Regarding EIGRP dissector
 - Next by thread: Re: [ethereal-dev] Regarding EIGRP dissector (patch included)
 - Index(es):
 





