Need help for wirte pulgin

hi, zeeker:

I am try to write a PacketAnalyzer plugin use init-plugin, it does the same work as the vxlan built-in plugin, but my zeek script(PacketAnalyzer::register_for_ports(PacketAnalyzer::ANALYZER_UDP, PacketAnalyzer::ANALYZER_MYTEST, vxlan_ports)) runs with an error:

error in ./main.zeek, ​​line 19: unknown identifier PacketAnalyzer::ANALYZER_MYTEST, at or near “PacketAnalyzer::ANALYZER_MYTEST”

I don’t know where and how to define my PacketAnalyzer::ANALYZER_MYTEST. and i cannot find where the built-in PacketAnalyzer::ANALYZER_VXLAN define.

Thank you for your help!

Hey @liuchuang - any chance you could upload your code to GitHub for inspection?

If not, please be more detailed in how you compile/run Zeek.

Thanks,
Arne