The actual accounting is fairly straightforward (just add entries to struct sock
and increment as appropriate in sock_queue_rcv_skb() and sock_queue_err_skb()),
but I'm trying to figure out the best way to make the stats available.
I had considered two possibilities, and it may make sense to use both.
The first would be to expand sock_ioctl() to first check for generic socket
commands before calling the protocol specific ioctl() routines. This allows for
easy usage from within userspace binaries. The second would be to have socket
statistics shown under /proc/<pid>/fd/<fd number>. This would allow for easy
script/human access.
Does anyone have any comments about either of these, or about the desirability
of this in general?
Chris
-- Chris Friesen | MailStop: 043/33/F10 Nortel Networks | work: (613) 765-0557 3500 Carling Avenue | fax: (613) 765-2986 Nepean, ON K2H 8E9 Canada | email: cfriesen@nortelnetworks.com - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/