#8 netstat(8) leaves out --inet6


Looking at the current manpage, there is no documentation of --inet6 or --ip6 flags. This certainly confused me. This is clearly a bug.

It confused me that --inet showed only IPv4 sockets. Where were my IPv6 ones? So I looked in the netstat(8) and got no hint that --inet6 exists or that I needed it.

The manpage claims to have been last updated in 2001. Not surprising that it is out of date.

Radical suggestion: In my opinion, --inet should include both IPv4 and IPv6 and a new --inet4 should be added if there is a need to restrict the AF to just IPv4. Less radical suggestion: add some flag that means union of IPv4 and IPv6. That would be easier to explain to users.

Trivial observation: I had to read the code to figure out what was going on. In the process, I found that lib/af.c line 299 is redundant because the next line accomplishes the same thing:
paft = aftrans;
for (paft = aftrans; paft->alias; paft++) {


  • D. Hugh Redelmeier

    patch to man/en_US/netstat.8 to address this

  • Bernd Eckenfels

    Bernd Eckenfels - 2012-09-15

    I think this is already fixed in the man page in the version control (just not yet released). The man page lists --inet6 and also the (new) options -4 and -6 which you can also use together:

    netstat -a46

    But I will keep that open till it is released.

  • Bernd Eckenfels

    Bernd Eckenfels - 2012-09-15
    • status: open --> open-fixed

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks