Configuring Cosmos for TCP/IP Development
Currently we only support the RTL8139 Ethernet chip, and UDP. But RTL8139 is one of the most common chip sets used today, so this covers quite a bit.
The easiest way to test is using QEMU, and QEMU does offer RTL8139 as one of its Ethernet emulations. To set up for TCP/IP testing:
- Download OpenVPN. Do not download 2.0 as it is from 2006, instead be sure to get 2.1 even though it is RC as it has x64 and Vista compatibility.
- Install OpenVPN, but uncheck all options except TAP Adaptor. This will cause OpenVPN to install a "dummy" network connection which QEMU supports for connection between the QEMU guest and the host.
- In network connections, rename the TAP connection to CosmosTAP
- Build a Cosmos project, select RTL8139 for Ethernet, and check "Enable TAP" option.
- Now build and run your project. The TAP adapter will automatically be assigned an IP address of 10.0.2.15
- Any clients or servers on the host must be started after QEMU starts. This is because each time QEMU runs it reconnects the TAP adapter. Running clients or servers before it is connected, and they will not see it and thus will not be able to bind to that network interface.