Re: snmp_parse_oid

Dave Shield <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
On 30 July 2010 09:47, Norasyikin MD Ali <[email protected]> wrote:
>       value = val->s;
>       snmp_parse_oid(value,root,&rootlen);

How are you defining the variable 'root'?
What value does 'rootlen' have before you call this routine?

Remember that you need to initialise rootlen with the size of the
buffer - i.e. the maximum size of the OID that can be handled.
The value returned will be the *actual* size of the OID that was
parsed.
   If you're re-using this length variable for parsing two or more
OID strings, then you need to re-set the length to indicate the
maximum size before trying to parse the second one.


Dave

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.