> In the example notification.c, the definition of the trap is included
> at NET-SNMP-EXAMPLES-MIB:
>
> netSnmpExampleNotification OBJECT-TYPE
> SYNTAX SnmpAdminString
> MAX-ACCESS accessible-for-notify
Actually that definition is wrong.
This is the definition of a MIB *object* (suitable for including
within a notification) - not the definition of the trap itself.
See NET-SNMP-AGENT-MIB::nsNotifyStart (et al) for examples
of valid trap definitions.
> If you want to add a string to this trap you can do:
>
> netSnmpExampleNotification OBJECT-TYPE
> SYNTAX SnmpAdminString
> MAX-ACCESS accessible-for-notify
> OBJECTS { netSnmpExampleString }
Nope. That is not valid.
You can only have an "OBJECT" clause in a NOTIFICATION-TYPE definition,
not in an OBJECT-TYPE definition.
> And you should also define the string (netSnmpExampleString):
>
> netSnmpExampleString OBJECT-TYPE
> SYNTAX OCTET STRING (SIZE (0..10))
and given that the original question was about how to ensure that
such a string value was displayed as an ASCII string, it would be
sensible to define this object with SYNTAX SnmpAdminString
(or similar) - so that it would use the DISPLAY-HINT "255a"
Dave
-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
>From Windows to Linux, servers to mobile, InstallShield X is the
one installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users