-
I want to configure a primary Ethernet Interface in Zephyr that will support a range of IPv4 IP addresses (all within the same IP subnet) as well as a range of multicast addresses (all in the same IP subnet). This would be roughly equivalent to the Linux "alias" command for multi-homing an Ethernet interface to support a range of IPs. How is this accomplished through kernel configurations, and is there a cap on either Ipv4 addresses or multicast addresses for the standard Ethernet interface? I would want to handle i/o from that interface using a UDP and TCP BSD socket, presumably not bound to any IP, but I would need to know the destination IP and destination UDP port for routing. TCP will be necessary for a Telnet session. Assuming I am unable to provide for a range of IPs on this interface through kernel or runtime configuration, I would like to combine a UDP and TCP sockets with a raw socket on the same device interface as the primary Zephyr Ethernet interface. Certainly, using a promiscuous socket provides access to all IPs as well as the entire Ethernet UDP header, but then I would have to reconstruct the UDP header for outgoing packets without leveraging the interface ARPing and UDP header creation that occurs within the IP stack. Can these ambitions all be accomplished on the same interface, i.e. a promiscuous raw socket operating at Layer 2 along with a UDP unbound socket and TCP socket operating at Layer 3 within Zephyr? The following kernel configuration can be used to set a value, but what is the maximum?
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
There is no maximum, only the amount of memory limits it.
The IP addresses need to be assigned to the interface at runtime by your application. Just use this function for doing it
I could not follow what you are trying to do here. It is possible to have both raw and UDP sockets open at the same time. As you noticed the
If you create |
Beta Was this translation helpful? Give feedback.
There is no maximum, only the amount of memory limits it.
The IP addresses need to be assigned to the interface at runtime by your application. Just use this function for doing it