**This is automatically generated documentation.** Edit after the "[[#COMMENTS|COMMENTS]]" heading; changes to the main body will be lost. ====== PollDevice Element Documentation ====== ===== NAME ===== **PollDevice** -- Click element; polls packets from network device (kernel) ===== SYNOPSIS ===== PollDevice(DEVNAME [, //keywords// PROMISC, BURST, TIMESTAMP...]) **Ports**: no inputs, 1 output\\ **Processing**: push\\ **Drivers**: linuxmodule\\ **Package**: linuxmodule (core)\\ ===== DESCRIPTION ===== Poll packets received by the Linux network interface named DEVNAME. Packets will be pushed to output 0. The packets include the link-level header. DEVNAME may also be an Ethernet address, in which case PollDevice searches for a device with that address. Each time PollDevice is scheduled, it emits at most BURST packets. By default, BURST is 8. This element is only available in the Linux kernel module. 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. ? **HEADROOM** ! Unsigned. Amount of extra headroom to request on each packet. Default is 64. ? **ALLOW_NONEXISTENT** ! Allow nonexistent devices. If true, and no device named DEVNAME exists when the router is initialized, then PollDevice will report a warning (rather than an error). Later, while the router is running, if a device named DEVNAME appears, PollDevice will seamlessly begin emitting its packets. Default is false. ? **UP_CALL** ! Write handler. If supplied, this handler is called when the device or link comes up. ? **DOWN_CALL** ! Write handler. If supplied, this handler is called when the device or link goes down. ===== NOTES ===== Linux won't see any packets from the device. If you want Linux to process packets, you should hand them to [[ToHost]]. Also, if you would like to send packets while using PollDevice, you should also define a [[ToDevice]] on the same device. This element can only be used with devices that support the Click polling extension. We have written polling patches for the Tulip Ethernet driver. Linux device drivers, and thus [[FromDevice]], should set packets' timestamp, packet-type, and device annotations. ===== ELEMENT HANDLERS ===== ? **count (read-only)** ! Returns the number of packets PollDevice has received from the input card. ? **reset_counts (write-only)** ! Resets ''count'' counter to zero when written. ===== SEE ALSO ===== [[FromDevice]], [[ToDevice]], [[FromHost]], [[ToHost]] Generated by 'click-elem2man' from '../elements/linuxmodule/polldevice.hh' on 7/Mar/2009. ===== COMMENTS =====