Proposal: expose eth_handle to enable promiscuous mode in user modules #17221
Unanswered
orbison
asked this question in
Core Development
Replies: 1 comment
-
I would suggest opening a PR, and make sure to add a flag to optionally enable the functionality. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there,
First-time post here - I've been working with MicroPython for a bit and figured I'd share something that might be helpful.
I’ve been developing a project that involves listening for broadcasts on the network and processing them in MicroPython code. For this to work - at least on the ESP32 port - promiscuous mode must be enabled on the interface by calling ioctl with an eth_handle. However, eth_handle is part of the internal lan_if_obj_t structure within the network_lan module.
To allow user-written C modules to use ioctl with this handle, I’ve added a simple function called get_eth_handle, and I’d like to propose it for inclusion in the main tree.
Do you consider this a worthwhile addition? Should I go ahead and submit a pull request?
As a follow-up, I’m planning to submit a new module, eth_sniffer, which takes a network.LAN instance, a queue, and a lock, and appends packets sniffed from the network into the queue while using the lock for synchronisation.
Comments and suggestions are very welcome :-)
- Ross
Beta Was this translation helpful? Give feedback.
All reactions