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

FromDevice.b Element Documentation


FromDevice.b -- Click element; reads packets from network device (BSD kernel)



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


This manual page describes the BSD kernel module version of the FromDevice element. For the user-level element, read the FromDevice.u manual page. Intercepts all packets received by the BSD 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 pulls packets from a per-interface queue in the context of the Click kernel thread. It emits at most BURST packets per scheduling; BURST is 8 by default. At interrupt time, the kernel queues packets onto the per-interface queue if there is a FromDevice attached to that interface. If PROMISC is set (by default, it is not), then the device is put into promiscuous mode while FromDevice is active. Keyword arguments are:

Boolean. Same as the PROMISC argument.
Unsigned integer. Same as the BURST argument.
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.


The BSD network stack (above the device layer) won't see any packets from the device. If you want BSD to process packets, you should hand them to ToBSD. FromDevice accesses packets the same way BSD does: through interrupts. Performance is system-dependent (FreeBSD has a native polling mode which can be used for better performance and stability).


ToDevice, FromHost, ToHost, FromDevice.u

Generated by 'click-elem2man' from '../elements/bsdmodule/fromdevice.hh' on 24/May/2007.


elements/fromdevice.b.txt · Last modified: 2007/05/24 00:16 (external edit)
Recent changes RSS feed Driven by DokuWiki