Hi all,

 

I used the following code to register string type scalar 

 

netsnmp_handler_registration *reg;

netsnmp_watcher_info *winfo;

 

oid abcName_oid[] = {1,3,6,1,4,1,3286,13,5,1,1,3,0};

char abcName[256] = "ABC Default value";

reg = netsnmp_create_handler_registration("abcName", NULL, abcName_oid,

                                                OID_LENGTH(abcName_oid),
HANDLER_CAN_RWRITE);

 

winfo = netsnmp_create_watcher_info(abcName, strlen(abcName), ASN_OCTET_STR,
WATCHER_FIXED_SIZE);

//  if(netsnmp_register_watched_scalar(reg, winfo) < 0) {

if(netsnmp_register_watched_instance(reg, winfo) < 0) {

snmp_log(LOG_ERR, "Failed to register watched abcName");

}

 

But I am getting Hex-STRING value..

 

snmpget -v 2c -c public -On localhost ABC-MIB::abcName

.1.3.6.1.4.1. 3286.13.5.1.1.3 = Hex-STRING: E0 C4 52 3E FF 7F 00 00 01 00 00
00 00 00 00 00

70 C6 52 3E FF 7F 00 00 00 00 00 00 00 00 00 00

00 00 00 00 00 00 00 00 3D AA 83 35 31 7F 00 00

50 D4 10 EA BF B1 69 C8 50 D4 10 EA BF B1 69 C8

B0 8C 60 00 00 00 00 00 BB AA 83 35 31 7F 00 00

 

Why I am getting like this pelase help..

 

Regards,

Prakash Raju

 

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to