aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ncp.c
diff options
context:
space:
mode:
authorRoland Knall <rknall@gmail.com>2022-06-09 22:10:49 +0200
committerRoland Knall <rknall@gmail.com>2022-06-10 09:17:52 +0200
commit0640b711eab0dd6856fd6e003d701334037db5e3 (patch)
tree7228cf366843e09a0048d2fecebc89dc9c33243f /epan/dissectors/packet-ncp.c
parent2cf938cfa89ff56a35812067f024045652c3041b (diff)
tap: Mark filtered packets instead of dropping them
Allows packets to be filtered but marked and not removed from the tap listing. Additionally a total is calculated for all rx/tx frames and bytes
Diffstat (limited to 'epan/dissectors/packet-ncp.c')
-rw-r--r--epan/dissectors/packet-ncp.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/epan/dissectors/packet-ncp.c b/epan/dissectors/packet-ncp.c
index 2f4ff573a1..fce248d91e 100644
--- a/epan/dissectors/packet-ncp.c
+++ b/epan/dissectors/packet-ncp.c
@@ -756,9 +756,11 @@ static const char* ncp_conv_get_filter_type(conv_item_t* conv _U_, conv_filter_t
static ct_dissector_info_t ncp_ct_dissector_info = {&ncp_conv_get_filter_type};
static tap_packet_status
-ncp_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip, tap_flags_t flags _U_)
+ncp_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip, tap_flags_t flags)
{
conv_hash_t *hash = (conv_hash_t*) pct;
+ hash->flags = flags;
+
const struct ncp_common_header *ncph=(const struct ncp_common_header *)vip;
guint32 connection;
@@ -778,9 +780,11 @@ static const char* ncp_host_get_filter_type(hostlist_talker_t* host _U_, conv_fi
static hostlist_dissector_info_t ncp_host_dissector_info = {&ncp_host_get_filter_type};
static tap_packet_status
-ncp_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip _U_, tap_flags_t flags _U_)
+ncp_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip _U_, tap_flags_t flags)
{
conv_hash_t *hash = (conv_hash_t*) pit;
+ hash->flags = flags;
+
/*const ncp_common_header *ncphdr=vip;*/
/* Take two "add" passes per packet, adding for each direction, ensures that all