diff options
author | Martin Fesser <martin.fesser@allegro-packets.com> | 2019-08-21 15:08:51 +0200 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2019-08-25 20:47:26 +0000 |
commit | d7a908c25ceb2d49367f059e3f3aad93221d7593 (patch) | |
tree | 108d24bb5c25b555f0d051490a0fcc94c70edb4f | |
parent | 55dc9c042855414ece676d57e493d6b7a2085649 (diff) |
show interface name in frame line caption if set
Change-Id: Ib6cb86bc20dae9f88fdeb469983c2380bcc9216d
Reviewed-on: https://code.wireshark.org/review/34335
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r-- | epan/dissectors/packet-frame.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/epan/dissectors/packet-frame.c b/epan/dissectors/packet-frame.c index f721ea5aed..81b67f8006 100644 --- a/epan/dissectors/packet-frame.c +++ b/epan/dissectors/packet-frame.c @@ -353,8 +353,15 @@ dissect_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* cap_len * 8); } if (pinfo->rec->presence_flags & WTAP_HAS_INTERFACE_ID) { - proto_item_append_text(ti, " on interface %u", + const char *interface_name = epan_get_interface_name(pinfo->epan, pinfo->rec->rec_header.packet_header.interface_id); + if (interface_name != NULL) { + proto_item_append_text(ti, " on interface %s, id %u", + interface_name, pinfo->rec->rec_header.packet_header.interface_id); + } else { + proto_item_append_text(ti, " on unnamed interface, id %u", + pinfo->rec->rec_header.packet_header.interface_id); + } } if (pinfo->rec->presence_flags & WTAP_HAS_PACK_FLAGS) { switch (PACK_FLAGS_DIRECTION(pinfo->rec->rec_header.packet_header.pack_flags)) { |