[Click] Elements being cloned

Bart Braem bart.braem at ua.ac.be
Fri Oct 22 04:56:27 EDT 2004


List,

I am using some elements that need to keep track of their state (in particular 
their buffer). 
Now I just discovered that my element is being cloned instead of being a 
single one troughout the program, that way maintaining state is clearly 
impossible. Is that a mistake I make or is it inherent to the Click design?

The element AODVWaitingForDiscovery appears in the Clickscript like this:

elementclass RouteDiscovery{
 discovery :: AODVWaitingForDiscovery(rreq)
  -> [0]output;
  
 input[0]
  -> [0]discovery;
 input[1]
  -> [1]discovery;
}
...

routediscovery :: RouteDiscovery;

...

destinationclassifier[0]
 -> [1]routediscovery;
...

lookup[1] // unknown destination, routediscovery
 -> [0]routediscovery;
routediscovery[0]
 -> [0]arpquerier;

Those are the only occurences of AODVWaitingForDiscovery and RouteDiscovery in 
the whole Clickscript, so I'm definitely not working with two elements.
But what's the problem then?

Thanks for any help,
Bart
-- 
dwars, studentenblad van de UA
www.dwars.ua.ac.be


More information about the click mailing list