[Click] Large argument lists

Harald Schiöberg harald at net.t-labs.tu-berlin.de
Fri Oct 17 11:16:14 EDT 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>> Sounds reasonable.  IMO warning messages should be printed in
>> add_route() handler, not in configure() which is run only at element
>> instantiation time, because it's possible to modify routing table
>> contents on the fly at any time while click runs...

IMO its up to add_handler to return proper error codes (which it does)
and for the interface function to present these errors to the user in
the appropriate way.
For the configure case this means printing a plain-text warning.
The dynamic case should be (and actually is) handled by rpc-style
errors, optionally with small verbosity patches like the one attached.
 Click::ControlSocket/1.2
 write rt.add  12.34.56.78/32 0
 520-Write handler 'rt.add' error:
 520 could not allocate memory for route 12.34.56.78/32 - 0

But thats my opinion ..


- --
Harald Schiöberg
Technische Universität Berlin | T-Laboratories | FG INET
www: http://www.net.t-labs.tu-berlin.de
Phone: +49-(0)30-8353-58476 | Fax: +49-(0)391 534 783 47
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFI+Kw+y8wrZ9OvkU0RAhvDAKDxiNAbP9MFDhBQWxGZ1Udk/himWQCfVxh3
3R+DnBtPljZMVqgt/BdoAeI=
=sZ3o
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: routeaddverbose.patch
Type: text/x-diff
Size: 621 bytes
Desc: not available
Url : http://amsterdam.lcs.mit.edu/pipermail/click/attachments/20081017/3529f682/attachment.patch 


More information about the click mailing list