[Click] Handlers
Michael Voorhaen
michael.voorhaen at ua.ac.be
Tue Feb 3 17:15:07 EST 2004
Hi,
I sent an e-mail last week, stating that I had problems compiling grid for
nsclick and haven't seen an answer yet.
I've skipped getting grid to work for a while and started implementing the
hierarchical protocol that I've been working on (based on hierarchical state
routing). Basically to concept is to implement the hierarchical protocol on
top of a (slightly modified) flat routing protocol. I've started
implementing this top down, so I only needed some stubs where the flat
protocol is required and I can debug that software as quick as possible. Now
somewhere in my click graph I have this situation:
[GetNextHop] ----> 0: [EtherEncap]
----> 1: [Discard]
The GetNextHop element is one that I implemented. It determines the next hop
for the packet (stub code for now). Now what I want to happen than is that
EtherEncap encapsulates the IP packet with the correct destination Ethernet
address in the Ethernet header. So for that I need to pass the next hop
Ethernet address to EtherEncap. I want to do this with handlers, so I gave
EtherEncap a name and obtained a pointer to it in the GetNextHop code. So
far so good. I then get the handler object "dst":
In GetNextHop.push();
This->router()->handler("dst", _etherEncap);
_etherEncap points to the EtherEncap object.
This gets me the handler, and then I call call_write( next_hop_ether.s(),
_etherEncap,_errh);
This causes a segmentation fault.
Now I've been trying to narrow down the problems and I found this:
* there is something wrong with how EtherAddress creates the string
representation of the address (check it out, if you have the time).
* even when I replace next_hop_ether.s() (which is not computed
correctly) with an actual ethernet address that works when manually
configured in a click file, I still get the segmentation fault.
I could really use some help here. By the way, I'm using the CVS version of
click.
Regards,
Michael Voorhaen
========================================================
Michael Voorhaen
========================================================
Phd Student
Dept. of Mathematics and Computer Sciences
PATS (Performance Analysis of Telecommunication Systems)
University of Antwerp
Middelheimlaan 1
2020 Antwerpen, Belgium
G1.11
Phone: 03/2653905
Mail: michael.voorhaen at ua.ac.be
========================================================
More information about the click
mailing list