The application relates to a LWIP
protocol stack expansion and multi-network card implementation method for spatial real-time
network communication, and introduces a LWIP
protocol stack and a LWIP_vlan
protocol stack, wherein the LWIP_vlan protocol stack is obtained by adding a suffix vlan to all symbols in the
source code of the LWIP protocol stack, modifying the LWIP protocol stack into the LWIP_vlan protocol stack, and then expanding the function of the LWIP_vlan protocol stack to support a VLAN
label and a spatial real-time network function; the LWIP protocol stack and the LWIP_vlan protocol stack are integrated into the same
software engineering, tasks are created, network card interfaces are added, threads for receiving and
processing network data packets are created, and socket threads for providing network
programming interfaces are created under the two protocol stack
modes; for the LWIP_vlan protocol stack, a spatial real-time network function module is initialized, and the function of a low_level_output_vlan function is expanded, so that the two protocol stacks are simultaneously supported by the multi-network card. The application supports flexible switching
modes, protocols and standards of the multi-network card, ensures accurate
data transmission and reception, simultaneously supports various network cards and device types, and realizes more
extensive data exchange and integration.