aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2005-09-16 22:17:50 +0000
committerUlf Lamping <ulf.lamping@web.de>2005-09-16 22:17:50 +0000
commitef461aa94b31f7f10b710ecfbfcb4a375690c049 (patch)
tree15852323e083d9e440bf24884b08f4ec81385f31 /epan/dissectors
parent4469693560b1caa14c76911044e0675efee0a880 (diff)
add an expert info based on QualityCode and a COL_INFO output
svn path=/trunk/; revision=15843
Diffstat (limited to 'epan/dissectors')
-rw-r--r--epan/dissectors/packet-dcom-cba-acco.c34
1 files changed, 33 insertions, 1 deletions
diff --git a/epan/dissectors/packet-dcom-cba-acco.c b/epan/dissectors/packet-dcom-cba-acco.c
index c77b68d75e..675a473b8d 100644
--- a/epan/dissectors/packet-dcom-cba-acco.c
+++ b/epan/dissectors/packet-dcom-cba-acco.c
@@ -33,6 +33,7 @@
#include <glib.h>
#include <epan/packet.h>
+#include <epan/expert.h>
#include "packet-dcerpc.h"
#include "packet-dcom.h"
#include "packet-dcom-cba-acco.h"
@@ -1210,6 +1211,7 @@ dissect_CBA_Connection_Data(tvbuff_t *tvb,
proto_tree *sub_tree;
proto_item *conn_data_item = NULL;
proto_tree *conn_data_tree = NULL;
+ proto_item *item = NULL;
guint16 u16Len;
guint32 u32ID;
guint8 u8QC;
@@ -1217,6 +1219,10 @@ dissect_CBA_Connection_Data(tvbuff_t *tvb,
guint16 u16HdrLen;
int offset = 0;
int offset_hole;
+ gboolean qc_reported = FALSE;
+ int qc_good = 0;
+ int qc_uncertain = 0;
+ int qc_bad = 0;
/* guint32 bTimeStamped = 0;*/
/*** ALL data in this buffer is NOT aligned and always little endian ordered ***/
@@ -1247,8 +1253,10 @@ dissect_CBA_Connection_Data(tvbuff_t *tvb,
u16CountFix = u16Count;
/* update column info now */
+#if 0
if (check_col(pinfo->cinfo, COL_INFO))
col_append_fstr(pinfo->cinfo, COL_INFO, " Cnt=%u", u16Count);
+#endif
/* is this an OnDataChanged buffer format (version), we know? */
if (u8Version != CBA_MRSH_VERSION_DCOM &&
@@ -1321,11 +1329,31 @@ dissect_CBA_Connection_Data(tvbuff_t *tvb,
u8QC = tvb_get_guint8 (tvb, offset);
if (sub_tree) {
- proto_tree_add_item(sub_tree, hf_cba_acco_qc, tvb, offset, 1, TRUE);
+ item = proto_tree_add_item(sub_tree, hf_cba_acco_qc, tvb, offset, 1, TRUE);
}
offset += 1;
u16HdrLen += 1;
+ if( u8QC != 0x80 && /* GoodNonCascOk */
+ u8QC != 0x1C && /* BadOutOfService (usually permanent, so don't report for every frame) */
+ qc_reported == 0) {
+ expert_add_info_format(pinfo, item, PI_RESPONSE_CODE, PI_CHAT, "%s QC: %s",
+ u8Version == CBA_MRSH_VERSION_DCOM ? "DCOM" : "SRT",
+ val_to_str(u8QC, cba_acco_qc_vals, "Unknown (0x%02x)"));
+ qc_reported = 0;
+ }
+
+ switch(u8QC >> 6) {
+ case(00):
+ qc_bad++;
+ break;
+ case(01):
+ qc_uncertain++;
+ break;
+ default:
+ qc_good++;
+ }
+
/* user data length is item length without headers */
u16DataLen = u16Len - u16HdrLen;
@@ -1364,6 +1392,10 @@ dissect_CBA_Connection_Data(tvbuff_t *tvb,
}
proto_item_set_len(conn_data_item, offset);
+ if (check_col(pinfo->cinfo, COL_INFO))
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", QC (G:%u,U:%u,B:%u)",
+ qc_good, qc_uncertain, qc_bad);
+
return offset;
}