On 05/02/12 11:13, Peter Hertting wrote: > I'm trying to compile a MIB using mib2c (5.7.1) and the mfd > configuration. Unfortunately one table in that MIB fails to compile: > > Starting MFD code generation... > writing to atmInterfaceConfTable.h > | +-> Processing table atmInterfaceConfTable > writing to atmInterfaceConfTable.c > writing to atmInterfaceConfTable_data_get.h > writing to atmInterfaceConfTable_data_get.c > | | +-> Processing nonindex atmInterfaceMaxVpcs > | | +-> Processing nonindex atmInterfaceMaxVccs > | | +-> Processing nonindex atmInterfaceConfVpcs > | | +-> Processing nonindex atmInterfaceConfVccs > | | +-> Processing nonindex atmInterfaceMaxActiveVpiBits > | | +-> Processing nonindex atmInterfaceMaxActiveVciBits > | | +-> Processing nonindex atmInterfaceIlmiVpi > | | +-> Processing nonindex atmInterfaceIlmiVci > | | +-> Processing nonindex atmInterfaceAddressType > | | +-> Processing nonindex atmInterfaceAdminAddress > | | +-> Processing nonindex atmInterfaceMyNeighborIpAddress > ERROR: unknown node.decl: in_addr_t > exiting at conf file > (../../../../../../install/share/snmp/mib2c-data//node-get.m2i:91) request > > Looking at the conf file (node-get.m2i) there seems indeed nothing there > to deal with the in_addr_t type: > > ... > ## ------------------------------------------------------------------ > @ if $node.decl =~ /long/i@ # ASN_INTEGER ASN_COUNTER ASN_GAUGE > @ include generic-get-long.m2i@ > @ elsif $node.decl =~ /char/i@ # ASN_OCTET_STR ASN_OPAQUE > @ include generic-get-char.m2i@ > @ elsif $node.decl =~ /oid/i@ # ASN_OBJECT_ID > @ include generic-get-oid.m2i@ > @ elsif $node.decl =~ /U64/i@ # ASN_COUNTER64 > @ include generic-get-U64.m2i@ > @ else@ > @ print ERROR: unknown node.decl: $node.decl@ > @ exit@ > @ end@ > ## ------------------------------------------------------------------ > ... >
After further investigation I believe that this might actually be a bug in the MFD configuration. I changed node-get.m2i so that it now looks like this: ... ## ------------------------------------------------------------------ @ if $node.decl =~ /long/i@ # ASN_INTEGER ASN_COUNTER ASN_GAUGE @ include generic-get-long.m2i@ @ elsif $node.decl =~ /char/i@ # ASN_OCTET_STR ASN_OPAQUE @ include generic-get-char.m2i@ @ elsif $node.decl =~ /oid/i@ # ASN_OBJECT_ID @ include generic-get-oid.m2i@ @ elsif $node.decl =~ /U64/i@ # ASN_COUNTER64 @ include generic-get-U64.m2i@ @ elsif $node.decl =~ /in_addr_t/i@ # ASN_IP_ADDRESS @ include generic-get-in_addr_t.m2i@ @ else@ @ print ERROR: unknown node.decl: $node.decl@ @ exit@ @ end@ ## ------------------------------------------------------------------ ... And create a generic-get-in_addr_t.m2i file: ############################################################# -*- c -*- ## generic include for XXX. Do not use directly. ## ## $Id$ ######################################################################## @if $m2c_mark_boundary == 1@ /** START code generated by $RCSfile$ $Revision$ */ @end@ ######################################################################## ## ######################################################################## @if $m2c_mark_boundary == 1@ /** END code generated by $RCSfile$ $Revision$ */ @end@ This does the trick and the MIB compiles without problems. Question: Does anyone else thinks that this is a bug? I'm experiencing this problem with 5.7.1 and 5.4.3. Thanks, Peter ------------------------------------------------------------------------------ Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2 _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
