Skip to content
Eddie Kohler edited this page Oct 17, 2017 · 2 revisions

LinuxIPLookup Element Documentation

NAME

LinuxIPLookup — Click element; interface to Linux's routing table

SYNOPSIS

LinuxIPLookup(if0, if1, ..., ifN)

Ports: 1 input, 1 or more outputs
Processing: agnostic
Drivers: userlevel

DESCRIPTION

Looks up each packet's destination annotation address in the Linux routing table. Replaces the annotation with the routing table entry's gateway field (if non-zero). Emits the packet on an output that depends on the Linux interface device mentioned in the routing table entry: if the device name is the Ith configuration argument, the element sends the packet on output I (zero origin).

If the packet can't be routed, the element emits it on the output with number equal to the number of configuration arguments. A packet can't be routed if there is no matching routing table entry, or if the device mentioned in the Linux routing table isn't mentioned in the configuration.

If run outside the kernel, the element reads the routing table just once (at startup) from /proc/net/route.

EXAMPLES

 r : LinuxIPLookup(eth0, eth1)
 r[0] -> ... -> ToDevice(eth0)
 r[1] -> ... -> ToDevice(eth1)
 r[2] -> ICMPError(18.26.4.24, 3, 0) -> ...

SEE ALSO

RadixIPLookup, DirectIPLookup, RangeIPLookup, StaticIPLookup, LinearIPLookup, SortedIPLookup

Generated by click-elem2man from ../elements/ip/lookupiproutelinux.hh:7 on 2017/10/17.

Clone this wiki locally