dcsimg

Alessandro Rubini Archive

The Design of an In-Kernel Server
In last month's column, we took a look at the practice of invoking system calls from within kernel code. This month's column will deal with how a complete network server can be implemented as a kernel thread. The sample code shown throughout this column implements a simplified TFTP server. See the Features of the Sample Code sidebar, pg. 80, for more information.
Making System Calls From Kernel Space
One of the most renowned features of Unix is the clear distinction between what occurs in "kernel space" and what occurs in "user space." This column will describe how to invoke kernel system calls from within kernel code. This is a first step towards understanding how to build a kernel-resident application, such as a high-performance Web server.
Writing Modules for USB
Last month I gave an overview of the USB kernel subsystem, but I didn't have the space needed to show real code at work. This month we'll fill the gap by looking at sample drivers implementing input devices in the USB framework. The code being introduced has been developed and tested on version 2.3.99-pre6 of the Linux kernel, running on an Intel x86 machine.
USB Device Drivers
The Universal Serial Bus, or USB, is a new type of peripheral interconnect that has become popular in recent years and is now standard equipment on most PCs and laptops. USB is an external interface, in that USB devices plug into ports outside of your PC's case; this is as opposed to internal interfaces, such as PCI.
Want to Know What’s Really Going On in the /dev Directory? A Look at devfs
The role of the kernel is mostly related to hardware control, as user-space programs need a way of referring to hardware devices that they wish to use. Some hardware devices are used implicitly, through interfaces such as sockets or filesystems. However, it is often necessary to refer to a hardware device directly -- such as a particular serial port or hard-disk partition. This is accomplished through the use of special device files that are usually found in the /dev directory. The special files are not associated with data stored in the disk; rather, they correspond to particular hardware devices. When user programs access and use these special files, the operation is passed to a device driver in the system kernel. For example, when you issue an open and a read on the /dev/ttyS0 file, data is read from a serial port; the serial-port device driver is invoked whenever /dev/ttyS0 is accessed.
A Look at How Logical Network Interfaces Attach to the Linux Kernel
In the Linux (or Unix) world, most network interfaces, such as eth0 and ppp0, are associated with a physical device that is in charge of transmitting and receiving data packets. However, some logical network interfaces don't feature any physical packet transmission. The most well-known examples of these "virtual" interfaces are the shaper and eql interfaces. This month, we'll look at how this kind of interface attaches to the kernel and to the packet-transmission mechanism.
Kernel Konfiguration
We thoroughly demystify Linux' ultimate rite of passage. It's not as daunting as it once was.