]> git.baikalelectronics.ru Git - kernel.git/commit
snmp: 64bit ipstats_mib for all arches
authorEric Dumazet <eric.dumazet@gmail.com>
Wed, 30 Jun 2010 20:31:19 +0000 (13:31 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 30 Jun 2010 20:31:19 +0000 (13:31 -0700)
commite6c140ae4f4d749292ac2aea9dc7246fd079e7ba
tree84d5a130da50096fdbeb7fffea596dffe2cebd80
parent79dec5dce6bf210dcc33f23bfe4e5dc7d015ab84
snmp: 64bit ipstats_mib for all arches

/proc/net/snmp and /proc/net/netstat expose SNMP counters.

Width of these counters is either 32 or 64 bits, depending on the size
of "unsigned long" in kernel.

This means user program parsing these files must already be prepared to
deal with 64bit values, regardless of user program being 32 or 64 bit.

This patch introduces 64bit snmp values for IPSTAT mib, where some
counters can wrap pretty fast if they are 32bit wide.

# netstat -s|egrep "InOctets|OutOctets"
    InOctets: 244068329096
    OutOctets: 244069348848

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/ip.h
include/net/ipv6.h
include/net/snmp.h
net/ipv4/af_inet.c
net/ipv4/proc.c
net/ipv6/addrconf.c
net/ipv6/proc.c