Den 19-03-2014 20:27, Pentasuglia, Corey skrev: > Say I get the system description: > SNMPv2-MIB::sysDescr.0 = STRING: Linux system.name kernel#...so on > How can I just retrieve what comes have STRING: and store it off in I a > string?
if (vars->type == ASN_OCTET_STR) { char *str = malloc(vars->val_len+1); memcpy(str, vars->val.string, vars->val_len); str[vars->val_len] = '\0'; ... /Niels -- Niels Baggesen - @home - Ã…rhus - Denmark - n...@users.sourceforge.net The purpose of computing is insight, not numbers --- R W Hamming ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders