Re: [tkined] 2 scotty questions

Juergen Schoenwaelder (schoenw@ibr.cs.tu-bs.de)
Tue, 30 Sep 1997 19:24:45 +0200 (MET DST)

Satinder Mundra <mundra@gte.com> said:

Satinder> 1) How do you send a trap without variables. Scotty
Satinder> forces me to specify at least one variable.

Satinder> % $s trap coldStart
Satinder> wrong # args: should be "snmp0 trap snmpTrapOID list"

Satinder> % $s trap coldStart [list [list "" ""]]
Satinder> OBJECT IDENTIFIER of length 0

Not quite right. Scotty requires you to specify a list, but this list
can be empty (which is different from a list which contains empty
elements). Try:

$s trap coldStart {}

Note, this works with all SNMP requests. You can send empty get,
getnext, ... Try it. Its great fun to see how some SNMP
implementations deal with these valid but unusual requests. ;-)

Satinder> 2) How can I explicity specify the enterprise in a
Satinder> trap pdu? When I use scotty to send generic traps,
Satinder> the enterprise comes out wrong.

Satinder> snmpTrapEnterprise.0 = "tubs"

Well, I would not really call it wrong but I agree that you probably
want to have something else here. Note that this is SNMPv1 specific
since SNMPv2 traps do not carry an enterprise field list SNMPv1 did.
I fixed this problem in my current source. A notification originator
session now has a -enterprise option to specify the trap OID. You can
probably add the same mechanism to the 2.1.7 version by hacking
tnmSnmpTcl.c to do the option processing and by hacking tnmSnmpSend to
put the OID into the trap PDU.
Juergen

-- 
Juergen Schoenwaelder  schoenw@ibr.cs.tu-bs.de http://www.cs.tu-bs.de/~schoenw
Technical University Braunschweig, Dept. Operating Systems & Computer Networks
Bueltenweg 74/75, D-38106 Braunschweig, Germany.     (Tel. +49 531 / 391-3283)
--
!! This message is brought to you via the `tkined & scotty' mailing list.
!! Please do not reply to this message to unsubscribe. To subscribe or
!! unsubscribe, send a mail message to <tkined-request@ibr.cs.tu-bs.de>.
!! See http://wwwsnmp.cs.utwente.nl/~schoenw/scotty/ for more information.