On Tue, Jan 29, 2013 at 3:11 PM, Andre Oppermann <an...@freebsd.org> wrote:
> On 29.01.2013 18:05, John Baldwin wrote: > >> A common use case I have at work is to find a busted connection using >> netstat >> -n or sockstat and then want to tcpdrop it. However, tcpdrop requires >> spaces >> between the address and port so I can't simply cut and paste from one >> terminal >> window into another to generate the tcpdrop command. This patch adds >> support >> for having a decimal (netstat output) or colon (sockstat output) between >> the >> address and port instead of a space. It is careful to look for the last >> of >> these tokens to avoid parsing part of the address as the port. >> > > Excellent. Can netstat be changed from decimal to colon output as well? > The decimal output is completely outdated and probably from a time when > not even dinosaurs were [created|evolved] yet. Colon output for port > numbers is *the* standard all around. i was going to say i'd really love to have the parsing code in some kind of library function. I find myself writing this code again and again (and presumably i am not the only one) each time with new bugs and features... i know that non-standard library functions are a pain when porting software (see humanize_* stuff) but better than duplication. cheers luigi > >> _______________________________________________ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"