#!/bin/sh

. ../support/simple_eval_tools.sh

HEADER SNMPv1 support

SKIPIF NETSNMP_DISABLE_SNMPV1
SKIPIFNOT USING_MIBII_SYSTEM_MIB_MODULE

#
# Begin test
#

# standard V1 configuration: testcomunnity
. ./Sv1config

STARTAGENT

CAPTURE "snmpget -On $SNMP_FLAGS -c testcommunity -v 1 $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT .1.3.6.1.2.1.1.3.0"

CHECKORDIE ".1.3.6.1.2.1.1.3.0 = Timeticks:"

CAPTURE "snmpgetnext -On $SNMP_FLAGS -c testcommunity -v 1 $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT .1.3.6.1.2.1.1.3"

CHECKORDIE ".1.3.6.1.2.1.1.3.0 = Timeticks:"

CAPTURE "snmpget -On $SNMP_FLAGS -c testcommunity -v 1 $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT .1.3.6.1.2.1.1.3.1"

CHECKORDIE "Error in packet"

CAPTURE "snmpget -On $SNMP_FLAGS -c notavalidcommunity -v 1 $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT .1.3.6.1.2.1.1.3.0"

CHECKORDIE "Timeout"

STOPAGENT

FINISHED
