Linux QoS Library (LQL)

(Back to

The Linux QoS Library (LQL) provides a GPL licensed, GObject based C API to manipulate the network queueing disciplines, classes and classifiers in the Linux kernel. LQL does not use the TC command as a back-end. Instead, LQL communicates with the Linux kernel via Netlink sockets the same way TC does.

At the present time, LQL implements a subset of the Linux network QoS features exposed by the TC command. Hopefully, this will change as the library matures.

In an ideal world TC would be implemented with a high(er) level API like LQL so that new kernel network QoS features would be immediately available to third party applications using the high level library. Who knows what interesting innovations would have been created around the Linux network QoS features over the last few years if there was an easier API to manipulate them. LQL is an attempt to fill this need.

The only requirements other than a Linux kernel with the network QoS features enabled are GLib and GTK-Doc. GLib provides GObject as well as many other features that make C programming much more productive. GLib is required by many programs on a modern Linux distribution so you should not have to install it. If you are building from source the GLib development packages from your distribution will be required. GTK-Doc is used to generate the API documentation. Your distribution will almost certainly have packages for GTK-Doc because GLib, GTK+ and GNOME use it for source code documentation.

Although LQL allows the manipulation of the kernel queueing disciplines, classes and classifiers without using TC it still requires that you understand what each type of discipline, class or classifier is capable of. The LQL API documentation does not attempt to explain these details. The Linux Advanced Routing & Traffic Control HOWTO is the best way to learn about the possibilities. Once you know how to manipulate the elements with TC the LQL API will make a lot more sense. Also, the examples/ and tests/ directories in the source distribution contain several small programs that should give an idea of how to use the library.

Supported features
Queueing disciplines currently supported by LQL:

Classifiers currently supported by LQL:

All QoS elements in LQL are implemented as GObjects. GObject is part of GLib and is used extensively in GNOME/GTK+ programs. One of the key design criteria for GObject is that creating high level language bindings to GObjects be easy. There are programs that can automate the creation of these bindings. Although only Mono bindings are currently available it should be quite simple to create bindings for Python.

Not all queueing disciplines, classes or classifiers are currently supported by LQL. Future work will entail adding support for some of the missing elements as well as fleshing out all of the options on the currently supported elements.

From following the Linux-Netdev mailing list it looks like Netlink will become the preferred way to manipulate all of the Linux networking features. This includes things like setting the MTU and other network interface parameters. It would be nice if LQL could control more than just QoS features.


Check XHTML Check CSS
Dan Siemon <>