The third module, the queue size logging module creates a log of the queue
size and
(see section 10 for definitions) at a time
interval specified by the user. This takes place on the same host as the
Router module, since these data values are only both available there, but the
Router module does not depend on the logging module. The majority of logging
however was designed into SAM (see section 2.2 for details)
to minimise the load of the FCM modules when installed, and also because these
logging features are better integrated into SAM along with analysis and
graphing tools.
The Router and Receiver modules are both implemented as Linux kernel modules, to be loaded into a 2.4.18 kernel. They will require no modifications to the existing kernel source code, however the kernel must have support compiled in for QoS and Packet Filtering.
The following options must be compiled into the kernel for the module to work:
The module is implemented as a queueing discipline module, and as such must provide the ability to queue packets before finally being dequeued when the network is free to send them. The module is being implemented in this way because to know the size of the queue without modifying the existing kernel source code requires managing the queue ourselves. It also provides the ability to easily modify a packet as it leaves the Router, by simply modifying the packet when it is dequeued.
An alternative implementation would use the Netfilter architecture used for the Receiver module, however this would be overly complicated, due to the interface which expects packets to be returned immediately. Thus the queue length would have to be determined based on the kernel's queue, which would be more difficult. The problem with the QoS implementation is that additional user space commands must be run after the loading of the module. However this was deemed to be acceptable, as only the Router needs this to be performed, and the administrator of the Router is expected to be capable of running these commands.
The Netfilter architecture allows the functionality required to be implemented in either kernel space, as a kernel module, or in user space, using the libipq library. It was decided to implement it as a kernel module for maximum speed, and also because it simplifies installation, as it becomes just another module to load. Being a kernel module does introduce additional complications, with the most notable being the requirement to be re-entrant. This means it must allow for the possibility of being called more than once at any given time. While not a problem on machines with only one processor, on multiprocessor machines the chance for multiple packets passing through the module at any given time becomes a possibility. As such, all data being modified must be protected from corruption (through the use of locks on variables) from other running instances of the module.
An alternative to the Netfilter architecture would be to implement a queueing discipline using the QoS architecture used by the Router. However this would require extra commands to be run by the user after loading of the module, and not all users may be familiar with this. It would also be necessary to maintain two queues, one to see incoming packets and one to modify outgoing packets. Again, this is added complexity which would be placed upon the user. The Netfilter solution overcomes this without presenting any additional problems.
The Receiver module implements two separate components of the FCM functionality: