More OpenBSD breakage, this time in TCP-MIB.

# snmpget -v2c -c blah blah.com tcpCurrEstab.0
TCP-MIB::tcpCurrEstab.0 = Gauge32: 0

But in reality:

# netstat -ts|grep -u estab
        69 connections established (including accepts)

# netstat -tan|wc -l
      65

...It would seem that the MIB is getting the value from net-snmp-5.1.3/agent/mibgroup/mibII, even though the MIB is TCP-MIB:

    case TCPCURRESTAB:
        ret_value = tcpstat.tcpCurrEstab;
        type = ASN_GAUGE;
        break;

'tcpstat' is a data structure defined in /usr/src/sys/netinet/tcp_var.h

But apparently tcpCurrEstab is not a member so I'm a little lost how this is working >:}

OpenBSD netstat(1) is using tcpstat data structure to get the appropriate value:

in net.c from src/usr.sbin/netstat

p(tcps_connects, "\t%u connection%s established (including accepts)\n");

'tcps_connects' is a structure from tcpstsat in tcp_var.h

/usr/src/sys/netinet/tcp_var.h: u_int32_t tcps_connects; /* connections established */

l8*
        -lava

x.25 - minix - bitnet - plan9 - 110 bps - ASR 33 - base8


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to