[BusyBox] Re: [patch] zcip for busybox (rfc3927)
Bernhard Fischer
rep.nop at aon.at
Mon Apr 18 19:53:01 UTC 2005
Sorry if you get this multiple times, I just typed 'L' for reply-to
list, but mutt told me there was no list addr. whatever.
On Mon, Apr 18, 2005 at 11:04:53AM -0700, David Brownell wrote:
>Here's my latest version of zcip for busybox. I gave RFC 3927 a quick
[]
>--- networking/Config.in (revision 10132)
>+++ networking/Config.in (working copy)
>@@ -637,5 +637,16 @@
[]
>+ ZCIP provides ZeroConf IPv4 address selection, according to RFC 3927.
>+ It's a daemon that allocates and defends a dynamically assigned
I'm not sure what "defends" means here. Does it also implement a flamethrower,
or should this read defines? Please eventually add a sentence to the
help-text which explains this probably minor detail.
>+ address on the 169.254/16 network, requiring no system administrator.
>+
>+ See http://www.zeroconf.org for further details, and "zcip.script"
>+ in the busybox examples.
>+
> endmenu
>
>--- include/usage.h (revision 10132)
>+++ include/usage.h (working copy)
>@@ -2932,4 +2932,14 @@
> #define zcat_full_usage \
> "Uncompress to stdout."
>
>+#define zcip_trivial_usage \
>+ "[OPTIONS] ifname script"
>+#define zcip_full_usage \
>+ "zcip manages a ZeroConf IPv4 link-local address.\n" \
>+ "Options:\n" \
>+ "\t-f foreground mode\n" \
>+ "\t-q quit after address (no daemon)\n" \
>+ "\t-r 169.254.x.x request this address first\n" \
>+ "\t-v verbose; show version\n"
>+
Some seem to not build the examples, but please provide a simple one
nevertheless.
> #endif /* __BB_USAGE_H__ */
[]
>--- /dev/null 2004-10-01 20:17:35.000000000 -0700
>+++ networking/zcip.c 2005-04-18 09:56:44.000000000 -0700
>@@ -0,0 +1,550 @@
[]
>+
>+// #define DEBUG
>+
>+// TODO:
>+// - more real-world usage/testing, especially daemon mode
>+// - kernel packet filters to reduce scheduling noise
>+// - avoid silent script failures, especially under load...
>+// - link status monitoring (restart on link-up; stop on link-down)
please let's put either std=c99 in by default or convert the non-warnings
(like the above) to /* XXX: TODO\nwhatever */
>+
[]
also this one and all the following occurances.
>+ // ether header
[]
>+
>+ // arp request
etc.
[snip]
Please consider looking at bb_getopt* here:
>+ while ((t = getopt(argc, argv, "fqr:v")) != EOF) {
>+ switch (t) {
[]
>+ setenv("interface", intf, 1);
and if (setenv() <0) ?
>+ script = argv[optind++];
[skip]
cheers,
More information about the busybox
mailing list