Using FreeRTOS plus TCP created a simple web server from examples. But what I need is to be able to have the web page simultaneously accessible as two different IP addresses e.g. 192.168.1.27 and 192.168.2.55. Is there an example of:
creating two IP addresses for the same physical Ethernet adapter
connecting each of those to the same web server
Does this require a second thread, i.e. a mostly copy of net_thread_entry, or can
the one thread be setup to manage both addresses?
FreeRTOS-Plus-TCP is now supporting multiple endpoints (1 endpoint for 1 IP address) in 4.0.0 version. Please feel free to try with our latest tag, which is v4.0.0-rc3.
Take FreeRTOS_Plus_TCP_Echo_Posix as example, you can create multiple endpoints with different IP addresses on same network interface (like here) before calling FreeRTOS_IPInit_Multi(). Then you can have two(or more) IP address on same physical Ethernet adapter.
No, it’s not necessary to have multiple threads to poll same network interface. But it’s necessary to update the NetworkInterface.c to support this, like PR#701 did on each port.
Please let me know if you have any other question.