next up previous
Next: The Character Device Up: Linux Device Drivers for Previous: Compiling and Installing the

Using the Device Driver

Once the krpc module has been successfully compiled and installed, it actually creates two different ``personalities.'' The first is a character device (e.g., /dev/rpc), described in Section 5. The character device can be used to transmit arbitrary data from one station to another using a simple file interface; e.g. ``echo hello > /dev/rpc'' will transmit the string hello.

The second personality is a network interface (rpc0), described in Section 6. The network interface can be used to create a peer-to-peer IP network using the RPC radios. This interface can be configured in the normal way (i.e., using ifconfig).

Only one of these personalities can be used at a time. Multiple processes are allowed to access the device simultaneously; however, all accesses must be using the same personality at the same time. For example, if the network interface is configured and up, any attempt to use the character interface will return an error of EBUSY or EAGAIN.



Jeremy Elson 2000-07-11