diff options
author | Chuck Craft <bubbasnmp@gmail.com> | 2022-04-15 10:10:51 -0500 |
---|---|---|
committer | Roland Knall <rknall@gmail.com> | 2022-07-12 14:15:33 +0000 |
commit | e12954a637527f7fcc85cea51b2b147f93188828 (patch) | |
tree | b39055fe0afbf5b8edc7945a62bd315f3b4711c0 /epan/proto.c | |
parent | 8ac995578c0a314fc1dc091d6f0fdc268b94da7c (diff) |
epan: ws_debug log for heuristic that claims frame (len != 0)
It's possible for a dissector to claim a frame without adding to
the tree or being added to frame.protocols (see !6669)
Log a debug message showing the pinfo layers and the dissector that
claimed the tvb (frame/packet).
Diffstat (limited to 'epan/proto.c')
-rw-r--r-- | epan/proto.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/epan/proto.c b/epan/proto.c index 174f238cca..2a39c66065 100644 --- a/epan/proto.c +++ b/epan/proto.c @@ -7914,6 +7914,29 @@ proto_is_frame_protocol(const wmem_list_t *layers, const char* proto_name) return FALSE; } +gchar * +proto_list_layers(const packet_info *pinfo) +{ + wmem_strbuf_t *buf; + wmem_list_frame_t *layers = wmem_list_head(pinfo->layers); + + buf = wmem_strbuf_sized_new(pinfo->pool, 128, 0); + + /* Walk the list of layers in the packet and + return a string of all entries. */ + while (layers != NULL) + { + wmem_strbuf_append(buf, proto_get_protocol_filter_name(GPOINTER_TO_UINT(wmem_list_frame_data(layers)))); + + layers = wmem_list_frame_next(layers); + if (layers != NULL) { + wmem_strbuf_append_c(buf, ':'); + } + } + + return wmem_strbuf_finalize(buf); +} + gboolean proto_is_pino(const protocol_t *protocol) { |