Hi Tanisha, As for as I know the oids are copied as an array of oid as follows. static oid abcOid[] = { 1, 3, 6, 1, 4, 1, xxx, 3, 1, 1};
But I am not too sure. This is how I have done it. Thanks, Harendra "No task is so humble that it does not offer an outlet for individuality" On Mon, 2009-04-06 at 17:57, Tanisha Kashyap wrote: > I have the MIB file at the default location. > > The basic skeleton of the code is: > > Int main() > { > t_Trap alarmTrap; > > strcpy(alarmTrap.abcOid,".1.3.6.1.4.1.xxx.3.1.1" ); > strcpy(alarmTrap.defOid,".1.3.6.1.4.1.xxx.3.1.2.1" ); > strcpy(alarmTrap.klmOid,".1.3.6.1.4.1.xxx.3.1.2.2" ); > > parse_data(xxx, &alarmTrap,xxx); > } > > Parse_data(xxx, t_Trap* alarmTrap,xxx) > { > .... > .... > ... > > Sendtrap(xxx,&alarmTrap,xxx); > } > > Sendtrap(xxx,t_Trap* alarmTrap,xxx) > { > if (!snmp_parse_oid(alarmTrap->abcOid, name, &name_length)) { > printf("\nerror situation\n\n"); > snmp_perror(alarmTrap->abcOid); > SOCK_CLEANUP; > return(1); > } > ... > ... > ... > } > > > -----Original Message----- > From: dave.shi...@googlemail.com [mailto:dave.shi...@googlemail.com] On > Behalf Of Dave Shield > Sent: Monday, April 06, 2009 5:50 PM > To: Tanisha Kashyap > Cc: net-snmp-users@lists.sourceforge.net > Subject: Re: snmp_parse_oid error > > 2009/4/6 Tanisha Kashyap <tanisha.kash...@aricent.com>: > > The snmp_parse_oid function is giving me the following error: > > > > : Unknown Object Identifier (Sub-id not found: (top) -> ) > > Have you installed the MIB files? > > Otherwise, we'd really need to see the exact code > that you are using. Simply saying that a routine > is throwing an error isn't a lot of help. > > Dave > > "DISCLAIMER: This message is proprietary to Aricent and is intended solely > for the use of the individual to whom it is addressed. It may contain > privileged or confidential information and should not be circulated or used > for any purpose other than for what it is intended. If you have received this > message in error,please notify the originator immediately. If you are not the > intended recipient, you are notified that you are strictly prohibited from > using, copying, altering, or disclosing the contents of this message. Aricent > accepts no responsibility for loss or damage arising from the use of the > information transmitted by this email including damage from virus." > > ------------------------------------------------------------------------------ > _______________________________________________ > Net-snmp-users mailing list > Net-snmp-users@lists.sourceforge.net > Please see the following page to unsubscribe or change other options: > https://lists.sourceforge.net/lists/listinfo/net-snmp-users
------------------------------------------------------------------------------
_______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users