diff options
author | Priyanka Mondal <priyanka02010@gmail.com> | 2016-09-22 14:43:12 +0530 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2016-09-22 21:42:27 +0000 |
commit | eeb4361e57e01d03a655433c9e75388d93bb9f6f (patch) | |
tree | f662eed4d164ebd6f25f9529d00eca3499676d34 | |
parent | a156a0021d42d90130506e7e589ac4782d31bee8 (diff) |
Dropped packet: Add dropped packets info in netscaler trace
Change-Id: I2a9806026413c5971e5ecad17cd80787130cb9ed
Reviewed-on: https://code.wireshark.org/review/17803
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
-rw-r--r-- | epan/dissectors/packet-nstrace.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/epan/dissectors/packet-nstrace.c b/epan/dissectors/packet-nstrace.c index 2ae89aa34a..81358a70ae 100644 --- a/epan/dissectors/packet-nstrace.c +++ b/epan/dissectors/packet-nstrace.c @@ -423,6 +423,7 @@ void add35records(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tre static int dissect_nstrace(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { + int error_code = 0; proto_tree *ns_tree; proto_item *ti; struct nstr_phdr *pnstr = &(pinfo->pseudo_header->nstr); @@ -534,6 +535,7 @@ dissect_nstrace(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data proto_tree_add_bitmask(ns_tree, tvb, pnstr->ns_activity_offset, hf_ns_capflags, ett_ns_capflags, cap_flags, ENC_LITTLE_ENDIAN); proto_tree_add_item(ns_tree, hf_ns_errorcode, tvb, NSPR_V35_ERROR_CODE_OFFSET, 1, ENC_LITTLE_ENDIAN); + error_code = tvb_get_guint8(tvb, NSPR_V35_ERROR_CODE_OFFSET); proto_tree_add_item(ns_tree, hf_ns_app, tvb, NSPR_V35_APP_OFFSET, 1, ENC_LITTLE_ENDIAN); proto_tree_add_item(ns_tree, hf_ns_coreid, tvb, pnstr->coreid_offset, 2, ENC_LITTLE_ENDIAN); @@ -551,6 +553,10 @@ dissect_nstrace(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data PROTO_ITEM_SET_HIDDEN(ti); add35records(tvb, pinfo, tree, ns_tree); + if (error_code) + { + col_prepend_fence_fstr(pinfo->cinfo, COL_INFO, "NS DROPPED | "); + } } break; /* we can return here. break;ing in case some compilers are unhappy */ |