File: T058agentauthtrap

package info (click to toggle)
net-snmp 5.2.3-7etch4
  • links: PTS
  • area: main
  • in suites: etch
  • size: 24,452 kB
  • ctags: 16,045
  • sloc: ansic: 175,930; perl: 11,814; sh: 11,230; makefile: 5,375; pascal: 62
file content (36 lines) | stat: -rw-r--r-- 704 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh

. ../eval_tools.sh

HEADER authentication failure traps are sent by snmpd

SKIPIF DISABLE_SNMPV2C

#
# Begin test
#

# standard V1 configuration: testcomunnity
. ./Sv1config
# add in a v1 trap sink
CONFIGAGENT trapsink localhost public $SNMP_SNMPTRAPD_PORT
CONFIGAGENT authtrapenable 1

CONFIGTRAPD agentxsocket /dev/null

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 -On -r 0 -t 5 $SNMP_FLAGS -v 1 -c wrongcommunity $SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT .1.3.6.1.2.1.1.3.0"

STOPAGENT

STOPTRAPD

CHECKTRAPD "Authentication Failure Trap"

FINISHED