> > > netstat -p only works for the protocols hard-coded in the protox > > > struct in > > > /usr/src/usr.bin/netstat/main.c > > >
> > > > > > For the protocol problem, I see the call to getprotoent but > > > no call to getprotobyname in the name2protox function in > > > /usr/src/usr.b/in/netstat/main.c > > > > > > > so, philip guenther did all the hard work: it seems the text additions > were made 21 years ago with ip6 support, but the code was never added. > so the current SYNOPSIS was (and still is) correct: -f is not used with > -I. the text in -I describing -f was wrong, and i've just removed it. > > thanks for your mail, > jmc Hi, thank you very much for your quick reply. It also appears that netstat isn't checking /etc/protcols when the -p option is called: $netstat -an -p rdp netstat: rdp: unknown protocol although rdp is in /etc/protocols. In contrast, other protocols in struct protx do get a different response: $netstat -an -p icmp netstat: no protocol handler for protocol icmp Although I admit I don't know enough to know whether it would make sense to generate statistics for icmp. Of course other protocols like tcp do work without problems.
