diff options
author | David Ameiss <netshark@ameissnet.com> | 2014-12-10 14:21:19 -0600 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-01-08 02:15:26 +0000 |
commit | 907d145f86dd4fb219dcb5b2efcac106bc708de7 (patch) | |
tree | 9c1edf208c5dfb43916786a3b72453d66e101811 /epan/dissectors/packet-lbmc.c | |
parent | d245f38c126f1adbde6c118672fc0a099bd13549 (diff) |
Various minor updates to the LBM dissectors.
Change-Id: I36954ea0d8b525b4d7a1b3407f9e9d0e1c9bbd67
Reviewed-on: https://code.wireshark.org/review/6378
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-lbmc.c')
-rw-r--r-- | epan/dissectors/packet-lbmc.c | 50 |
1 files changed, 34 insertions, 16 deletions
diff --git a/epan/dissectors/packet-lbmc.c b/epan/dissectors/packet-lbmc.c index 17d88562ca..1332148f26 100644 --- a/epan/dissectors/packet-lbmc.c +++ b/epan/dissectors/packet-lbmc.c @@ -10398,9 +10398,9 @@ static const gchar * lbmc_determine_msg_type(const guint8 * header_array) { return ("PSRC-ETOK"); } - else if (header_array[LBMC_NHDR_TOPIC_SOURCE_EXFUNC] != 0) + else if (header_array[LBMC_NHDR_TOPIC_SOURCE] != 0) { - return ("TOPIC-SRC-EX"); + return ("TOPIC-SRC"); } else if (header_array[LBMC_NHDR_ROUTE_INFO] != 0) { @@ -10413,6 +10413,32 @@ static const gchar * lbmc_determine_msg_type(const guint8 * header_array) return (NULL); } +static const gchar * lbmc_determine_data_msg_type(gboolean retransmission, const guint8 * header_array) +{ + if (retransmission) + { + if (header_array[LBMC_NHDR_REQUEST] != 0) + { + return ("RX-DATA[REQ]"); + } + else + { + return ("RX-DATA"); + } + } + else + { + if (header_array[LBMC_NHDR_REQUEST] != 0) + { + return ("DATA[REQ]"); + } + else + { + return ("DATA"); + } + } +} + static lbm_uim_stream_info_t * lbmc_dup_stream_info(const lbm_uim_stream_info_t * info) { /* Returns a packet-scoped copy. */ @@ -10615,6 +10641,7 @@ int lbmc_dissect_lbmc_packet(tvbuff_t * tvb, int offset, packet_info * pinfo, pr while (tvb_reported_length_remaining(tvb, tvb_lbmc_offset) >= L_LBMC_MINIMAL_HDR_T) { proto_item * type_item = NULL; + const gchar * msg_type = NULL; /* Get the version and type. */ ver_type = tvb_get_guint8(tvb, tvb_lbmc_offset + O_LBMC_HDR_T_VER_TYPE); @@ -11202,6 +11229,7 @@ int lbmc_dissect_lbmc_packet(tvbuff_t * tvb, int offset, packet_info * pinfo, pr lbmc_message_entry_t * msg = NULL; gboolean dissector_found = FALSE; heur_dtbl_entry_t *hdtbl_entry; + gboolean retransmission = FALSE; /* Note on heuristic subdissectors: If the preference "lbmc.use_heuristic_subdissectors" is TRUE, and a heuristic subdissector is @@ -11414,12 +11442,10 @@ int lbmc_dissect_lbmc_packet(tvbuff_t * tvb, int offset, packet_info * pinfo, pr { if ((!lbm_channel_is_transport(channel)) && (!has_source_index)) { - col_append_sep_str(pinfo->cinfo, COL_INFO, " ", "RX-DATA"); - } - else - { - col_append_sep_str(pinfo->cinfo, COL_INFO, " ", "DATA"); + retransmission = TRUE; } + msg_type = lbmc_determine_data_msg_type(retransmission, found_header); + col_append_sep_str(pinfo->cinfo, COL_INFO, " ", msg_type); if (can_call_subdissector) { if (lbmc_use_heuristic_subdissectors) @@ -11460,14 +11486,7 @@ int lbmc_dissect_lbmc_packet(tvbuff_t * tvb, int offset, packet_info * pinfo, pr { lbm_uim_stream_info_t * msg_info; - if ((!lbm_channel_is_transport(actual_channel)) && (!has_source_index)) - { - puim_stream_info->description = "RX-DATA"; - } - else - { - puim_stream_info->description = "DATA"; - } + puim_stream_info->description = msg_type; /* The dup is needed since there may be multiple stream infos per packet. */ msg_info = lbmc_dup_stream_info(puim_stream_info); tap_queue_packet(lbmc_uim_tap_handle, pinfo, (void *)msg_info); @@ -11477,7 +11496,6 @@ int lbmc_dissect_lbmc_packet(tvbuff_t * tvb, int offset, packet_info * pinfo, pr } else { - const gchar * msg_type = NULL; msg_type = lbmc_determine_msg_type(found_header); if (msg_type != NULL) |