[Click] New type in include/click
Roberto Riggio
roberto.riggio at create-net.org
Wed Dec 22 11:31:46 EST 2010
Il 22/12/2010 17:24, Eddie Kohler ha scritto:
> Hi Roberto,
>
> On 12/22/10 5:16 AM, Roberto Riggio wrote:
>> Hi,
>>
>> I need to add a new type (an ipaddress extended with an interface id for
>> a multi-radio wmn) in
>> include/click/.
>
> This does not sound like an include/click type to me. Have you
> considered adding it as a file in your package or element
> subdirectory? You can force it to be compiled with ELEMENT_PROVIDES.
Yes, at the moment it is a file in my own package subdirectory. However
since ipaddress.hh
is in include/click i thought that it would be cleaner to put my file
(nodeaddress.hh) in the
same place.
>
>> However after adding the hh file in include/click and
>> the corresponding cc file
>> in lib i see that the new type is not compiled during the build process.
>>
>> What should I do in order to have click compile this new files?
>
> You need to edit all of {userlevel,linuxmodule,bsdmodule,ns}/Makefile.in.
I will leave the file in the package subdirectory.
>
>> Another question: I'm generalizing some elements (namely arptable and
>> linktable) in order
>> to handle different types. So and arptable could containt mapping
>> between an arbitrary type
>> and and etheraddress. In my case for example the mapping is between an
>> entity such as
>> 10.0.0.10:1 (which is the first interface of node 10.0.0.20) and and
>> ethernet address. Would
>> this patch be interesting for the upstream click?
>
> Yes!! I have an outstanding patch in my own tree that makes ARPTable
> a template type. I'll try and add that to the upstream branch at some
> point today.
Ouch, I just finished templifying arptable.
More information about the click
mailing list