"indelicato@inwind.it": Problems with FromDevice?

Eddie Kohler kohler at icir.org
Tue Jul 23 11:09:19 EDT 2002


Hi Mario,

The man page for IPPrint says:

> Expects IP packets as input.

In Click this has special meaning. In particular, it means that the
packet's IP header annotation must have been set. Elements that do this
include CheckIPHeader, CheckIPHeader2, and MarkIPHeader.

FromDevice does not set the IP header annotation on packets it emits.
Partially this is because some of the packets it emits are not IP packets;
they can be ARP responses or ARP replies, for example (if it's an Ethernet
device).

So before using IPPrint, you must select out IP packets, and then set their
IP header annotations. Like this, for example:

FromDevice(eth1) -> {
  input -> c::Classifier(12/0800, -);
  c[0] -> MarkIPHeader(14) -> IPPrint -> output;
  c[1] -> output;
} -> [0]c1;

Eddie




More information about the click mailing list