Ethereal-dev: [ethereal-dev] Minor dhcp.flags display patch

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

From: "Michael (Frenchy) Johnston" <mrjohnston@xxxxxxxx>
Date: Wed, 29 Mar 2000 01:11:40 -0800
I sent in full files before.  I should have read the CVS stuff.
Never used CVS before.  Great & simple instructions.  Had no
problems.

As before, the wrong bit pattern was being used to display the
dhcp.flags field.  The old code checked for 0x0100.  The new
code checks for 0x8000, as defined in RFC2131.

Michael
? my.patch
? .cvsrc
Index: packet-bootp.c
===================================================================
RCS file: /cvsroot/ethereal/packet-bootp.c,v
retrieving revision 1.28
diff -u -r1.28 packet-bootp.c
--- packet-bootp.c	2000/03/20 21:39:00	1.28
+++ packet-bootp.c	2000/03/29 09:02:56
@@ -598,7 +598,7 @@
 		proto_tree_add_item(bp_tree, hf_bootp_secs,
 				    offset + 8, 2, pntohs(&pd[offset+8]));
 		proto_tree_add_item(bp_tree, hf_bootp_flag,
-				    offset + 10, 2, pd[offset+10] & 1);
+				    offset + 10, 2, pntohs(&pd[offset+10]) & 0x8000);
 
 		memcpy(&ip_addr, &pd[offset+12], sizeof(ip_addr));
 		proto_tree_add_item(bp_tree, hf_bootp_ip_client, 
@@ -700,7 +700,7 @@
       	"" }},
 
     { &hf_bootp_flag,
-      { "Broadcast flag",	       	"bootp.flag",    FT_UINT16, BASE_DEC, NULL, 0x0,
+      { "Broadcast flag",	       	"bootp.flag",    FT_UINT16, BASE_HEX, NULL, 0x0,
       	"" }},
 
     { &hf_bootp_ip_client,