On 20/04/07, ajran ajran wrote:
> Bellow is the skeleton that has been generated by mib2c, what am I
> experiencing problem with is the third the snmp_varlist_add_variable
> statement handling the attribute "alarmActiveResourceId"


The first thing to do is to look at the MIB description of this particular
object. That will tell you what information is meant to be included in
this varbind.
Given that this is of type ASN_OBJECT_ID, I presume it's meant
to point to some other MIB object. But the MIB description should
tell you which one.



> suppose there is some struct defined like:
>
> typedef struct {
> u_char* moduleName;
> long long int *dateAndTime;
> int* activeAlarmInedx;
> } ResourceId;
>
>
> my question is:
>
> What do I need to do in order to include these data into the trap?


Are there MIB objects that relate to these values?
If so, are they included in the OBJECTS clause of the trap?

If they are, then you can simply set those values in the appropriate
varbind of your template routine.

If not, then you'll need to add extra varbinds to the end of the payload
list, containing these additional values. That's perfectly valid, as
long as the "standard" ones come first.


> What do I choose as index in all oid's?


What condition is triggering the generation of this trap?
Threre will presumably be something that's happened to one of
the underlying "things" that are being monitored by this table.
You should pass the information as to which "thing" is
triggering the trap into this routine, and use this to set the
index values accordingly.

Dave

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/...et-snmp-coders