Re: Help on socket lib and TCP/IP handshake



Rainer Weikusat <rweikusat@xxxxxxxxxxx> writes:

[...]

and it is somewhat accessible by looking at the
contents of /proc/net/netstat. A way to get this into readable form
would be:

head -n 2 /proc/net/netstat | tr ' ' '\n' | perl -ne 'BEGIN { $a =
\@t; } /TcpExt:/ && do { $x and $a = \@v; ++$x; next; }; chomp;
push(@$a, $_); END { for (1 .. $#t) { printf("%s\t%s\n", $t[$_], $v[$_]); } }'

To really see all values, for (1 .. should be for (0 .. :-(
.