I’m building a dissector and I would like to know if it is possible to explicitly declare about errors. for example: If something’s length should be 0, but it doesn’t, then I want to say “error, something is wrong”
Thanks ahead.
Thanks to “SidR”, You should take the following line, and do variations on him.
(remember to include epan/expert.h )
expert_add_info_format(pinfo, acp_data_tree, PI_MALFORMED, PI_WARN, "Length > 0");
Check out on expert infos.
I think the necessary functions are on “epan/expert.h”. You can look at “epan/dissector/packet-tcp.c” for an example implementation.