Marco Gerards wrote:
Manuel Menal <mmenal@hurdfr.org> writes:
Well, it's what you get with ifconfig (or /proc/net/dev) in Linux. Like, the number of received/sent packets/bytes, errors, collissions, things like that. Drivers keep count of them already (rx_errors, rx_bytes, tx_packets, etc.). The code is mostly there in <gnumach/linux/dev/core/dev.c:sprintf_stats>. Adding an interface that would return a struct to user space, instead of putting it under /proc, wouldn't be hard, would it?
Can't you get it with ifconfig or netstat on GNU/Hurd?
With ifconfig you can't (it only shows what you can get with the basic ioctls, that is MTU, address, netmask, broadcast, flags, ...). I didn't know of any port of netstat for GNU/Hurd.
pfinet knows about this kind of stuff, so I assume you can get the info from there. This should not be too hard.
Sure, it just lacks the interfaces. I should take a look at how other OSes do that (other than GNU/Linux, I mean) and send a patch for pfinet. Thanks, -- Manuel Menal