#!/bin/sh

. ../eval_tools.sh

HEADER authentication failure traps are sent by snmpd

#
# Begin test
#

# standard V1 configuration: testcomunnity
. ./Sv1config
# add in a v1 trap sink
REAL_TRAPD_PORT=`echo $SNMP_SNMPTRAPD_PORT | awk '{print $2}'`
CONFIGAGENT trapsink localhost public $REAL_TRAPD_PORT
CONFIGAGENT authtrapenable 1

STARTTRAPD

STARTAGENT

# give the agent more time to start up.  We only want to fire one
# request (retries = 0) to make sure only one trap is sent.
#DELAY
CAPTURE "snmpget -r 0 -t 5 $SNMP_FLAGS -v 1 localhost wrongcommunity system.sysUpTime.0"

STOPAGENT

STOPTRAPD

CHECKTRAPD "Authentication Failure Trap"

FINISHED
