diff options
author | Sean O. Stalley <sean.stalley@intel.com> | 2014-05-15 17:23:47 -0700 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2014-05-30 13:14:06 +0000 |
commit | 918212667ada625e7c09d690e7489407be6bd71a (patch) | |
tree | b5e82fe1a448c30f06827088f769049672f38444 | |
parent | a1656bc4215c2a36768613c1d51b7f170bdddb88 (diff) |
Detect multiple MAUSB Packets in a single TCP packet
Puts a tag in the info column when multiple MAUSB packets are in a
single TCP packet.
Change-Id: Ib20e5e30474d93270dd24e203ab96f64f5cc77ad
Reviewed-on: https://code.wireshark.org/review/1658
Reviewed-by: Sean Onufer Stalley <sean.stalley@intel.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
-rw-r--r-- | epan/dissectors/packet-mausb.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/epan/dissectors/packet-mausb.c b/epan/dissectors/packet-mausb.c index 80f1dc0af6..0ba0dd3b14 100644 --- a/epan/dissectors/packet-mausb.c +++ b/epan/dissectors/packet-mausb.c @@ -876,7 +876,9 @@ static guint16 dissect_mausb_mgmt_pkt_flds(struct mausb_header *header, return offset; } - +/* Used to detect multiple MA Packets in a single TCP packet */ +/* Not used for MA Packets in SNAP Packets */ +static gint mausb_num_pdus = 0; /* Code to actually dissect the packets */ static int @@ -899,6 +901,7 @@ dissect_mausb_pkt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, /* Set the Protocol column to the constant string of mausb */ col_set_str(pinfo->cinfo, COL_PROTOCOL, "MAUSB"); + mausb_num_pdus++; col_clear(pinfo->cinfo, COL_INFO); @@ -1100,8 +1103,15 @@ static int dissect_mausb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) { + mausb_num_pdus = 0; + tcp_dissect_pdus(tvb, pinfo, tree, TRUE, MAUSB_MIN_LENGTH, mausb_get_pkt_len, dissect_mausb_pkt, data); + + if (1 < mausb_num_pdus) { + col_prepend_fstr(pinfo->cinfo, COL_INFO, "[%i packets] ", mausb_num_pdus); + } + return tvb_reported_length(tvb); } |