diff options
author | Anders Broman <anders.broman@ericsson.com> | 2011-02-20 18:56:52 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2011-02-20 18:56:52 +0000 |
commit | c51faaa9c6a364885552a3d881ad3eaa518ebf57 (patch) | |
tree | 60b03b3762595669ae30f1d8a08ed83efe040920 /epan/dissectors/packet-nwmtp.c | |
parent | 84a712d07a69b9fe678f105094f66b3c07b5d2fc (diff) |
From: Holger Hans Peter Freyther
The protocol has a simple addition to provide the InService and
OutOfService notification for a MTPL2 link inside the protocol. This
patch adds these types to the type field, stops handing empty packages
to the MTPL3 dissector and fills out the COL_INFO with the type of
the packet.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5706
svn path=/trunk/; revision=36017
Diffstat (limited to 'epan/dissectors/packet-nwmtp.c')
-rw-r--r-- | epan/dissectors/packet-nwmtp.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/epan/dissectors/packet-nwmtp.c b/epan/dissectors/packet-nwmtp.c index abb2da4821..33c7a55142 100644 --- a/epan/dissectors/packet-nwmtp.c +++ b/epan/dissectors/packet-nwmtp.c @@ -61,6 +61,8 @@ static const value_string nwmtp_data_type_vals[] = { {18, "Retrieved MSU Prio 0" }, {32, "Retrieval complete" }, {33, "Retrieval impossible" }, + {34, "Link in service" }, + {35, "Link out of service" }, { 0, NULL }, }; @@ -72,11 +74,17 @@ static void dissect_nwmtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) col_clear(pinfo->cinfo, COL_INFO); while (tvb_reported_length_remaining(tvb, offset) > 0) { + const gchar *type; proto_item *ti; proto_item *nwmtp_tree; guint32 len; tvbuff_t *next_tvb; + /* update the info column */ + type = val_to_str_const(tvb_get_guint8(tvb, offset + 1), + nwmtp_data_type_vals, "Unknown"); + col_set_str(pinfo->cinfo, COL_INFO, type); + len = tvb_get_ntohl(tvb, offset + 8); if (tree) { @@ -98,7 +106,8 @@ static void dissect_nwmtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } next_tvb = tvb_new_subset(tvb, offset + 12, len, len); - call_dissector(mtp_handle, next_tvb, pinfo, tree); + if (tvb_length(next_tvb) > 0) + call_dissector(mtp_handle, next_tvb, pinfo, tree); offset += len + 12; } } |