Ethereal-dev: [Ethereal-dev] Patch to packet-ppp.c

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "PELLE Thierry FTRD/DAC/ISS" <thierry.pelle@xxxxxxxxxxxxxxxxxxxx>
Date: Fri, 7 Feb 2003 10:40:03 +0100
Hi,
	here is a patch to packet-ppp.c which apply some modifications
to IPV6CP dissector
Thierry

--- /root/packet-ppp.c	Tue Feb  4 17:30:17 2003
+++ ethereal-2003-02-04/packet-ppp.c	Wed Jan 29 00:56:39 2003
@@ -154,7 +154,7 @@
 
 static gint ett_ipv6cp = -1;
 static gint ett_ipv6cp_options = -1;
-static gint ett_ipv6cp_if_id_opt = -1;
+static gint ett_ipv6cp_if_token_opt = -1;
 static gint ett_ipv6cp_compressprot_opt = -1;  
 
 /*
@@ -1296,21 +1296,21 @@
 /*
  * Options.  (IPv6CP)
  */
-#define CI_IPV6CP_IF_ID	1	/* Interface Identifier (RFC
2472) */
+#define CI_IPV6CP_IF_TOKEN	1	/* Interface Token (RFC 2472) */
 #define CI_IPV6CP_COMPRESSTYPE	2	/* Compression Type (RFC 2472)
*/
 
-static void dissect_ipv6cp_if_id_opt(const ip_tcp_opt *optp, tvbuff_t
*tvb,
+static void dissect_ipv6cp_if_token_opt(const ip_tcp_opt *optp,
tvbuff_t *tvb,
 			int offset, guint length, packet_info *pinfo,
 			proto_tree *tree);
 
 static const ip_tcp_opt ipv6cp_opts[] = {
 	{
-		CI_IPV6CP_IF_ID,
-		"Interface Identifier",
-		&ett_ipv6cp_if_id_opt,
+		CI_IPV6CP_IF_TOKEN,
+		"Interface Token",
+		&ett_ipv6cp_if_token_opt,
 		FIXED_LENGTH,
 		10,
-		dissect_ipv6cp_if_id_opt
+		dissect_ipv6cp_if_token_opt
 	},
 	{
 		CI_COMPRESSTYPE,
@@ -3194,11 +3194,11 @@
 	     ipv6cp_opts, N_IPV6CP_OPTS, pinfo, tree);
 }
 
-static void dissect_ipv6cp_if_id_opt(const ip_tcp_opt *optp, tvbuff_t
*tvb,
+static void dissect_ipv6cp_if_token_opt(const ip_tcp_opt *optp,
tvbuff_t *tvb,
 			int offset, guint length, packet_info *pinfo
_U_,
 			proto_tree *tree)
 {
-  proto_tree_add_text(tree, tvb, offset, length, "%s:
%02x%02x:%02x%02x:%02x%x:%02x%02x",
+  proto_tree_add_text(tree, tvb, offset, length, "%s:
%x:%x:%x:%x:%x:%x:%x:%x",
 		      optp->name,
 		      tvb_get_guint8(tvb, offset + 2),
 		      tvb_get_guint8(tvb, offset + 3),
@@ -3744,7 +3744,7 @@
   static gint *ett[] = {
     &ett_ipv6cp,
     &ett_ipv6cp_options,
-    &ett_ipv6cp_if_id_opt,
+    &ett_ipv6cp_if_token_opt,
     &ett_ipv6cp_compressprot_opt,
   };