![](https://pdfstore-manualsonline.prod.a.ki/pdfasset/1/9a/19ab1210-0050-4318-af5a-ad707807fdfe/19ab1210-0050-4318-af5a-ad707807fdfe-bg19.png)
Chapter 5. User-space Loadable Modules
In additionto parts of TUX running inkernel-space, user-loadable modules canalso be writ-
ten for TUX.
The API for the user-loadable modules is currently under development. This section of the docu-
mentation will be updated as the API becomes available.
User-space loadable modules are usually a single .c file and are compiled as a shared li-
braries as a .so file. There can be an unlimited number of user-space HTTP modules, and
they can be compiled in a language of choice. They have full address space protection, can
not crash the kernel, and are unpriviledged.
A list of user-space loadable TUX modules and their location must be specified with the
TUXMODULES parameter in /etc/sysconfig/tux. Refer to Section 3.3 for details.
Starting with TUX version 2.0.13 and kernel patch 2.4.2-P3, user-space loadable modules
do not require special permissions to be activated. Instead, the module is specified using a
common MIMEtype definitionfile. Theuser-space modulesmust endwith thefile extension
.tux or .x and specified with the TUXMODULES parameter in /etc/sysconfig/tux. The file
must be owned by root with root as the group and must be world-readable. It does not have
to be executable. For example, to use the demo.tux user-space loadable module, you might
have the following file:
[root@m /]# ls -l /var/www/html/demo.tux
-rw-rw-r-- 1 root root 0 Sep 3 04:42 /var/www/html/demo.tux
If TUXfinds a URLobject thathas thisMIME type,it searches theinternal listof modules de-
fined as TUXMODULES in/etc/sysconfig/tux. If there is amatch, TUX sends therequest
to the user-space loadable module.
For further information about writing a TUX user-space loadable module, see the file
/usr/share/doc/tux-
version /TUXAPI-user.txt.
25