Hi,
        We are trying to generate the code for the COMMUNITY-MIB using
mib2c MFD. There is an index there that has the following ASN
specification 
INDEX       { IMPLIED snmpCommunityIndex }
        Looking at the code mib2c generates we found that, in the
function snmpCommunityTable_index_from_oid(), the following lines were
generated:

   memset( &var_snmpCommunityIndex, 0x00, sizeof(var_snmpCommunityIndex)
);
    var_snmpCommunityIndex.type = ASN_OCTET_STR;

        The var_snmpCommunityIndex.type is ASN_OCTET_STR instead of
ASN_PRIV_IMPLIED_OBJECT_ID. Using ASN_OCTECT_STR means that the index
has to be formed by the length.'string' and that is not what the IMPLIED
keyword means. Looking at the NOTIFY-MIB, the index definition of the
notify filter table is INDEX {snmpNotifyFilterProfileName,IMPLIED
snmpNotifyFilterSubtree } and the existent code in the
snmpNotifyFilterTable.c is the following:
    memset(&var_snmpNotifyFilterProfileName, 0x00,
           sizeof(var_snmpNotifyFilterProfileName));
    var_snmpNotifyFilterProfileName.type = ASN_OCTET_STR;
    memset(&var_snmpNotifyFilterSubtree, 0x00,
           sizeof(var_snmpNotifyFilterSubtree));
    var_snmpNotifyFilterSubtree.type = ASN_PRIV_IMPLIED_OBJECT_ID;

        Where the var_snmpNotifyFilterSubtree.type has the correct type.
We know that the notify filter table implementation was generated using
the mib2c, but we are not able to generate the same code.
        Is there any mib2c configuration that we are missing?

Thanks,

Pablo.

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to