diff options
author | Ulf Lamping <ulf.lamping@web.de> | 2005-07-08 22:11:13 +0000 |
---|---|---|
committer | Ulf Lamping <ulf.lamping@web.de> | 2005-07-08 22:11:13 +0000 |
commit | 2c30357c483da1238bfd45455272db93a2ec65c9 (patch) | |
tree | c7f025f042af2c3d960b0a9194442ab8ac8e93f0 /epan | |
parent | 6b0815ee9cf23c43525c26814bf81a934e0120f2 (diff) |
checksum messages: use "[correct]" instead of "(correct)" and other "alike" messages
svn path=/trunk/; revision=14880
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-dnp.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-eth.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-gprs-llc.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-gre.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-icmpv6.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-ieee80211.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-igmp.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-ip.c | 13 | ||||
-rw-r--r-- | epan/dissectors/packet-isis-hello.c | 8 | ||||
-rw-r--r-- | epan/dissectors/packet-isis-lsp.c | 8 | ||||
-rw-r--r-- | epan/dissectors/packet-isis-snp.c | 8 | ||||
-rw-r--r-- | epan/dissectors/packet-lmp.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-ospf.c | 26 | ||||
-rw-r--r-- | epan/dissectors/packet-pgm.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-pim.c | 8 | ||||
-rw-r--r-- | epan/dissectors/packet-ppp.c | 8 | ||||
-rw-r--r-- | epan/dissectors/packet-rsvp.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-tcp.c | 14 | ||||
-rw-r--r-- | epan/dissectors/packet-vrrp.c | 4 |
19 files changed, 71 insertions, 66 deletions
diff --git a/epan/dissectors/packet-dnp.c b/epan/dissectors/packet-dnp.c index 295acf1cfc..ecbdeb83ea 100644 --- a/epan/dissectors/packet-dnp.c +++ b/epan/dissectors/packet-dnp.c @@ -1887,13 +1887,13 @@ dissect_dnp3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) calc_dl_crc = calculateCRC(tvb_get_ptr(tvb, 0, DNP_HDR_LEN - 2), DNP_HDR_LEN - 2); if (dl_crc == calc_dl_crc) proto_tree_add_uint_format(dl_tree, hf_dnp_hdr_CRC, tvb, offset, 2, - dl_crc, "CRC: 0x%04x (correct)", dl_crc); + dl_crc, "CRC: 0x%04x [correct]", dl_crc); else { proto_tree_add_boolean_hidden(dl_tree, hf_dnp_hdr_CRC_bad, tvb, offset, 2, TRUE); proto_tree_add_uint_format(dl_tree, hf_dnp_hdr_CRC, tvb, - offset, 2, dl_crc, "CRC: 0x%04x (incorrect, should be 0x%04x)", + offset, 2, dl_crc, "CRC: 0x%04x [incorrect, should be 0x%04x]", dl_crc, calc_dl_crc); } offset += 2; diff --git a/epan/dissectors/packet-eth.c b/epan/dissectors/packet-eth.c index 02eb724bbc..d0dfa6667e 100644 --- a/epan/dissectors/packet-eth.c +++ b/epan/dissectors/packet-eth.c @@ -388,11 +388,11 @@ add_ethernet_trailer(proto_tree *fh_tree, int trailer_id, tvbuff_t *tvb, guint32 fcs = crc32_802_tvb(tvb, tvb_length(tvb) - 4); if (fcs == sent_fcs) { proto_tree_add_text(fh_tree, trailer_tvb, trailer_length, 4, - "Frame check sequence: 0x%08x (correct)", + "Frame check sequence: 0x%08x [correct]", sent_fcs); } else { proto_tree_add_text(fh_tree, trailer_tvb, trailer_length, 4, - "Frame check sequence: 0x%08x (incorrect, should be 0x%08x)", + "Frame check sequence: 0x%08x [incorrect, should be 0x%08x]", sent_fcs, fcs); } } diff --git a/epan/dissectors/packet-gprs-llc.c b/epan/dissectors/packet-gprs-llc.c index f3b62217ee..00857e2c91 100644 --- a/epan/dissectors/packet-gprs-llc.c +++ b/epan/dissectors/packet-gprs-llc.c @@ -298,11 +298,11 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) switch ( fcs_status ) { case FCS_VALID: - proto_tree_add_text ( llcgprs_tree , tvb , crc_start , 3 , "FCS: 0x%06x (correct)" , fcs_calc&0xffffff ); + proto_tree_add_text ( llcgprs_tree , tvb , crc_start , 3 , "FCS: 0x%06x [correct]" , fcs_calc&0xffffff ); break; case FCS_NOT_VALID: - proto_tree_add_text ( llcgprs_tree , tvb , crc_start , 3 , "FCS: 0x%06x (incorrect, should be 0x%06x)", + proto_tree_add_text ( llcgprs_tree , tvb , crc_start , 3 , "FCS: 0x%06x [incorrect, should be 0x%06x]", fcs, fcs_calc ); break; diff --git a/epan/dissectors/packet-gre.c b/epan/dissectors/packet-gre.c index 0c6baa5a68..4e105cf337 100644 --- a/epan/dissectors/packet-gre.c +++ b/epan/dissectors/packet-gre.c @@ -174,10 +174,10 @@ dissect_gre(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) computed_cksum = in_cksum(cksum_vec, 1); if (computed_cksum == 0) { proto_tree_add_text(gre_tree, tvb, offset, 2, - "Checksum: 0x%04x (correct)", cksum); + "Checksum: 0x%04x [correct]", cksum); } else { proto_tree_add_text(gre_tree, tvb, offset, 2, - "Checksum: 0x%04x (incorrect, should be 0x%04x)", + "Checksum: 0x%04x [incorrect, should be 0x%04x]", cksum, in_cksum_shouldbe(cksum, computed_cksum)); } } else { diff --git a/epan/dissectors/packet-icmpv6.c b/epan/dissectors/packet-icmpv6.c index fa83f96c48..0cf2d2eac2 100644 --- a/epan/dissectors/packet-icmpv6.c +++ b/epan/dissectors/packet-icmpv6.c @@ -1274,7 +1274,7 @@ dissect_icmpv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) tvb, offset + offsetof(struct icmp6_hdr, icmp6_cksum), 2, cksum, - "Checksum: 0x%04x (correct)", cksum); + "Checksum: 0x%04x [correct]", cksum); } else { proto_tree_add_boolean_hidden(icmp6_tree, hf_icmpv6_checksum_bad, tvb, @@ -1284,7 +1284,7 @@ dissect_icmpv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) tvb, offset + offsetof(struct icmp6_hdr, icmp6_cksum), 2, cksum, - "Checksum: 0x%04x (incorrect, should be 0x%04x)", + "Checksum: 0x%04x [incorrect, should be 0x%04x]", cksum, in_cksum_shouldbe(cksum, computed_cksum)); } } else { diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c index 897d3aad02..cde982e2f2 100644 --- a/epan/dissectors/packet-ieee80211.c +++ b/epan/dissectors/packet-ieee80211.c @@ -2297,11 +2297,11 @@ dissect_ieee80211_common (tvbuff_t * tvb, packet_info * pinfo, if (fcs == sent_fcs) proto_tree_add_uint_format(hdr_tree, hf_fcs, tvb, hdr_len + len, 4, sent_fcs, - "Frame check sequence: 0x%08x (correct)", sent_fcs); + "Frame check sequence: 0x%08x [correct]", sent_fcs); else proto_tree_add_uint_format(hdr_tree, hf_fcs, tvb, hdr_len + len, 4, sent_fcs, - "Frame check sequence: 0x%08x (incorrect, should be 0x%08x)", + "Frame check sequence: 0x%08x [incorrect, should be 0x%08x]", sent_fcs, fcs); } } diff --git a/epan/dissectors/packet-igmp.c b/epan/dissectors/packet-igmp.c index 4b5167c681..4f32440c7b 100644 --- a/epan/dissectors/packet-igmp.c +++ b/epan/dissectors/packet-igmp.c @@ -340,13 +340,13 @@ void igmp_checksum(proto_tree *tree, tvbuff_t *tvb, int hf_index, if (cksum == 0) { proto_tree_add_uint_format(tree, hf_index, tvb, 2, 2, hdrcksum, - "Header checksum: 0x%04x (correct)", hdrcksum); + "Header checksum: 0x%04x [correct]", hdrcksum); } else { proto_tree_add_boolean_hidden(tree, hf_index_bad, tvb, 2, 2, TRUE); proto_tree_add_uint_format(tree, hf_index, tvb, 2, 2, hdrcksum, - "Header checksum: 0x%04x (incorrect, should be 0x%04x)", hdrcksum,in_cksum_shouldbe(hdrcksum,cksum)); + "Header checksum: 0x%04x [incorrect, should be 0x%04x]", hdrcksum,in_cksum_shouldbe(hdrcksum,cksum)); } } else proto_tree_add_uint(tree, hf_index, tvb, 2, 2, hdrcksum); diff --git a/epan/dissectors/packet-ip.c b/epan/dissectors/packet-ip.c index 53d59f5b4f..ae62651662 100644 --- a/epan/dissectors/packet-ip.c +++ b/epan/dissectors/packet-ip.c @@ -1004,11 +1004,12 @@ dissect_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) "Header checksum: 0x%04x [correct]", iph->ip_sum); } else { - item = proto_tree_add_boolean_hidden(ip_tree, hf_ip_checksum_bad, tvb, offset + 10, 2, TRUE); - PROTO_ITEM_SET_HIDDEN(item); proto_tree_add_uint_format(ip_tree, hf_ip_checksum, tvb, offset + 10, 2, iph->ip_sum, "Header checksum: 0x%04x [incorrect, should be 0x%04x]", iph->ip_sum, in_cksum_shouldbe(iph->ip_sum, ipsum)); + item = proto_tree_add_boolean(ip_tree, hf_ip_checksum_bad, tvb, offset + 10, 2, TRUE); + PROTO_ITEM_SET_GENERATED(item); + PROTO_ITEM_SET_HIDDEN(item); } } } else { @@ -1392,7 +1393,7 @@ dissect_mpls_extensions(tvbuff_t *tvb, size_t offset, proto_tree *tree) if (computed_cksum == 0) { proto_tree_add_uint_format(mpls_tree, hf_icmp_mpls_checksum, tvb, offset + 2, 2, - cksum, "Checksum: 0x%04x (correct)", cksum); + cksum, "Checksum: 0x%04x [correct]", cksum); } else { @@ -1401,7 +1402,7 @@ dissect_mpls_extensions(tvbuff_t *tvb, size_t offset, proto_tree *tree) proto_tree_add_uint_format(mpls_tree, hf_icmp_mpls_checksum, tvb, offset + 2, 2, cksum, - "Checksum: 0x%04x (incorrect, should be 0x%04x)", + "Checksum: 0x%04x [incorrect, should be 0x%04x]", cksum, in_cksum_shouldbe(cksum, computed_cksum)); } @@ -1769,14 +1770,14 @@ dissect_icmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (computed_cksum == 0) { proto_tree_add_uint_format(icmp_tree, hf_icmp_checksum, tvb, 2, 2, cksum, - "Checksum: 0x%04x (correct)", cksum); + "Checksum: 0x%04x [correct]", cksum); } else { item = proto_tree_add_boolean(icmp_tree, hf_icmp_checksum_bad, tvb, 2, 2, TRUE); PROTO_ITEM_SET_HIDDEN(item); proto_tree_add_uint_format(icmp_tree, hf_icmp_checksum, tvb, 2, 2, cksum, - "Checksum: 0x%04x (incorrect, should be 0x%04x)", + "Checksum: 0x%04x [incorrect, should be 0x%04x]", cksum, in_cksum_shouldbe(cksum, computed_cksum)); } } else { diff --git a/epan/dissectors/packet-isis-hello.c b/epan/dissectors/packet-isis-hello.c index 197c4910f7..1ce2577aea 100644 --- a/epan/dissectors/packet-isis-hello.c +++ b/epan/dissectors/packet-isis-hello.c @@ -553,22 +553,22 @@ dissect_hello_checksum_clv(tvbuff_t *tvb, case NO_CKSUM : proto_tree_add_text ( tree, tvb, offset, length, - "Checksum: 0x%04x (unused)", checksum); + "Checksum: 0x%04x [unused]", checksum); break; case DATA_MISSING : isis_dissect_unknown(tvb, tree, offset, - "packet length %d went beyond packet", + "[packet length %d went beyond packet]", tvb_length_remaining(tvb, 0)); break; case CKSUM_NOT_OK : proto_tree_add_text ( tree, tvb, offset, length, - "Checksum: 0x%04x (incorrect, should be 0x%04x)", + "Checksum: 0x%04x [incorrect, should be 0x%04x]", checksum, cacl_checksum); break; case CKSUM_OK : proto_tree_add_text ( tree, tvb, offset, length, - "Checksum: 0x%04x (correct)", checksum); + "Checksum: 0x%04x [correct]", checksum); break; default : g_message("'check_and_get_checksum' returned an invalid value"); diff --git a/epan/dissectors/packet-isis-lsp.c b/epan/dissectors/packet-isis-lsp.c index e6cc7948bd..c9a1bf169c 100644 --- a/epan/dissectors/packet-isis-lsp.c +++ b/epan/dissectors/packet-isis-lsp.c @@ -1808,23 +1808,23 @@ isis_dissect_isis_lsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int o case NO_CKSUM : proto_tree_add_uint_format(lsp_tree, hf_isis_lsp_checksum, tvb, offset, 2, checksum, - "Checksum: 0x%04x (unused)", checksum); + "Checksum: 0x%04x [unused]", checksum); break; case DATA_MISSING : isis_dissect_unknown(tvb, tree, offset, - "packet length %d went beyond packet", + "[packet length %d went beyond packet]", tvb_length_remaining(tvb, offset_checksum)); break; case CKSUM_NOT_OK : proto_tree_add_uint_format(lsp_tree, hf_isis_lsp_checksum, tvb, offset, 2, checksum, - "Checksum: 0x%04x (incorrect, should be 0x%04x)", + "Checksum: 0x%04x [incorrect, should be 0x%04x]", checksum, cacl_checksum); proto_tree_add_boolean_hidden(lsp_tree, hf_isis_lsp_checksum_bad, tvb, offset, 2, TRUE); break; case CKSUM_OK : proto_tree_add_uint_format(lsp_tree, hf_isis_lsp_checksum, tvb, offset, 2, checksum, - "Checksum: 0x%04x (correct)", checksum); + "Checksum: 0x%04x [correct]", checksum); proto_tree_add_boolean_hidden(lsp_tree, hf_isis_lsp_checksum_bad, tvb, offset, 2, FALSE); break; diff --git a/epan/dissectors/packet-isis-snp.c b/epan/dissectors/packet-isis-snp.c index 34b6109961..638004c93f 100644 --- a/epan/dissectors/packet-isis-snp.c +++ b/epan/dissectors/packet-isis-snp.c @@ -504,22 +504,22 @@ dissect_snp_checksum_clv(tvbuff_t *tvb, case NO_CKSUM : proto_tree_add_text ( tree, tvb, offset, length, - "Checksum: 0x%04x (unused)", checksum); + "Checksum: 0x%04x [unused]", checksum); break; case DATA_MISSING : isis_dissect_unknown(tvb, tree, offset, - "packet length %d went beyond packet", + "[packet length %d went beyond packet]", tvb_length_remaining(tvb, 0)); break; case CKSUM_NOT_OK : proto_tree_add_text ( tree, tvb, offset, length, - "Checksum: 0x%04x (incorrect, should be 0x%04x)", + "Checksum: 0x%04x [incorrect, should be 0x%04x]", checksum, cacl_checksum); break; case CKSUM_OK : proto_tree_add_text ( tree, tvb, offset, length, - "Checksum: 0x%04x (correct)", checksum); + "Checksum: 0x%04x [correct]", checksum); break; default : g_message("'check_and_get_checksum' returned an invalid value"); diff --git a/epan/dissectors/packet-lmp.c b/epan/dissectors/packet-lmp.c index f3887620d3..5297f2b8a2 100644 --- a/epan/dissectors/packet-lmp.c +++ b/epan/dissectors/packet-lmp.c @@ -1053,11 +1053,11 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (computed_cksum == 0) { proto_tree_add_text(lmp_header_tree, tvb, offset+6, 2, - "Message Checksum: 0x%04x (correct)", + "Message Checksum: 0x%04x [correct]", cksum); } else { proto_tree_add_text(lmp_header_tree, tvb, offset+6, 2, - "Message Checksum: 0x%04x (incorrect, should be 0x%04x)", + "Message Checksum: 0x%04x [incorrect, should be 0x%04x]", cksum, in_cksum_shouldbe(cksum, computed_cksum)); } diff --git a/epan/dissectors/packet-ospf.c b/epan/dissectors/packet-ospf.c index 5ae181057d..7f667136ea 100644 --- a/epan/dissectors/packet-ospf.c +++ b/epan/dissectors/packet-ospf.c @@ -575,10 +575,10 @@ dissect_ospf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) computed_cksum = in_cksum(cksum_vec, cksum_vec_len); if (computed_cksum == 0) { proto_tree_add_text(ospf_header_tree, tvb, 12, 2, - "Packet Checksum: 0x%04x (correct)", cksum); + "Packet Checksum: 0x%04x [correct]", cksum); } else { proto_tree_add_text(ospf_header_tree, tvb, 12, 2, - "Packet Checksum: 0x%04x (incorrect, should be 0x%04x)", + "Packet Checksum: 0x%04x [incorrect, should be 0x%04x]", cksum, in_cksum_shouldbe(cksum, computed_cksum)); } } else { @@ -637,7 +637,7 @@ dissect_ospf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree_add_text(ospf_header_tree, tvb, 14, 1, "Instance ID: %u", instance_ID); reserved = tvb_get_guint8(tvb, 15); - proto_tree_add_text(ospf_header_tree, tvb, 15, 1, (reserved == 0 ? "Reserved: %u" : "Reserved: %u (incorrect, should be 0)"), + proto_tree_add_text(ospf_header_tree, tvb, 15, 1, (reserved == 0 ? "Reserved: %u" : "Reserved: %u [incorrect, should be 0]"), reserved); break; } @@ -786,7 +786,7 @@ dissect_ospf_db_desc(tvbuff_t *tvb, int offset, proto_tree *tree, guint8 version case OSPF_VERSION_3: reserved = tvb_get_guint8(tvb, offset); - proto_tree_add_text(ospf_db_desc_tree, tvb, offset, 1, (reserved == 0 ? "Reserved: %u" : "Reserved: %u (incorrect, should be 0)"), + proto_tree_add_text(ospf_db_desc_tree, tvb, offset, 1, (reserved == 0 ? "Reserved: %u" : "Reserved: %u [incorrect, should be 0]"), reserved); dissect_ospf_options(tvb, offset + 1, ospf_db_desc_tree, version); @@ -795,7 +795,7 @@ dissect_ospf_db_desc(tvbuff_t *tvb, int offset, proto_tree *tree, guint8 version tvb_get_ntohs(tvb, offset+4)); reserved = tvb_get_guint8(tvb, offset + 6); - proto_tree_add_text(ospf_db_desc_tree, tvb, offset + 6, 1, (reserved == 0 ? "Reserved: %u" : "Reserved: %u (incorrect, should be 0)"), + proto_tree_add_text(ospf_db_desc_tree, tvb, offset + 6, 1, (reserved == 0 ? "Reserved: %u" : "Reserved: %u [incorrect, should be 0]"), reserved); flags = tvb_get_guint8(tvb, offset + 7); @@ -859,7 +859,7 @@ dissect_ospf_ls_req(tvbuff_t *tvb, int offset, proto_tree *tree, guint8 version) case OSPF_VERSION_3: reserved = tvb_get_ntohs(tvb, offset); proto_tree_add_text(ospf_lsr_tree, tvb, offset, 2, - (reserved == 0 ? "Reserved: %u" : "Reserved: %u (incorrect, should be 0)"), reserved); + (reserved == 0 ? "Reserved: %u" : "Reserved: %u [incorrect, should be 0]"), reserved); ls_type = tvb_get_ntohs(tvb, offset+2); proto_tree_add_text(ospf_lsr_tree, tvb, offset+2, 2, "LS Type: %s (0x%04x)", val_to_str(ls_type, v3_ls_type_vals, "Unknown"), @@ -1880,7 +1880,7 @@ dissect_ospf_v3_lsa(tvbuff_t *tvb, int offset, proto_tree *tree, /* reserved field */ reserved = tvb_get_guint8(tvb, offset+1); proto_tree_add_text(ospf_lsa_tree, tvb, offset+1, 1, - (reserved == 0 ? "Reserved: %u" : "Reserved: %u (incorrect, should be 0)"),reserved); + (reserved == 0 ? "Reserved: %u" : "Reserved: %u [incorrect, should be 0]"),reserved); /* metric */ metric=tvb_get_ntohs(tvb, offset+2); @@ -1910,7 +1910,7 @@ dissect_ospf_v3_lsa(tvbuff_t *tvb, int offset, proto_tree *tree, /* reserved field */ reserved = tvb_get_guint8(tvb, offset); proto_tree_add_text(ospf_lsa_tree, tvb, offset, 1, - (reserved == 0 ? "Reserved: %u" : "Reserved: %u (incorrect, should be 0)"),reserved); + (reserved == 0 ? "Reserved: %u" : "Reserved: %u [incorrect, should be 0]"),reserved); /* options field in an network-lsa */ dissect_ospf_options(tvb, offset + 1, ospf_lsa_tree, OSPF_VERSION_3); @@ -1932,7 +1932,7 @@ dissect_ospf_v3_lsa(tvbuff_t *tvb, int offset, proto_tree *tree, /* reserved field */ reserved = tvb_get_guint8(tvb, offset); proto_tree_add_text(ospf_lsa_tree, tvb, offset, 1, - (reserved == 0 ? "Reserved: %u" : "Reserved: %u (incorrect, should be 0)"),reserved); + (reserved == 0 ? "Reserved: %u" : "Reserved: %u [incorrect, should be 0]"),reserved); /* metric */ metric=tvb_get_ntoh24(tvb, offset+1); @@ -1948,7 +1948,7 @@ dissect_ospf_v3_lsa(tvbuff_t *tvb, int offset, proto_tree *tree, /* 16 bits reserved */ reserved16=tvb_get_ntohs(tvb, offset+6); proto_tree_add_text(ospf_lsa_tree, tvb, offset+6, 2, - (reserved16 == 0 ? "Reserved: %u" : "Reserved: %u (incorrect, should be 0)"),reserved16); + (reserved16 == 0 ? "Reserved: %u" : "Reserved: %u [incorrect, should be 0]"),reserved16); offset+=8; @@ -1965,7 +1965,7 @@ dissect_ospf_v3_lsa(tvbuff_t *tvb, int offset, proto_tree *tree, /* reserved field */ reserved = tvb_get_guint8(tvb, offset); proto_tree_add_text(ospf_lsa_tree, tvb, offset, 1, - (reserved == 0 ? "Reserved: %u" : "Reserved: %u (incorrect, should be 0)"),reserved); + (reserved == 0 ? "Reserved: %u" : "Reserved: %u [incorrect, should be 0]"),reserved); /* options field in an inter-area-router-lsa */ dissect_ospf_options(tvb, offset + 1, ospf_lsa_tree, OSPF_VERSION_3); @@ -1973,7 +1973,7 @@ dissect_ospf_v3_lsa(tvbuff_t *tvb, int offset, proto_tree *tree, /* reserved field */ reserved = tvb_get_guint8(tvb, offset+4); proto_tree_add_text(ospf_lsa_tree, tvb, offset+4, 1, - (reserved == 0 ? "Reserved: %u" : "Reserved: %u (incorrect, should be 0)"),reserved); + (reserved == 0 ? "Reserved: %u" : "Reserved: %u [incorrect, should be 0]"),reserved); /* metric */ metric=tvb_get_ntoh24(tvb, offset+5); @@ -2090,7 +2090,7 @@ dissect_ospf_v3_lsa(tvbuff_t *tvb, int offset, proto_tree *tree, /* 16 bits reserved */ reserved16=tvb_get_ntohs(tvb, offset+2); proto_tree_add_text(ospf_lsa_tree, tvb, offset+2, 2, - (reserved16 == 0 ? "Reserved: %u" : "Reserved: %u (incorrect, should be 0)"),reserved16); + (reserved16 == 0 ? "Reserved: %u" : "Reserved: %u [incorrect, should be 0]"),reserved16); offset+=4; diff --git a/epan/dissectors/packet-pgm.c b/epan/dissectors/packet-pgm.c index 1a100a1408..f38381b3a5 100644 --- a/epan/dissectors/packet-pgm.c +++ b/epan/dissectors/packet-pgm.c @@ -1352,12 +1352,12 @@ dissect_pgm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) computed_cksum = in_cksum(&cksum_vec[0], 1); if (computed_cksum == 0) { proto_tree_add_uint_format(pgm_tree, hf_pgm_main_cksum, tvb, - offset+6, 2, pgmhdr.cksum, "Checksum: 0x%04x (correct)", pgmhdr.cksum); + offset+6, 2, pgmhdr.cksum, "Checksum: 0x%04x [correct]", pgmhdr.cksum); } else { proto_tree_add_boolean_hidden(pgm_tree, hf_pgm_main_cksum_bad, tvb, offset+6, 2, TRUE); proto_tree_add_uint_format(pgm_tree, hf_pgm_main_cksum, tvb, - offset+6, 2, pgmhdr.cksum, "Checksum: 0x%04x (incorrect, should be 0x%04x)", + offset+6, 2, pgmhdr.cksum, "Checksum: 0x%04x [incorrect, should be 0x%04x]", pgmhdr.cksum, in_cksum_shouldbe(pgmhdr.cksum, computed_cksum)); } } else { diff --git a/epan/dissectors/packet-pim.c b/epan/dissectors/packet-pim.c index a4a9f35622..e9f8c2c4a6 100644 --- a/epan/dissectors/packet-pim.c +++ b/epan/dissectors/packet-pim.c @@ -196,12 +196,12 @@ dissect_pimv1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, if (computed_cksum == 0) { proto_tree_add_uint_format(pim_tree, hf_pim_cksum, tvb, offset, 2, pim_cksum, - "Checksum: 0x%04x (correct)", + "Checksum: 0x%04x [correct]", pim_cksum); } else { proto_tree_add_uint_format(pim_tree, hf_pim_cksum, tvb, offset, 2, pim_cksum, - "Checksum: 0x%04x (incorrect, should be 0x%04x)", + "Checksum: 0x%04x [incorrect, should be 0x%04x]", pim_cksum, in_cksum_shouldbe(pim_cksum, computed_cksum)); } } else { @@ -716,12 +716,12 @@ dissect_pim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { if (computed_cksum == 0) { proto_tree_add_uint_format(pim_tree, hf_pim_cksum, tvb, offset + 2, 2, pim_cksum, - "Checksum: 0x%04x (correct)", + "Checksum: 0x%04x [correct]", pim_cksum); } else { proto_tree_add_uint_format(pim_tree, hf_pim_cksum, tvb, offset + 2, 2, pim_cksum, - "Checksum: 0x%04x (incorrect, should be 0x%04x)", + "Checksum: 0x%04x [incorrect, should be 0x%04x]", pim_cksum, in_cksum_shouldbe(pim_cksum, computed_cksum)); } } else { diff --git a/epan/dissectors/packet-ppp.c b/epan/dissectors/packet-ppp.c index 2538a1b40f..e878bc2d63 100644 --- a/epan/dissectors/packet-ppp.c +++ b/epan/dissectors/packet-ppp.c @@ -1521,11 +1521,11 @@ decode_fcs(tvbuff_t *tvb, proto_tree *fh_tree, int fcs_decode, int proto_offset) rx_fcs_got = tvb_get_letohs(tvb, rx_fcs_offset); if (rx_fcs_got != rx_fcs_exp) { proto_tree_add_text(fh_tree, tvb, rx_fcs_offset, 2, - "FCS 16: 0x%04x (incorrect, should be 0x%04x)", + "FCS 16: 0x%04x [incorrect, should be 0x%04x]", rx_fcs_got, rx_fcs_exp); } else { proto_tree_add_text(fh_tree, tvb, rx_fcs_offset, 2, - "FCS 16: 0x%04x (correct)", + "FCS 16: 0x%04x [correct]", rx_fcs_got); } } @@ -1573,11 +1573,11 @@ decode_fcs(tvbuff_t *tvb, proto_tree *fh_tree, int fcs_decode, int proto_offset) rx_fcs_got = tvb_get_letohl(tvb, rx_fcs_offset); if (rx_fcs_got != rx_fcs_exp) { proto_tree_add_text(fh_tree, tvb, rx_fcs_offset, 4, - "FCS 32: 0x%08x (incorrect, should be 0x%08x)", + "FCS 32: 0x%08x [incorrect, should be 0x%08x]", rx_fcs_got, rx_fcs_exp); } else { proto_tree_add_text(fh_tree, tvb, rx_fcs_offset, 4, - "FCS 32: 0x%08x (correct)", + "FCS 32: 0x%08x [correct]", rx_fcs_got); } } diff --git a/epan/dissectors/packet-rsvp.c b/epan/dissectors/packet-rsvp.c index dffe25fd8f..278607cae4 100644 --- a/epan/dissectors/packet-rsvp.c +++ b/epan/dissectors/packet-rsvp.c @@ -4555,11 +4555,11 @@ dissect_rsvp_msg_tree(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, computed_cksum = in_cksum(&cksum_vec[0], 1); if (computed_cksum == 0) { proto_tree_add_text(rsvp_header_tree, tvb, offset+2, 2, - "Message Checksum: 0x%04x (correct)", + "Message Checksum: 0x%04x [correct]", cksum); } else { proto_tree_add_text(rsvp_header_tree, tvb, offset+2, 2, - "Message Checksum: 0x%04x (incorrect, should be 0x%04x)", + "Message Checksum: 0x%04x [incorrect, should be 0x%04x]", cksum, in_cksum_shouldbe(cksum, computed_cksum)); } diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c index 03e392e87e..31c4cba77e 100644 --- a/epan/dissectors/packet-tcp.c +++ b/epan/dissectors/packet-tcp.c @@ -2941,24 +2941,28 @@ dissect_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) computed_cksum = in_cksum(&cksum_vec[0], 4); if (computed_cksum == 0) { proto_tree_add_uint_format(tcp_tree, hf_tcp_checksum, tvb, - offset + 16, 2, th_sum, "Checksum: 0x%04x (correct)", th_sum); + offset + 16, 2, th_sum, "Checksum: 0x%04x [correct]", th_sum); /* Checksum is valid, so we're willing to desegment it. */ desegment_ok = TRUE; } else { - proto_tree_add_boolean_hidden(tcp_tree, hf_tcp_checksum_bad, tvb, - offset + 16, 2, TRUE); + proto_item *item; + proto_tree_add_uint_format(tcp_tree, hf_tcp_checksum, tvb, offset + 16, 2, th_sum, - "Checksum: 0x%04x (incorrect, should be 0x%04x)", th_sum, + "Checksum: 0x%04x [incorrect, should be 0x%04x]", th_sum, in_cksum_shouldbe(th_sum, computed_cksum)); + item = proto_tree_add_boolean(tcp_tree, hf_tcp_checksum_bad, tvb, + offset + 16, 2, TRUE); + PROTO_ITEM_SET_GENERATED(item); + PROTO_ITEM_SET_HIDDEN(item); if (check_col(pinfo->cinfo, COL_INFO)) col_append_fstr(pinfo->cinfo, COL_INFO, " [TCP CHECKSUM INCORRECT]"); /* Checksum is invalid, so we're not willing to desegment it. */ desegment_ok = FALSE; - pinfo->noreassembly_reason = " (incorrect TCP checksum)"; + pinfo->noreassembly_reason = " [incorrect TCP checksum]"; } } else { proto_tree_add_uint_format(tcp_tree, hf_tcp_checksum, tvb, diff --git a/epan/dissectors/packet-vrrp.c b/epan/dissectors/packet-vrrp.c index dda91030ea..fa82c84f98 100644 --- a/epan/dissectors/packet-vrrp.c +++ b/epan/dissectors/packet-vrrp.c @@ -183,11 +183,11 @@ dissect_vrrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } if (computed_cksum == 0) { proto_tree_add_text(vrrp_tree, tvb, offset, 2, - "Checksum: 0x%04x (correct)", + "Checksum: 0x%04x [correct]", cksum); } else { proto_tree_add_text(vrrp_tree, tvb, offset, 2, - "Checksum: 0x%04x (incorrect, should be 0x%04x)", + "Checksum: 0x%04x [incorrect, should be 0x%04x]", cksum, in_cksum_shouldbe(cksum, computed_cksum)); } |