we have :
if {[info exists default(community.$ip)]} {
$s configure -community $default(community.$ip)
}
if {[info exists default(port.$ip)]} {
$s configure -port $default(port.$ip)
}
switch $protocol {
SNMPv1 {
$s configure -community $snmp_community -version SNMPv1
}
SNMPv2c {
$s configure -community $snmp_community -version SNMPv2c
}
SNMPv2u {
$s configure -user $snmp_user -context $snmp_context \
-version SNMPv2u
}
default {
ined acknowledge "Unsuppoted version \"$protocol\" for $id \[$ip\]"
return
}
}
if {[info exists default(timeout.$ip)]} {
$s configure -timeout $default(timeout.$ip)
}
if {[info exists default(retries.$ip)]} {
$s configure -retries $default(retries.$ip)
}
question : if the community is set for a particular host, the first
statement configure $s, but the community is reset to $snmp_community
after, why ?
I've try to put these lines after the switch statement, and it-is working
better (I think).
regards, Alex.
-- Alexandre Chauvin-Hameau SYSICOM (33)+01 46.10.08.20 e-mail: ach@sysicom.fr phone: (33)+01 46.10.08.23 "Savoir faire, faire et faire savoir..."