the code from mib2c didn't work

"朱飞" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Dear Sir/Madam,
  In accessory, I send you my code from mib2c. but this function doesn't work, the picture is the error message. It says " no v2 trapOID varbind provided", but in function trapOID has provided.If you have time, I hope you can give me some advice. Thank you very much. 
I have too much puzzle, but I don't know who to ask. So please beg my interruption.
BEST WISHES AND HAPPY NEW YEAR.


your sincerely,
Spring Zhu
From China
------------------
From: Spring

------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox

_______________________________________________
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
macrosan.c (application/octet-stream, 1.2 KB)
static oid      snmptrap_oid[] = { 1, 3, 6, 1, 6, 3, 1, 1, 4, 1, 0 };
int send_msStorageTrapV1_trap(void){    
    netsnmp_variable_list *var_list = NULL;    
    oid msStorageTrapV1_oid[] = 
        { 1, 3, 6, 1, 4, 1, 35904, 1, 3, 1 };    
    oid  msStorageDeviceName_oid[] =
        { 1, 3, 6, 1, 4, 1, 35904, 1, 2, 1, 1, 0 };    
    oid  msStorageDeviceDescrip_oid[] = 
        { 1, 3, 6, 1, 4, 1, 35904, 1, 2, 1, 2, 0 };    

    oid trap_1[] = 
        { 1, 3, 6, 1, 6, 3, 1, 1, 4, 1, 1 };
    oid trap_2[] = 
        { 1, 3, 6, 1, 6, 3, 1, 1, 4, 1, 2 };
  
    snmp_varlist_add_variable(&var_list, 
        snmptrap_oid, OID_LENGTH(snmptrap_oid), 
        ASN_OBJECT_ID, msStorageTrapV1_oid,
        OID_LENGTH(msStorageTrapV1_oid));

    snmp_varlist_add_variable(&var_list,  
        trap_1,OID_LENGTH(trap_1),
        ASN_OBJECT_ID,msStorageDeviceName_oid,
        OID_LENGTH(msStorageDeviceName_oid));
    
    snmp_varlist_add_variable(&var_list, 
        trap_2,OID_LENGTH(trap_2),
        ASN_OBJECT_ID,msStorageDeviceDescrip_oid,
        OID_LENGTH(msStorageDeviceDescrip_oid)); 


    send_v2trap(var_list);
    snmp_free_varbind(var_list);
    return SNMP_ERR_NOERROR;
}
send_trap.jpg (application/octet-stream, 13.2 KB) - not displayed
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.