Skip to content

Conversation

@WTPENGUIN
Copy link

Hello,

Please note that I am not fluent in English, so I used a translation tool to write this pull request. I apologize in advance for any awkward wording.

This contribution introduces a sniffer feature, inspired by the functionality provided in mavlink-router. The purpose is to enable a similar capability directly in mavp2p, allowing users to conveniently inspect MAVLink traffic without relying on external tools.

To use the sniffer feature, specify the desired system ID with the --sniffer-sysid startup option. This system ID will then be treated as a "sniffer." When enabled, mavp2p will attempt to forward all incoming packets to the designated sniffer. The default value is 0 (zero), which disables the feature. If forwarding is attempted back to the same sender (self-forwarding) or if the node with the specified sniffer system ID is not present on the network, a warning will be displayed and the forwarding will not be performed.

mavp2p --sniffer-sysid=30 udps:0.0.0.0:14550 # System ID 30 is treated as a 'sniffer'

I am not very familiar with the Go language, so some parts of my implementation may not fully follow common practices or might look unusual. I would greatly appreciate any feedback or suggestions for improvement.

Thank you for your consideration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant