Subject: Re: [PATCH] snmp: add missing counters for RFC 4293

From: Eric Dumazet <[email-masked]>
Date: Wed, 22 Apr 2009 11:35:45 +0200

David Miller a écrit :
> From: Eric Dumazet <[email-masked]>
> Date: Wed, 22 Apr 2009 07:15:15 +0200
> 
>> Also, it seems some RFC4293 items are already handled, since commit d831666e
>> from Mitsuru Chinen. Check net/ipv4/proc.c, line 114
>>
>> /* Following RFC4293 items are displayed in /proc/net/netstat */
>> static const struct snmp_mib snmp4_ipextstats_list[] = {
> 
> It is my understanding that after Mitsuru's patch, all RFC4293
> values are available in one way or another.

Hmm... I read RFC4293 and it mentions (3.2.3. IP Statistics Tables)

 (1) The HC counters and octet counters are also found at these points
       but have been left out for clarity.

(1) counters are :
 InReceives, InMcastPkts, OutMcastPkts, OutBcastPkts, OutTransmits

So RFC4293 tells corresponding Octets variables should be supported :

 InOctets, InMcastOctets, OutMcastOctets, OutBcastOctets, OutOctets

And I dont see them in /proc/net/snmp or /proc/net/netstat

Mitsuru added :

       SNMP_MIB_ITEM("InNoRoutes", IPSTATS_MIB_INNOROUTES),
       SNMP_MIB_ITEM("InTruncatedPkts", IPSTATS_MIB_INTRUNCATEDPKTS),
       SNMP_MIB_ITEM("InMcastPkts", IPSTATS_MIB_INMCASTPKTS),
       SNMP_MIB_ITEM("OutMcastPkts", IPSTATS_MIB_OUTMCASTPKTS),
       SNMP_MIB_ITEM("InBcastPkts", IPSTATS_MIB_INBCASTPKTS),
       SNMP_MIB_ITEM("OutBcastPkts", IPSTATS_MIB_OUTBCASTPKTS),

And Neil adds : InOctets, OutOctets, InMcastOctets and OutMcastOctets

Neil, you forgot OutBcastOctets :)