-
I am trying to leverage the nice features automated for the Ethernet interface to create a data bridge to a virtual Ethernet interface as a simulated radio. The wired side may need to be promiscuous as I need to preserve some Layer 3 content including IP and UDP/TCP full headers, but maybe not the Layer 2 Ethernet interface. The wired interface will be configured to "multi home" all IPs that the interface will receive. I am using the familiar multiplexed i/o zsock_select() of Linux lineage for reading and writing between two Ethernet interfaces - one created by Zephyr in the kernel configuration, and one that I will create runtime presumably as a virtual Ethernet interface. I am trying to get to the underlying socket associated with the Zephyr created primary Ethernet interface from the iface (as shown in the code below which will compile when obtaining the file descriptor handle, but I do not think it correct). I assume, perhaps mistakenly, that Zephyr creates a socket as with the promiscuous socket network example. It is also very likely that I will need to create the socket independent of the iface, and associate or bind this socket to the iface. The purpose of this question then is to determine if that is correct, or if the functional iface using the promiscuous behaviors has a functional promiscuous socket buried somewhere that should be exploited to avoid duplication. This application code must run on both native_posix and qemu-riscv, and will eventually run on an embedded board, so it can not be native posix and/or x86 specific. So my questions are:
Attached is a sample test application as I explore the behavior.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This has been resolved, I had a misunderstanding of the relationship between a promiscous interface, and a raw socket that is assigned to that interface. A raw socket is working currently bound to the iface. |
Beta Was this translation helpful? Give feedback.
This has been resolved, I had a misunderstanding of the relationship between a promiscous interface, and a raw socket that is assigned to that interface. A raw socket is working currently bound to the iface.