aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ip.c
diff options
context:
space:
mode:
authorstig <stig@f5534014-38df-0310-8fa8-9805f1628bb7>2010-06-24 11:37:03 +0000
committerstig <stig@f5534014-38df-0310-8fa8-9805f1628bb7>2010-06-24 11:37:03 +0000
commit11eae66d14f2d25e10dd59637e49b19f9e909089 (patch)
tree83ca0756467e52d046dbb9e6e5ec42d80a4cc4b4 /epan/dissectors/packet-ip.c
parent8582f4c6cd7db4d67701efea0dfa8a4b2e3dead3 (diff)
Added description of ECT and ECN-CE, added TFS for the bit values
and some item cleanup. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@33313 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-ip.c')
-rw-r--r--epan/dissectors/packet-ip.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/epan/dissectors/packet-ip.c b/epan/dissectors/packet-ip.c
index f81b5d4bd0..4946dca965 100644
--- a/epan/dissectors/packet-ip.c
+++ b/epan/dissectors/packet-ip.c
@@ -1402,20 +1402,20 @@ dissect_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
"Unknown DSCP"),IPDSFIELD_ECN(iph->ip_tos));
field_tree = proto_item_add_subtree(tf, ett_ip_dsfield);
- proto_tree_add_uint(field_tree, hf_ip_dsfield_dscp, tvb, offset + 1, 1, iph->ip_tos);
- proto_tree_add_uint(field_tree, hf_ip_dsfield_ect, tvb, offset + 1, 1, iph->ip_tos);
- proto_tree_add_uint(field_tree, hf_ip_dsfield_ce, tvb, offset + 1, 1, iph->ip_tos);
+ proto_tree_add_item(field_tree, hf_ip_dsfield_dscp, tvb, offset + 1, 1, ENC_NA);
+ proto_tree_add_item(field_tree, hf_ip_dsfield_ect, tvb, offset + 1, 1, ENC_NA);
+ proto_tree_add_item(field_tree, hf_ip_dsfield_ce, tvb, offset + 1, 1, ENC_NA);
} else {
tf = proto_tree_add_uint_format(ip_tree, hf_ip_tos, tvb, offset + 1, 1, iph->ip_tos,
"Type of service: 0x%02x (%s)", iph->ip_tos,
val_to_str( IPTOS_TOS(iph->ip_tos), iptos_vals, "Unknown") );
field_tree = proto_item_add_subtree(tf, ett_ip_tos);
- proto_tree_add_uint(field_tree, hf_ip_tos_precedence, tvb, offset + 1, 1, iph->ip_tos);
- proto_tree_add_boolean(field_tree, hf_ip_tos_delay, tvb, offset + 1, 1, iph->ip_tos);
- proto_tree_add_boolean(field_tree, hf_ip_tos_throughput, tvb, offset + 1, 1, iph->ip_tos);
- proto_tree_add_boolean(field_tree, hf_ip_tos_reliability, tvb, offset + 1, 1, iph->ip_tos);
- proto_tree_add_boolean(field_tree, hf_ip_tos_cost, tvb, offset + 1, 1, iph->ip_tos);
+ proto_tree_add_item(field_tree, hf_ip_tos_precedence, tvb, offset + 1, 1, ENC_NA);
+ proto_tree_add_item(field_tree, hf_ip_tos_delay, tvb, offset + 1, 1, ENC_NA);
+ proto_tree_add_item(field_tree, hf_ip_tos_throughput, tvb, offset + 1, 1, ENC_NA);
+ proto_tree_add_item(field_tree, hf_ip_tos_reliability, tvb, offset + 1, 1, ENC_NA);
+ proto_tree_add_item(field_tree, hf_ip_tos_cost, tvb, offset + 1, 1, ENC_NA);
}
}
@@ -1757,14 +1757,14 @@ proto_register_ip(void)
NULL, HFILL }},
{ &hf_ip_dsfield_ect,
- { "ECN-Capable Transport (ECT)", "ip.dsfield.ect", FT_UINT8, BASE_DEC, NULL,
+ { "ECN-Capable Transport (ECT)", "ip.dsfield.ect", FT_BOOLEAN, 8, TFS(&tfs_set_notset),
IPDSFIELD_ECT_MASK,
- NULL, HFILL }},
+ "Explicit Congestion Notification Capable Transport", HFILL }},
{ &hf_ip_dsfield_ce,
- { "ECN-CE", "ip.dsfield.ce", FT_UINT8, BASE_DEC, NULL,
+ { "ECN-CE", "ip.dsfield.ce", FT_BOOLEAN, 8, TFS(&tfs_set_notset),
IPDSFIELD_CE_MASK,
- NULL, HFILL }},
+ "Explicit Congestion Notification - Congestion Experienced", HFILL }},
{ &hf_ip_tos,
{ "Type of Service", "ip.tos", FT_UINT8, BASE_DEC, NULL, 0x0,