[Click] Problems Creating a Linux-level Element

Eddie Kohler kohler at cs.ucla.edu
Thu May 26 22:05:39 EDT 2005


> 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?

The C and C++ standard libraries cannot be used in the linux kernel.


> 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)

Yes.

> 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!

You're mixing keyword arguments and regular arguments.  You can't do  
that.  After cpKeywords, every argument specification must have a  
keyword.

E


>
> Bita.
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
>
>



More information about the click mailing list