I've seen sporadic references to this issue in the Net-SNMP archives
but no clear answer:  How do I use a null character ('\0', ASCII value
0) as a character in the string that I wish to pass to the
$request->setValue(ASN_OCTET_STR, $dataval) Perl API function?  The
NetSNMP specification has the ASN String datatype encoded as a length +
octet array, allowing \0 as part of an ASN_OCTET_STR, but in the Perl
API ASN_OCTET_STR is represented with a Perl string (which is null
terminated).  This zero byte capability actually gets used often, such
as when a MAC address or IP address is encoded using the numerical octet
values instead of the ASCII string representation.
 
If anyone has an example of how to do this (or information that it
cannot be done) please post.
 
Thanks,
John
 
  
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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