/** \mainpage Networking and TCP/IP Stack for HelenOS system \section introduction Introduction
For the microkernel HelenOS a completely new networking stack was designed. The networking stack was intended to implement current basic standards of the TCP/IP Stack. Only the minimalistic functionality allowing the stack to function was to be implemented. The networking stack is written in C.
Please see
To compile the HelenOS from sources (the cross compilers from the build/
directory are recommended):
# make config
# make
The image.iso
should be created on success.
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.
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.
\section applications ApplicationsA 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:
The networking and TCP/IP stack is implemented for the ia32 architecture on top of HelenOS 0.4.1 (Escalopino), the most current stable release of HelenOS. So far the only one operational network interface supported is in Qemu 0.10.2 and newer. 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 qemu and its libraries have to be installed and in the path. These scripts set all the necessary parameters with some ports redirected from the local host to the guest system. For testing purposes at least a low level communication application is recommended, N.E.T., netcat etc.
In order to build HelenOS and the networking stack from sources a few tools are required:
All these can be downloaded and installed as cross–compilers on Linux using a script contrib/toolchain.sh in the HelenOS source directory. In addition rats, a static source code analyzer, and Doxygen, a documentation generator, were used. All development was tracked in the HelenOS subversion repository.
The scenarios contain the following shortcuts: