snmp_parse_oid usage

Norasyikin MD Ali <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Hello,

I'm trying to build an agent to handle ASN_OBJECT_ID types. Everywhere 
in my application code i define the OIDs as  a string (also the way i 
concatenate them with table indexes).

In the agent :

char *value;
oid root[MAX_OID_LEN];
int rootlen = MAX_OID_LEN;

case TR_MIB_OID:
      value = val->s;
      snmp_parse_oid(value,root,&rootlen);
      //build_oid(&value,strlen(value), root,rootlen ,index);       s
      snmp_set_var_typed_value(idx, ASN_OBJECT_ID,
                   value,rootlen);

I thought the snmp_oid_parse transforms strings to OID but my code 
crashes as soon as type TR_MIB_OID is used.

A reply would be much appreciated.

ps: Be kind, I'm just an intern.

Syikin.

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
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.