> I am trying to send a trap with a multi-line field.

> strcpy(user_string  ,"\r\nLINE 1\r\nLINE 2\r\nLINE 3");


> if I ask to snmptrapd to print in ascii format I get dot in place of
> CR/LF
> snmptrapd -a -f -Le -Oa

>         SNMPv2-SMI::enterprises.18590.1.1.2.4.0˙TRING: "..LIGNE
> 1..LIGNE 2..LIGNE 3"


Hmmm....  it looks as if 'isprint' is rejecting 0x0d and 0x0a as
non-printable characters.
   (see mib.c:sprint_realloc_asciistring())

<tap, tap, tap>
Yes - that appears to be the case.

It may be that we ought to test using:

        if (isprint(*cp) || isspace(*cp)) {

instead.

Thoughts?

Dave



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
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

Reply via email to