RTnet:Main
From Xenomai
Contents |
[edit] Overview
RTnet has been designed to lend real-time networking functionality to both the RTAI and Xenomai environments. This document seeks to serve as a springboard for the beginner into RTnet. The following links gives more information regarding various aspects of the installation and programming of RTnet.
[edit] RTnet Structure
After the installation of RTnet there should be two folders of interest regarding RTnet.
[edit] Source Folder
The first is the RTnet source where the RTnet source code is located. Its default location is at
/usr/src/rtnet-x.y.z
This folder will in future be referenced to as <rtnet_src>. In this folder the raw RTnet code is located. The sub folders of interest to the normal programmer is the Documentation/ and examples/ folders. The Documentation/ folder contains basic information regarding the structure and used of functionalities in RTnet. On the other hand the examples/ folder contains the source code of the examples that has been compiled and placed in the <rtnet_install>/examples folder.
[edit] Installation Folder Overview
The second folder of interest is the folder where RTnet was installed into. The default location for this would be
/usr/local/rtnet
This folder will be referred to in the future as <rtnet_install>. The installation folder contains all of the compiled executables and kernel modules needed to run RTnet. The sub folders in <rtnet_install> are discussed next.
- etc
- The setup configuration files of RTnet are located in this folder. The two files are rtnet.conf and tdma.conf. The setup and use of tdma.conf is discussed under the rtnet.conf file description.
- examples
- The compiled RTnet examples are placed here. To find the source of these examples look under <rtai_src>/examples
- sbin
- In this folder there are various scripts that are used to run and configure RTnet. See RTnet:sbin for more details regarding these scripts.
- include
- This is the folder that contains the include files that will be used in compliling any RTnet programs.
- modules
- The compiled modules for RTnet and all of the components to make it run efficiently along with the real-time device drivers, are located here.
[edit] Installation Folder Details
The code of the RTnet project is organized in a modular way. The usual big picture is a tdma realtime fieldbus, but you can also use rtnet for much simpler tasks, such as realtime point-to-point communication. For simpler tasks, you may not need all of RTnet. This should help you to get an overview of the inner structure of rtnet and what its (inner) dependencies are. Also consider looking at the RTnet Kickoff-Workshop slides (german).
This is a rtnet installation directory, compiled with some more options enabled than by default. It consists of several kernel modules, linux programs and config files. Feel free to verify and extend (and add or remove incompleteness notices).
/usr/local/rtnet the default rtnet installation directory /usr/local/rtnet/modules all rtnet kernel modules /usr/local/rtnet/modules/rtnet.ko kernel module: rtnet depends: loaded modules for rtai/xenomai including rtdm communicates with userspace via device file: /dev/rtnet rt-network-device-driver depend on this module loaded this is the most important part of rtnet, nothing works without it. source: <rtnet-src>/stack/*.c (excluding subdirs, except for include) documentation: <rtnet-src>/Documentation/README.pools <rtnet-src>/Documentation/README.routing /usr/local/rtnet/modules/rtnetproxy.ko kernel module: rtnetproxy !! unverified !! depends: kernel module: rtnet kernel module: rtmac source: <rtnet-src>/addons/rtnetproxy.c documentation: <rtnet-src>/Documentation/README.rtnetproxy /usr/local/rtnet/modules/rtipv4.ko kernel module: rtipv4 depends: kernel module: rtnet source: <rtnet-src>/stack/ipv4/ documentation: <rtnet-src>/Documentation/README.ipfragmentation /usr/local/rtnet/modules/rtpacket.ko kernel module: rtpacket depends: kernel module: rtnet source: <rtnet-src>/stack/rtpacket/ /usr/local/rtnet/modules/rtmac.ko kernel module: rtmac !! unverified !! depends: kernel module: rtnet source: <rtnet-src>/stack/rtmac/ documentation: <rtnet-src>/Documentation/README.rtmac <rtnet-src>/Documentation/RTmac.spec /usr/local/rtnet/modules/tdma.ko kernel module: tdma !! unverified !! depends: kernel module: rtnet kernel module: rtmac conflicts: nomac source: <rtnet-src>/stack/rtmac/tdma/ documentation: <rtnet-src>/Documentation/TDMA.spec /usr/local/rtnet/modules/nomac.ko kernel module: nomac !! unverified !! depends: kernel module: rtnet kernel module: rtmac conflicts: tdma source: <rtnet-src>/stack/rtmac/nomac/ /usr/local/rtnet/modules/rtcfg.ko kernel module: rtcfg this doc entry is TBD source: <rtnet-src>/stack/rtcfg/ documentation: <rtnet-src>/Documentation/README.rtcfg <rtnet-src>/Documentation/RTcfg.spec /usr/local/rtnet/modules/rt_rt2x00core.ko /usr/local/rtnet/modules/rt_rt2500pci.ko /usr/local/rtnet/modules/rt_3c59x.ko /usr/local/rtnet/modules/rt_r8169.ko /usr/local/rtnet/modules/rt_e1000.ko /usr/local/rtnet/modules/rt_tulip.ko /usr/local/rtnet/modules/rt_8139too.ko /usr/local/rtnet/modules/rt_eepro100.ko /usr/local/rtnet/modules/rt_natsemi.ko /usr/local/rtnet/modules/rt_pcnet32.ko /usr/local/rtnet/modules/rt_smc91111.ko /usr/local/rtnet/modules/rt_via-rhine.ko /usr/local/rtnet/modules/rt_loopback.ko those are all rt-network-device-drivers depends: kernel module: rtnet source: <rtnet-src>/drivers/ (one file per module) documentation: <rtnet-src>/Documentation/README.drvporting /usr/local/rtnet/modules/rtcap.ko kernel module: rtcap depends: kernel module: rtnet at least one rt-network-device-driver loaded _before_ rtcap, or module will not load source: <rtnet-src>/addons/rtcap.c documentation: <rtnet-src>/Documentation/README.rtcap /usr/local/rtnet/include /usr/local/rtnet/include/rtnet.h /usr/local/rtnet/include/rtmac.h /usr/local/rtnet/etc /usr/local/rtnet/etc/rtnet.conf config file: etc/rtnet.conf for linux program: rtnet /usr/local/rtnet/etc/tdma.conf /usr/local/rtnet/sbin all rtnet tools (linux programs) /usr/local/rtnet/sbin/rtifconfig linux progarm: rtifconfig similar to linux program ifconfig depends: device file: /dev/rtnet kernel module: rtnet supports: kernel module: rtipv4 (can set or displays additional config when rtipv4 is loaded) source: <rtnet-src>/tools/rtifconfig.c /usr/local/rtnet/sbin/rtiwconfig linux progarm: rtiwconfig probably similar to rtifconfig source: <rtnet-src>/tools/rtiwconfig.c /usr/local/rtnet/sbin/rtping linux progarm: rtping similar to linux program ping depends: device file: /dev/rtnet kernel module: rtnet kernel module: rtipv4 see Mailinglist at least one rt-network-device-driver, or "host [...] unreachable" / "ioctl: No route to host" source: <rtnet-src>/tools/rtping.c /usr/local/rtnet/sbin/rtroute linux progarm: rtroute similar to linux program route depends: device file: /dev/rtnet kernel module: rtnet kernel module: rtipv4 at least one rt-network-device-driver, or table always empty does not depend on: config option "IP Network Routing" or "IP Router" source: <rtnet-src>/tools/rtroute.c /usr/local/rtnet/sbin/rtcfg linux progarm: rtnet depends: loaded modules for rtai/xenomai including rtdm config file, like etc/rtnet.conf uses much more than just rtnet kernel module (as name might suggest) probably does not make sense without rtcfg, rtmac and tdma configures system according to config file. Is a shell script. /usr/local/rtnet/sbin/tdmacfg /usr/local/rtnet/sbin/rtnet /usr/local/rtnet/examples /usr/local/rtnet/examples/generic /usr/local/rtnet/examples/generic/linux_client /usr/local/rtnet/examples/generic/linux_server /usr/local/rtnet/examples/rtai /usr/local/rtnet/examples/rtai/rtnet_ifs /usr/local/rtnet/examples/rtai/simpleclient /usr/local/rtnet/examples/rtai/simpleserver /usr/local/rtnet/build symlink to build dir /usr/local/rtnet/source symlink to source dir /usr/local/rtnet/symbols symlink to symbols dir in build dir
Replace /usr/local/rtnet with your own installation directory if needed.


