[Click] IPRewriter and ICMP packets

Erik VandeKieft evandeki at cs.ucsd.edu
Fri Jul 30 16:16:38 EDT 2004


> Can you be more clear about what semantics you want here?  IPRewriter is a NAPT
> (network address/port translator), so it requires port numbers on its input
> packets.  ICMP ping packets don't have ports.

I basically need an ICMPPingRewriter that has the ability to rewrite
source and destination addresses based on the contents of an IPRewriter
element, just as ICMPRewriter can.

(I use a NAPT IPRewriter because I want flows to be distinguished by the
4-tuple of sourceaddr/srcport/dstaddr/dstport, but I never actually
translate any ports. I have my own classes that extend IPMapper, but they
never change ports around.)

> The ICMPRewriter class *does* rewrite packet headers as well as packet contents,
> or at least it should.  But it only applies to error packets (i.e. not pings).

So I guess basically my question is, why is it ICMPRewriter can take an
IPRewriter element as input but ICMPPingRewriter cannot? And what's the
easiest way to get that kind of functionality for ICMP pings?

--Erik

On Fri, 30 Jul 2004, Eddie Kohler wrote:

> Erik VandeKieft wrote:
> > I noticed that ICMP packets that enter an IPRewriter element disappear and
> > don't make it out any of the outputs. What happens to them, are they
> > dropped on the floor? Why?
> >
> > I know that there is a seperate ICMPRewriter class, but I that only seems
> > to rewrite the packet contents, not the actual IP headers. I need to
> > rewrite the source and destinations of ICMP packets, including pings, and
> > ICMPPingRewriter only allows you to do it for one static source and
> > destination, whereas I need it to be dynamic based on an IPRewriter's
> > table.
> >
> > Do I need to implement this myself or can click already accomplish this?



More information about the click mailing list