Why was netcat reverted?

Rob Landley rob at landley.net
Sun Jun 27 19:52:27 UTC 2010

On Saturday 26 June 2010 21:22:50 Denys Vlasenko wrote:
> On Sunday 27 June 2010 03:55, Denys Vlasenko wrote:
> > But rants aside... I will make it so that it will be possible
> > to select "your" or "mine/compatible/bloated" nc with dedicated
> > CONFIG_NC_110_COMPAT option. You can set it to off.
> > Does this solve the problem for you?
> Committed.

I'm curious: why does netcat differ from any other app we've integrated?  Our 
cat doesn't do --squeeze-blank", is that a reason to merge the gnu version 
alongside ours with a config option to select them?

What's the criteria here? 

> Now, with CONFIG_NC_110_COMPAT=y
> Usage: nc [OPTIONS] HOST PORT  - connect
> nc [OPTIONS] -l -p PORT [HOST] [PORT]  - listen
> Options:
>         -e PROG Run PROG after connect (must be last)
>         -l      Listen mode, for inbound connects
>         -p PORT Local port
>         -s ADDR Local address
>         -w SEC  Timeout for connects and final net reads
>         -i SEC  Delay interval for lines sent
>         -n      Don't do DNS resolution
>         -u      UDP mode
>         -v      Verbose
>         -o FILE Hex dump traffic
>         -z      Zero-I/O mode (scanning)
> and without:
> Usage: nc [-iN] [-wN] [-l] [-p PORT] [-f FILE|IPADDR PORT] [-e PROG]
> Open a pipe to IP:PORT or FILE
> Options:
>         -e PROG Run PROG after connect
>         -l      Listen mode, for inbound connects
>                 (use -l twice with -e for persistent server)
>         -p PORT Local port
>         -w SEC  Timeout for connect
>         -i SEC  Delay interval for lines sent
>         -f FILE Use file (ala /dev/ttyS0) instead of network

So I need a config option to add -s, -n, -u, -v, -o, and -z to busybox netcat 
in order for you to be happy about removing the redundant implementation? 

Do you have any criteria to indicate _which_ of these are interesting, beyond 
just "the busybox version of netcat differs from the external version in some 
nonspecific way, and I didn't want to just build the other version and install 
it in the system, no this must be part of _busybox_."  Because if it's the 
latter, that's a bit of a change from how busybox development used to be 

Also, the man page for ubuntu's netcat has 20 options, and the historical 
version you added has 11.  Presumably this is one of those "forks" you were 
referring to, which of course isn't the "real" version because Ubuntu only has 
40% market share, so obviously that's too obscure to count...

Still not understanding the criteria here.

GPLv3: as worthy a successor as The Phantom Meanace, as timely as Duke Nukem 
Forever, and as welcome as New Coke.

More information about the busybox mailing list