Table of Contents

This is automatically generated documentation. Edit after the "COMMENTS" heading; changes to the main body will be lost.

FromDevice Element Documentation

NAME

FromDevice -- Click element; reads packets from network device (Linux kernel)

SYNOPSIS

FromDevice(DEVNAME [, keywords PROMISC, BURST, TIMESTAMP...])

Ports: no inputs, 1 output
Processing: push
Drivers: linuxmodule
Package: linuxmodule (core)

DESCRIPTION

This manual page describes the Linux kernel module version of the FromDevice element. For the user-level element, read the FromDevice.u manual page. Intercepts all packets received by the Linux network interface named DEVNAME and pushes them out output 0. The packets include the link-level header. DEVNAME may also be an Ethernet address, in which case FromDevice searches for a device with that address. FromDevice receives packets at interrupt time. As this happens, FromDevice simply stores the packets in an internal queue. Later, in the Click kernel thread -- that is, not at interrupt time -- FromDevice emits packets from that queue as it is scheduled by the driver. It emits at most BURST packets per scheduling; BURST is 8 by default. Keyword arguments are:

PROMISC
Boolean. If true, the device is put into promiscuous mode while FromDevice is active. Default is false.
BURST
Unsigned integer. Sets the BURST parameter.
TIMESTAMP
Boolean. If true, then ensure that received packets have correctly-set timestamp annotations. Default is true.
QUIET
Boolean. If true, then suppress device up/down messages. Default is false.
ALLOW_NONEXISTENT
Allow nonexistent devices. If true, and no device named DEVNAME exists when the router is initialized, then FromDevice will report a warning (rather than an error). Later, while the router is running, if a device named DEVNAME appears, FromDevice will seamlessly begin outputing its packets. Default is false.

NOTES

Linux won't see any packets from the device. If you want Linux to process packets, you should hand them to ToHost. FromDevice accesses packets the same way Linux does: through interrupts. This is bad for performance. If you care about performance and have a polling-capable device, use PollDevice instead. Linux device drivers, and thus FromDevice, should set packets' timestamp, packet-type, and device annotations.

SEE ALSO

PollDevice, ToDevice, FromHost, ToHost, FromDevice.u

Generated by 'click-elem2man' from '../elements/linuxmodule/fromdevice.hh' on 18/Sep/2007.

COMMENTS