Running the HelenOS with networking

Starting the networking

After starting the HelenOS boot image in Qemu, the command line appears. To run Qemu a script contrib/conf/qemu.sh for Linux or contrib/conf/qemu.bat for Windows in the HelenOS source directory can be used. The provided scripts set the needed arguments:
-vga std -M isapc -net nic,model=ne2k_isa -net user -redir udp:8080::8080 -redir udp:8081::8081 -boot d -cdrom image.iso
Additional arguments may be specified on the command line, they override these set.

The networking stack is started and initialized by running a command
# netstart
The networking stack is then started and configured network interfaces are enabled. The current configuration is printed out. Since that networking applications can be run using the command line as well.

Qemu network

In the common mode Qemu creates a simple network with a gateway and settles the guest system in. The network is 10.0.2.*, the gateway's address 10.0.2.2 and the guest system has 10.0.2.15. Even this simple setting was a bit hard to find in the documentation. Therefore a static configuration is possible and no additional DHCP nor BOOTP implementations are necessary. On the other hand the guest system is behind a firewall. Qemu may be configured to forward some ports to the guest system and allows all outgoing traffic except ICMP and ARP protocols, so you can ping only the gateway.

Applications

A few networking applications are located in the app/ directory. Common functions for parsing command line arguments and printing textual networking error messages are located in that directory as well. The networking applications should be built with the libsocket library located in the socket/libsocket.a file. They can use functions and definitions from the include/socket.h header file which contains socket API and further includes:


Generated on Thu Mar 11 20:46:22 2010 for Networking and TCP/IP stack for HelenOS system by  doxygen 1.6.1