|
From: Peter H. <Pet...@ap...> - 2012-02-05 11:14:00
|
Hi all, 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@ ## ------------------------------------------------------------------ ... The MIB I'm trying to compile is the ATM MIB specified in RFC2515 so I'm almost sure there's nothing wrong with the MIB itself. Did anyone encounter this problem before? Is there something I'm doing wrong? Is there maybe a workaround/fix for this? Kind regards, Peter Hertting |
|
From: Peter H. <Pet...@ap...> - 2012-02-06 18:03:30
|
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 |
|
From: Robert S. <rs...@fr...> - 2012-02-27 15:24:38
|
On Mon, 06 Feb 2012 18:03:20 +0000 Peter wrote: PH> On 05/02/12 11:13, Peter Hertting wrote: PH> > | | +-> Processing nonindex atmInterfaceMyNeighborIpAddress PH> > ERROR: unknown node.decl: in_addr_t PH> After further investigation I believe that this might actually be a bug PH> in the MFD configuration. I changed node-get.m2i so that it now looks PH> like this: PH> ... PH> ## ------------------------------------------------------------------ PH> @ if $node.decl =~ /long/i@ # ASN_INTEGER ASN_COUNTER ASN_GAUGE PH> @ include generic-get-long.m2i@ PH> @ elsif $node.decl =~ /char/i@ # ASN_OCTET_STR ASN_OPAQUE PH> @ include generic-get-char.m2i@ PH> @ elsif $node.decl =~ /oid/i@ # ASN_OBJECT_ID PH> @ include generic-get-oid.m2i@ PH> @ elsif $node.decl =~ /U64/i@ # ASN_COUNTER64 PH> @ include generic-get-U64.m2i@ PH> @ elsif $node.decl =~ /in_addr_t/i@ # ASN_IP_ADDRESS PH> @ include generic-get-in_addr_t.m2i@ PH> @ else@ PH> @ print ERROR: unknown node.decl: $node.decl@ PH> @ exit@ PH> @ end@ PH> ## ------------------------------------------------------------------ PH> ... PH> PH> And create a generic-get-in_addr_t.m2i file: PH> PH> ############################################################# -*- c -*- PH> ## generic include for XXX. Do not use directly. PH> ## PH> ## $Id$ PH> ######################################################################## PH> @if $m2c_mark_boundary == 1@ PH> /** START code generated by $RCSfile$ $Revision$ */ PH> @end@ PH> ######################################################################## PH> ## PH> ######################################################################## PH> @if $m2c_mark_boundary == 1@ PH> /** END code generated by $RCSfile$ $Revision$ */ PH> @end@ PH> PH> This does the trick and the MIB compiles without problems. PH> PH> Question: Does anyone else thinks that this is a bug? I'm experiencing PH> this problem with 5.7.1 and 5.4.3. Yep, it's a bug. Can you show me the resulting function that is generated? |