• Harald Welte's avatar
    [NET]: Generic network statistics · 6ad5331e
    Harald Welte authored
    This patch moves the following files in /proc:
    	/proc/net/rt_cache_stat 	/proc/net/stat/rt_cache
    	/proc/net/ip_conntrack_stat	/proc/net/stat/ip_conntrack
    	/proc/net/arp_cache_stat	/proc/net/stat/arp_cache
    	/proc/net/clip_arp_cache_stat	/proc/net/stat/clip_arp_cache
    	/proc/net/dn_neigh_cache_stat	/proc/net/stat/dn_neigh_cache
    
    This allows a generic statistics tool to scan for all available statistics
    by doing readdir(2) on /proc/net/stat
    
    It also adds a special first 'template' line to rt_cache and ip_conntrack
    in order to facilitate compatibility once somebody adds new fields to the
    output lines.
    
    WARNING: 
    	This breaks existing rtstat.c and ctstat.c userspace programs
    	(hopefully for the last time).  rtstat is non-existant or broken in
    	major distributions anyway, and ctstat is too new for any distros
    	having it picked up.  Therefore, we justify this breakage.
    
    A new unified statistics tool for routing cache, connection tracking and
    neighbour cache is under development and will be included with iproute2.
    Signed-off-by: default avatarHarald Welte <laforge@gnumonks.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    6ad5331e
neighbour.c 52.7 KB