[tkined] Woes with PhysAddr and set-request in scotty 3.0.0 beta

Peder Chr. Norgaard (pcn@tbit.dk)
Fri, 12 Mar 1999 12:57:18 +0100 (MET)

Hello.
I have some problems with the scotty 3.0.0 beta (the November 1998
unix version).

I use the scotty as a command generator to test functionality of
set-request in my own (non-scotty) SNMP agent.

I try to add an entry to the ipNetToMediaTable of IP-MIB. But I
cannot figure out how to specify the MAC address in the scotty end.

The documentation (the snmp(n) entry, under SNMP DATA TYPES) says
to use string with hex digits and colons:

% $s3 set [list [list ipNetToMediaPhysAddress.1.194.182.136.185 \
"00:D0:33:02:00:07"] [list ipNetToMediaType.1.194.182.136.185 static]]

This is the result:
0: [SEQUENCE] 162
3: [INTEGER] 1 (03)
6: [SEQUENCE] 14
8: [INTEGER] 2 (78 4f)
12: [INTEGER] 2 (08 00)
16: [OCTET STRING] 1 (07)
19: [INTEGER] 1 (03)
22: [OCTET STRING] 43 (30 29 04 0c 00 00 02 fe 00 00 00 c0 33 01 80 06
02 01 00 02 01 00 04 03 70 63 6e 04 0c 00 00 00 00 00 00 00 00 00 00 00 00
04 00)
67: [SEQUENCE] 96
69: [OCTET STRING] 12 (00 00 02 fe 00 00 00 c0 33 01 80 06)
83: [OCTET STRING] 0 ()
85: [3] 78
87: [INTEGER] 2 (78 4f)
91: [INTEGER] 1 (00)
94: [INTEGER] 1 (00)
97: [SEQUENCE] 66
99: [SEQUENCE] 39
101: [OBJECT IDENTIFIER] 18 (2b 06 01 02 01 04 16 01 02 01
81 42 81 36 81 08 81 39)
121: [OCTET STRING] 17 (30 30 3a 44 30 3a 33 33 3a 30 32 3a
30 30 3a 30 37)
140: [SEQUENCE] 23
142: [OBJECT IDENTIFIER] 18 (2b 06 01 02 01 04 16 01 04 01
81 42 81 36 81 08 81 39)
162: [INTEGER] 1 (04)

- that is, colons and hex digits all converted to individual OCTETs.
Evidently not the way to do it.

But using a real 6-octet string:

% set naddr [binary format H12 "00D033020007"]
% $s3 set [list [list ipNetToMediaPhysAddress.1.194.182.136.185 $naddr] \
[list ipNetToMediaType.1.194.182.136.185 static]]

0: [SEQUENCE] 145
3: [INTEGER] 1 (03)
6: [SEQUENCE] 14
8: [INTEGER] 2 (4e 1f)
12: [INTEGER] 2 (08 00)
16: [OCTET STRING] 1 (07)
19: [INTEGER] 1 (03)
22: [OCTET STRING] 43 (30 29 04 0c 00 00 02 fe 00 00 00 c0 33 01 80 06
02 01 00 02 01 00 04 03 70 63 6e 04 0c 00 00 00 00 00 00 00 00 00 00 00 00
04 00)
67: [SEQUENCE] 79
69: [OCTET STRING] 12 (00 00 02 fe 00 00 00 c0 33 01 80 06)
83: [OCTET STRING] 0 ()
85: [3] 61
87: [INTEGER] 2 (4e 1f)
91: [INTEGER] 1 (00)
94: [INTEGER] 1 (00)
97: [SEQUENCE] 49
99: [SEQUENCE] 22
101: [OBJECT IDENTIFIER] 18 (2b 06 01 02 01 04 16 01 02 01
81 42 81 36 81 08 81 39)
121: [OCTET STRING] 0 ()
123: [SEQUENCE] 23
125: [OBJECT IDENTIFIER] 18 (2b 06 01 02 01 04 16 01 04 01
81 42 81 36 81 08 81 39)
145: [INTEGER] 1 (04)

- results in an empty PhysAddress in the BER.

Any ideas? I am pretty much lost.

best regards
--peder chr.

Peder Chr. Nørgaard System Developer, M. Sc.
Telebit Communications A/S tel: +45 86 28 81 77 - 49
Fabrikvej 11 fax: +45 86 28 81 86
DK-8260 Viby J Denmark e-mail: pcn@tbit.dk

--
!! 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.