Generating a trap with table infomation

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

I'm trying to generate a trap containing all the information from my 
activeAlarmTable which has 8 columns.
In my agent, I created a function :
tr_status tr_mib_agent_generate_alarm_event_trap(int type,
                         const char *oidstr1, uint32_t id,
                         const char *oidstr2, int class,
                         const char *oidstr3, char *oid,
                         const char *oidstr4, int cause,
                         const char *oidstr5, int type,
                         const char *oidstr6, int severity,
                         const char *oidstr7, char *reason,
                         const char *oidstr8, char *time){

if (snmp_enabled) {
        var = NULL;
       
        tr_mib_build_oid(oidstr1, base_oid, BASE_OID_LEN, (int *) 
&obj_oid, &obj_oid_len);
        if (!snmp_varlist_add_variable( &var,
                                        obj_oid, obj_oid_len,
                                        ASN_COUNTER,
                                        (char *) &id, sizeof(int))) {
        } etc. for each varbind
}

So in my code, i'll have to match each varbind with an OID. In short, 
get an OID for each column which is proving quite messy (meaning I don't 
know how to do it). Is there a function to create a varlist for the 
whole table?

Thank you very much in advance.

Syikin
"Be nice. I'm just an intern."

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
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.