diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2004-02-18 06:43:01 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2004-02-18 06:43:01 +0000 |
commit | 08b74df5556dc509c179cd7e5497a95c08c89b08 (patch) | |
tree | ffd2d8cfbf4e37854db91e959831c632b330441f | |
parent | 9b0f50a0c646f3fbc4aa20c3ea1d215af4caa978 (diff) |
From Nick Black: the 0x8000 bit in the flags field is *NOT* a
"congestion" bit for ECN. Show it as a reserved bit.
Put semicolons, not commas, at the end of the calls to put flags field
bits into the protocol tree.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10087 f5534014-38df-0310-8fa8-9805f1628bb7
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | doc/ethereal.pod | 3 | ||||
-rw-r--r-- | packet-ip.c | 20 |
3 files changed, 16 insertions, 8 deletions
@@ -2075,6 +2075,7 @@ And assorted fixes and enhancements by the people listed above and by: Peter J. Creath <peter-ethereal [AT] creath.net> Magnus Hansson <mah [AT] hms.se> Pavel Kankovsky <kan [AT] dcit.cz> + Nick Black <dank [AT] reflexsecurity.com> Alain Magloire <alainm[AT]rcsm.ece.mcgill.ca> was kind enough to give his permission to use his version of snprintf.c. diff --git a/doc/ethereal.pod b/doc/ethereal.pod index bc70d7d00b..cff9fee735 100644 --- a/doc/ethereal.pod +++ b/doc/ethereal.pod @@ -2087,6 +2087,7 @@ B<http://www.ethereal.com>. Martin Mathieson <martin [AT] arca-technologies.com> Rolf Fiedler <Rolf.Fiedler [AT] Innoventif.com> Christian Wagner <Christian.Wagner [AT] stud.uni-karlsruhe.de> + Edwin Calo <calo [AT] fusemail.com> Pavel Roskin <proski [AT] gnu.org> Georgi Guninski <guninski [AT] guninski.com> Jason Copenhaver <jcopenha [AT] typedef.org> @@ -2127,7 +2128,7 @@ B<http://www.ethereal.com>. Peter J. Creath <peter-ethereal [AT] creath.net> Magnus Hansson <mah [AT] hms.se> Pavel Kankovsky <kan [AT] dcit.cz> - Edwin Calo <calo [AT] fusemail.com> + Nick Black <dank [AT] reflexsecurity.com> Alain Magloire <alainm[AT]rcsm.ece.mcgill.ca> was kind enough to give his permission to use his version of snprintf.c. diff --git a/packet-ip.c b/packet-ip.c index f43f977a28..3812bba191 100644 --- a/packet-ip.c +++ b/packet-ip.c @@ -1,7 +1,7 @@ /* packet-ip.c * Routines for IP and miscellaneous IP protocol packet disassembly * - * $Id: packet-ip.c,v 1.201 2003/11/13 08:16:52 sahlberg Exp $ + * $Id: packet-ip.c,v 1.202 2004/02/18 06:43:00 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -84,6 +84,7 @@ static int hf_ip_dst = -1; static int hf_ip_src = -1; static int hf_ip_addr = -1; static int hf_ip_flags = -1; +static int hf_ip_flags_rf = -1; static int hf_ip_flags_df = -1; static int hf_ip_flags_mf = -1; static int hf_ip_frag_offset = -1; @@ -220,7 +221,7 @@ static gint ett_icmp_mip_flags = -1; #define IPH_MIN_LEN 20 /* IP flags. */ -#define IP_CE 0x8000 /* Flag: "Congestion" */ +#define IP_RF 0x8000 /* Flag: "Reserved bit" */ #define IP_DF 0x4000 /* Flag: "Don't Fragment" */ #define IP_MF 0x2000 /* Flag: "More Fragments" */ #define IP_OFFSET 0x1FFF /* "Fragment Offset" part */ @@ -927,11 +928,12 @@ dissect_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) iph->ip_off = tvb_get_ntohs(tvb, offset + 6); if (tree) { - flags = (iph->ip_off & (IP_DF|IP_MF)) >> 12; + flags = (iph->ip_off & (IP_RF | IP_DF | IP_MF)) >> 12; tf = proto_tree_add_uint(ip_tree, hf_ip_flags, tvb, offset + 6, 1, flags); field_tree = proto_item_add_subtree(tf, ett_ip_off); - proto_tree_add_boolean(field_tree, hf_ip_flags_df, tvb, offset + 6, 1, flags), - proto_tree_add_boolean(field_tree, hf_ip_flags_mf, tvb, offset + 6, 1, flags), + proto_tree_add_boolean(field_tree, hf_ip_flags_rf, tvb, offset + 6, 1, flags); + proto_tree_add_boolean(field_tree, hf_ip_flags_df, tvb, offset + 6, 1, flags); + proto_tree_add_boolean(field_tree, hf_ip_flags_mf, tvb, offset + 6, 1, flags); proto_tree_add_uint(ip_tree, hf_ip_frag_offset, tvb, offset + 6, 2, (iph->ip_off & IP_OFFSET)*8); @@ -1633,12 +1635,16 @@ proto_register_ip(void) { "Flags", "ip.flags", FT_UINT8, BASE_HEX, NULL, 0x0, "", HFILL }}, + { &hf_ip_flags_rf, + { "Reserved bit", "ip.flags.rb", FT_BOOLEAN, 4, TFS(&flags_set_truth), IP_RF >> 12, + "", HFILL }}, + { &hf_ip_flags_df, - { "Don't fragment", "ip.flags.df", FT_BOOLEAN, 4, TFS(&flags_set_truth), IP_DF>>12, + { "Don't fragment", "ip.flags.df", FT_BOOLEAN, 4, TFS(&flags_set_truth), IP_DF >> 12, "", HFILL }}, { &hf_ip_flags_mf, - { "More fragments", "ip.flags.mf", FT_BOOLEAN, 4, TFS(&flags_set_truth), IP_MF>>12, + { "More fragments", "ip.flags.mf", FT_BOOLEAN, 4, TFS(&flags_set_truth), IP_MF >> 12, "", HFILL }}, { &hf_ip_frag_offset, |