Ethereal-dev: Re: [Ethereal-dev] IrDA dissector plugin

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

From: Jan Kiszka <jan.kiszka@xxxxxx>
Date: Tue, 20 Jan 2004 19:59:17 +0100
Guy Harris schrieb:
On Sun, Jan 18, 2004 at 02:02:55PM +0100, Jan Kiszka wrote:

Ok, I will have a look at it tomorrow - my online connection is too slow where I am today. Are there any changes on surface (item names and ordering), or is it just an internal restructuring?


There are some additional hf_ values for new bitfields in the control
field, and the bitfields are displayed in a different order (the order
"dissect_xdlc_control()" displays them, although that order could be
changed to, for example, go strictly from left to right).

OK, I tried it and everything works fine.

I don't mind this order very much; generally it groups bits of the same byte which somehow belongs together. But I have a patch for the control field dissection string. The display order of P/F and func was swapped, and I personally prefer a more dense view of the values (saves horizontal space on small screens ;) ).

Jan
? xdlc.patch
Index: xdlc.c
===================================================================
RCS file: /cvsroot/ethereal/xdlc.c,v
retrieving revision 1.23
diff -u -r1.23 xdlc.c
--- xdlc.c	18 Jan 2004 08:32:46 -0000	1.23
+++ xdlc.c	20 Jan 2004 09:54:49 -0000
@@ -223,17 +223,18 @@
 	}
 	if (is_extended) {
 	    poll_final = (control & XDLC_P_F_EXT);
-	    sprintf(info, "S%s, %sN(R) = %u", frame_type,
+	    sprintf(info, "S%s, func=%s, N(R)=%u", frame_type,
 		 	(poll_final ?
-		 	    (is_response ? "func = F, " : "func = P, ") :
+		 	    (is_response ? " F" : " P") :
 		 	    ""),
 			(control & XDLC_N_R_EXT_MASK) >> XDLC_N_R_EXT_SHIFT);
 	} else {
 	    poll_final = (control & XDLC_P_F);
-	    sprintf(info, "S%s, %sN(R) = %u", frame_type,
+	    sprintf(info, "S%s, func=%s, N(R)=%u",
 		 	(poll_final ?
-		 	    (is_response ? "func = F, " : "func = P, ") :
+		 	    (is_response ? " F" : " P") :
 		 	    ""),
+		 	frame_type,
 			(control & XDLC_N_R_MASK) >> XDLC_N_R_SHIFT);
 	}
 	if (check_col(pinfo->cinfo, COL_INFO)) {
@@ -292,7 +293,7 @@
 	if (modifier == NULL)
 		modifier = "Unknown";
 	poll_final = (control & XDLC_P_F);
-	sprintf(info, "U%s, func = %s",
+	sprintf(info, "U%s, func=%s",
 		(poll_final ?
 		    (is_response ? " F" : " P") :
 		    ""),
@@ -334,7 +335,7 @@
 	    cf_items = cf_items_ext;
 	    control_format = "Control field: %s (0x%04X)";
 	    poll_final = (control & XDLC_P_F_EXT);
-	    sprintf(info, "I%s, N(R) = %u, N(S) = %u",
+	    sprintf(info, "I%s, N(R)=%u, N(S)=%u",
 			((control & XDLC_P_F_EXT) ? " P" : ""),
 			(control & XDLC_N_R_EXT_MASK) >> XDLC_N_R_EXT_SHIFT,
 			(control & XDLC_N_S_EXT_MASK) >> XDLC_N_S_EXT_SHIFT);
@@ -344,7 +345,7 @@
 	    cf_items = cf_items_nonext;
 	    control_format = "Control field: %s (0x%02X)";
 	    poll_final = (control & XDLC_P_F);
-	    sprintf(info, "I%s, N(R) = %u, N(S) = %u",
+	    sprintf(info, "I%s, N(R)=%u, N(S)=%u",
 			((control & XDLC_P_F) ? " P" : ""),
 			(control & XDLC_N_R_MASK) >> XDLC_N_R_SHIFT,
 			(control & XDLC_N_S_MASK) >> XDLC_N_S_SHIFT);

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature