[Toybox] more netstat cleanup.
Rob Landley
rob at landley.net
Sun Jun 12 00:43:08 PDT 2016
Yup, this change to the linux-kernel source that exports /proc/net/unix:
- s->socket ? s->socket->flags : 0,
+ s->state == TCP_LISTEN ? SO_ACCEPTCON : 0,
Was in 2.3.15pre3, which was June 30, 1999. I.E. no unix socket flags
except SO_ACCEPTCON have been exported from the Linux kernel for 17
years. Therefore this bit of toys/pending/netstat.c:
+ strcpy(sock_flags, "[ ");
+ if (flags & SOCK_ACCEPTCON) strcat(sock_flags, "ACC ");
+ if (flags & SOCK_WAIT_DATA) strcat(sock_flags, "W ");
+ if (flags & SOCK_NO_SPACE) strcat(sock_flags, "N ");
+ strcat(sock_flags, "]");
Is just _wrong_. (Although it does apparently match the netstat man
page, which presumaby hasn't been updated in about as long.)
Rob
More information about the Toybox
mailing list