[BusyBox] arping applet

Glenn McGrath bug1 at optushome.com.au
Fri Jan 3 18:39:04 UTC 2003


On Fri, 3 Jan 2003 14:51:46 +0200 (EET)
Nick Fedchik <fnm at fusion.ukrsat.com> wrote:

> 
> Hi ALL!
> 
> Here is arping applet for busybox development version.
> Ported from Alexey Kuznetsov iputils.
> 
> TODO: size optimization of compiled code.
> 

Attached is a modified arping.c

Changes..

Replace xerror() with error_msg();exit(); it was marginally cheaper when
error_msg was already being used.

Moved global variables that are only used in one function into that
function.

Removed some headers that didnt need to be #include'd, also used some c
headers instead of linux/ headers.

Removed the set_signal function as its only called twice, didnt appear
to be wirth a function declaration.

I think send_pack could be incorporated into catcher, and recv_pack into
arping_main, that should allow some more globals to be moved.

Maybe there is some common code between arping and other network applets
that can be shared.


Glenn


-------------- next part --------------
A non-text attachment was scrubbed...
Name: arping.c.gz
Type: application/octet-stream
Size: 3720 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20030103/fae7b8df/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20030103/fae7b8df/attachment.pgp 


More information about the busybox mailing list