[Click] Problems Creating a Linux-level Element

betamaz betamaz at gmail.com
Wed May 25 21:36:28 EDT 2005


On 5/25/05, Koen Pollentier <koen.pollentier at intec.ugent.be> wrote:
> 
> 
> http://pdos.csail.mit.edu/click/doc/progman.html#IPAddress might be
> usefull, I guess.

And when parsing configuration string,
> http://pdos.csail.mit.edu/click/doc/progman.html#Parsing%20IP%20Addresses
> can be usefull. (Well, actually the whole document is usefull)


Thank you. That was exactly what I was looking for. One question though, why 
did the creators of click decide to implement class such as String and 
IPAddress even though linux and C++ have already similar implemented version 
of these?

Also, does click allow us to create elements with new keyword arguments?

This what I'm doing:
if (cp_va_parse(conf, this, errh,
cpUnsigned, "send rate", &rate,
cpInteger, "limit", &limit,
cpUnsigned, "packet length", &_len,
cpUnsigned, "number of flows", &_nflows,
cpUnsigned, "flow size", &_flowsize,
cpKeywords,
cpOptional,
cpBool, cpString, "specify input file name?", &_useInput, 
"INPUT_FILENAME", cpString, "input file name", &_infile,
cpBool, cpString, "specify output file name?", &_useOutput, 
"OUTPUT_FILENAME", cpString, "output file name", &_outfile,
"LIMIT", cpInteger, "total ip generated", &limit,
cpBool, "do UDP checksum?", &_cksum,
cpBool, "active?", &_active,
cpEnd) < 0)

But get run errors:
[root at zapp conf]# click-install traffic_generator.click
traffic_generator.click:29: While configuring 'tup :: UDPTrafficFlows':
unknown argument type 'INPUT_FILENAME'!
Router could not be initialized!

Bita.


More information about the click mailing list