[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-inetutils] netstat
From: |
Mats Erik Andersson |
Subject: |
Re: [bug-inetutils] netstat |
Date: |
Tue, 29 Nov 2011 21:25:55 +0100 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
tisdag den 29 november 2011 klockan 14:15 skrev Alfred M. Szmidt detta:
> If we can't rely on error messages (which seems like the best approach
> -- then we will test this aspect of the tool as well), we should be able
> to write a small tool that tries to bind a particular port. This tool
> could replace InetUtils' use of netstat.
>
> I wrote such a tool once, port-open-p, but never had time to polish it
> up and commit it. I think we should do this after release, but then
> I'm not in a hurry. Such a tool would be useful, but syslogd should
> exist gracefully if it can't open a port and report an error even if
> we have such a tool.
Personally, I find it reasonable to demand a basic tool like netstat(1),
if it is agreed that bison(1) must be present. NixOS has complained with
us for demanding use of netstat, which their build daemon does not provide.
On the other hand, NixOS does not even provide "/etc/services", which
makes any testing of network code utterly pointless, breaking the needed
library calls.
However, in Solaris and relatives, netstat(1) produces completely
different output, so the grep-patterns in our test script is utterly
useless; see below for a filtered version. Some sort of micro-netstat
for reporting a single occupied port, built for our tests, could be
of benefit.
Regards
Mats
address@hidden $ netstat -a -Pudp -finet
UDP: IPv4
Local Address Remote Address State
-------------------- -------------------- ----------
*.bootpc Idle
*.dhcpv6-client Idle
sol.bootpc Idle
*.* Unbound
*.sunrpc Idle
*.* Unbound
*.64287 Idle
- [bug-inetutils] netstat, Simon Josefsson, 2011/11/29
- Re: [bug-inetutils] netstat, Alfred M. Szmidt, 2011/11/29
- Re: [bug-inetutils] netstat,
Mats Erik Andersson <=
- Re: [bug-inetutils] netstat, Alfred M. Szmidt, 2011/11/29
- Re: [bug-inetutils] netstat, Simon Josefsson, 2011/11/30
- Re: [bug-inetutils] netstat, Mats Erik Andersson, 2011/11/30
- Re: [bug-inetutils] netstat, Simon Josefsson, 2011/11/30
- Re: [bug-inetutils] netstat, Alfred M. Szmidt, 2011/11/30
- Re: [bug-inetutils] netstat, Simon Josefsson, 2011/11/30
- Re: [bug-inetutils] netstat, Alfred M. Szmidt, 2011/11/30
- Re: [bug-inetutils] netstat, Simon Josefsson, 2011/11/30
- Message not available
- Re: [bug-inetutils] netstat, Simon Josefsson, 2011/11/30