This is automatically generated documentation. Edit after the "COMMENTS" heading; changes to the main body will be lost.
KernelTap -- Click element; interface to /dev/tap or ethertap (user-level)
KernelTap(ADDR/MASK [, GATEWAY, keywords ETHER, MTU, HEADROOM, IGNORE_QUEUE_OVERFLOWS])
Ports: at most 1 input, 1-2 outputs
Package: userlevel (core)
Reads Ethernet packets from and writes Ethernet packets to a /dev/tun* or /dev/tap* device. This allows a user-level Click to hand packets to the virtual Ethernet device. KernelTap will also transfer packets from the virtual Ethernet device. KernelTap allocates a /dev/tun* or tap* device (this might fail) and runs ifconfig to set the interface's local (i.e., kernel) address to ADDR and the netmask to MASK. If a nonzero GATEWAY IP address (which must be on the same network as the tun) is specified, then KernelTap tries to set up a default route through that host. Keyword arguments are:
Linux will send ARP queries to the fake device. You must respond to these queries in order to receive any IP packets, but you can obviously respond with any Ethernet address you'd like. Here is one common idiom:
tap0 :: KernelTap(192.0.0.1/8) -> fromhost_cl :: Classifier(12/0806, 12/0800); fromhost_cl -> ARPResponder(0.0.0.0/0 1:1:1:1:1:1) -> tap0; fromhost_cl -> ... // IP packets
An error like "could not allocate a /dev/tap* device : No such file or directory" usually means that you have not enabled /dev/tap* in your kernel.
Generated by 'click-elem2man' from '../elements/userlevel/kerneltap.hh:7' on 12/Jul/2011.