IP network bypassing mechanisms #55455
-
My question is, does Zephyr provide a means to bypass the IP network entirely and be able to send and receive data? e.g. Send/receive audio wrapped in UDP/IP headers directly to/from the ethernet peripheral. Just to make things a bit more complicated, would it be possible to also send/receive UDP/IP data via the network stack? So in essence one type of data designated by its UDP/IP parameters would need to bypass the stack whereas another set of data should traverse the IP stack. If such mechanisms exist, is it possible to point me at samples, config params, any available docs? Any help is always much appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
If you have network interface and do not want to use a packet sockets, then it is possible to call If you just want to send raw UDP/IP packets that you construct yourself, then I would recommend using the packet socket type in which case you could still use normal BSD socket interface to send/receive normal application data in the same network interface. |
Beta Was this translation helpful? Give feedback.
If you have network interface and do not want to use a packet sockets, then it is possible to call
net_send_data()
directly to send pre-formatted data. Note that you would need to build the data packet yourself with all the needed protocol layers.For the RX side, it is more complicated and for normal IP traffic not possible. You could have your own L2 layer and then you would receive all the network packets for a specific network interface, but then you cannot use the normal sockets to receive those packets.
Of course as the source code is available, you can certainly tweak the sources as you wish, see
net_recv_data()
that is called by network device driver when a packet is received, and…