zeek-af_packet-plugin
zeek-af_packet-plugin copied to clipboard
Provide more context in error messages
When users encounter a hiccup in the configuration/use of an interface, they often see the message problem with interface af_packet::XYZ (Invalid argument)
. Two improvements would be nice:
- More context about the cause. The code already has information, but prioritizes
errno
over it, as in this example:Error(errno ? strerror(errno) : "unable to create socket");
. It'd be nice to keep that context in any case and enhance it with thestrerror()
if available. - For specific cases where people tend to slip up, like when multiple interfaces are configured with the same fanout ID, it'd be nice if the code could alert to that explicitly.