[Click] Doubt about information elements

Eddie Kohler kohler at CS.UCLA.EDU
Fri Sep 10 21:23:42 EDT 2004


Hi Pedro,

> I am implementing RIP support for Click.

Great!  We'd love to distribute it when you're done.

> And i have a problem: I want to make the manage of the routing table  
> independent from RIP elements, so, it could be accesed by two or more  
> elements (Maybe one "RIP core" and the other "lookup routes"). I don't  
> know how no-element classes work so i cannot make Routing table  
> static. I have read something about information elements but i don't  
> understand how it can help me.

Hm.  Well, first, I'd expect the routing table to be encapsulated in an  
element.  So do you really want a no-element class?

I can point you at a couple information elements:
- PortInfo (one of the simplest ones)
- PerfCountInfo
Maybe looking at these will help you get a feel for the style.

Now, if you want to just figure out how to get Click to include a .cc  
file that doesn't contain an element, that's simple.  Add  
ELEMENT_PROVIDES(SomeIdentifierForYourFile) to the bottom of the .cc  
file.  Make sure you add ELEMENT_REQUIRES(ThatIdentifier) to any other  
elemnents requiring that code.  See userlevel/fakepcap.cc for an  
example.

Does this help?
Eddie


>
> At this moment RIP core makes both actions, but this solution is not  
> extensible and i don't like it.
>
> Any ideas or help will be very wellcome.
>
> Sorry about my english.
>
> Pedro Menchen
> student at University of Coruña
>
> _________________________________________________________________
> Descarga gratis la Barra de Herramientas de MSN  
> http://www.msn.es/usuario/busqueda/barra? 
> XAPID=2031&DI=1055&SU=http%3A// 
> www.hotmail.com&HL=LINKTAG1OPENINGTEXT_MSNBH
>
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click




More information about the click mailing list