IPRewriter and IPMapper

Will Stockwell bigwill at mit.edu
Wed Apr 16 16:17:41 EDT 2003


Cool.  That change makes my element work, but RoundRobinIPMapper seems to
be still.  It also implements notify_rewriter(...) whereas the one I've
written does not, maybe that needs to be virtual as well?  The two times
I've tried RoundRobin, I've gotten a lot of NULL pointer deference
problems (the machine is not in close phyiscal proximity to me, so I don't
have the luxury of rebooting and trying again).


Will

On Mon, 14 Apr 2003, Eddie Kohler wrote:

> > So it seems as if the IPRewriter is not making any sort of requests to the
> > IPMapper.  As a sanity check, I setup this same configuration using a
> > RoundRobinIPMapper with a single pattern for null mapping "- - - -", only
> > to have the same problem.  If I put patterns directly into IPRewriter, it
> > seems to work fine.  Thus, I am led to believe that I am somehow
> > misconfiguring the interaction between IPRewriter and an IPMapper.  Can
> > anyone confirm my suspicions?  Perhaps my understanding of IPRewriter is
> > insufficient?
>
> No the true problem is that I AM AN IDIOT.
>
> Can you tell why? Diff:
>
> Index: elements/ip/iprw.hh
> ===================================================================
> RCS file: /home/am0/click/cvsroot/release/one/elements/ip/iprw.hh,v
> retrieving revision 1.25
> diff -u -u -w -r1.25 iprw.hh
> --- elements/ip/iprw.hh 3 Sep 2002 05:58:51 -0000       1.25
> +++ elements/ip/iprw.hh 14 Apr 2003 20:46:09 -0000
> @@ -215,7 +215,7 @@
>      virtual ~IPMapper()                        { }
>
>      void notify_rewriter(IPRw *, ErrorHandler *);
> -    IPRw::Mapping *get_map(IPRw *, int ip_p, const IPFlowID &, Packet *);
> +    virtual IPRw::Mapping *get_map(IPRw *, int ip_p, const IPFlowID &, Packet *);
>
>  };
>
> No idea how long that piece of brilliance has been around, but at least
> it's fixed now.
>
> Eddie
>




More information about the click mailing list