As the title suggests I am an SNMP newbie and have encountered some serious problems using mib2c.

Essentially what I am trying to achieve is to write an agent that is capable of reading a Marconi softswitch mib implemented on a Linux host. It doesn't have to be enterprise 'strength' because it is only intended to act as a test agent until we get access to the real deal.

I have made sure that the MIB is configured on the test system by using:

snmptranslate -Td MARCONI-SCA-ROUTE-MEASUREMENTS-MIB::callRouteMeasurements

Which returns the following:

MARCONI-SCA-ROUTE-MEASUREMENTS-MIB::callRouteMeasurements
callRouteMeasurements OBJECT-TYPE
  -- FROM       MARCONI-SCA-ROUTE-MEASUREMENTS-MIB
  MAX-ACCESS    not-accessible
  STATUS        current
  INDEX         { crmTun, crmRoute }
  DESCRIPTION   "NM 11A: Route performance Statistics
                     Propagation : Steered to specific SCAs via TUN.
                     Parent : None
                     Dependant : None
                     TableType : Dynamic (controlled via stats)
                     RowCreation : (controlled via stats)
                     Locking : None
                     Management : N/A
                     Validation : N/A"
::= { iso(1) org(3) dod(6) internet(1) private(4) enterprises(1) marconi(1012) marconiGatekeeper(21) crs(10) statistics(2) nm(1) nmMIBObjects(1) callRouteMeasTable(2) 1 }


So far so good, we can see the MIB. The problems start when I use mib2c

mib2c -c mib2c.mfd.conf callRouteMeasurements

Which produces the following:

This module can only be used with tables, not branches or entire MIBs.
Please specify and OID that is a table. (OID: callRouteMeasurements)
/usr/share/snmp//mib2c.mfd.conf:25 contained a line that started with a @ but did not match any mib2c configuration tokens.
(maybe missing the trailing @?)
writing to callRouteMeasurements.h
writing to callRouteMeasurements.c
writing to callRouteMeasurements_data_get.h
writing to callRouteMeasurements_data_get.c
writing to callRouteMeasurements_data_set.h
writing to callRouteMeasurements_data_set.c
writing to callRouteMeasurements_interface.h
writing to callRouteMeasurements_interface.c
writing to callRouteMeasurements_data_access.h
writing to callRouteMeasurements_data_access.c
writing to callRouteMeasurements-README-FIRST.txt
running indent on callRouteMeasurements_interface.c
running indent on callRouteMeasurements_data_get.h
running indent on callRouteMeasurements.c
running indent on callRouteMeasurements_data_set.c
running indent on callRouteMeasurements_data_access.h
running indent on callRouteMeasurements_interface.h
running indent on callRouteMeasurements_data_access.c
running indent on callRouteMeasurements_data_set.h
running indent on callRouteMeasurements_data_get.c
running indent on callRouteMeasurements.h


I have included the mib2c.mfd.conf config file:

#############################################################  -*- c -*-
## top level mfd conf file
## $Id: mib2c.mfd.conf,v 1.2.2.3 2004/12/28 23:49:11 rstory Exp $
########################################################################
@if $m2c_mark_boundary == 1@
/** START code generated by $RCSfile: mib2c.mfd.conf,v $ $Revision: 1.2.2.3 $ */
@end@
########################################################################
##
@if "x$mfd_interactive_setup" == "x"@
@   eval $mfd_interactive_setup = 1@
@end@
@if "x$m2c_report_progress" == "x"@
@   eval $m2c_report_progress = 1@
@end@
##
@ifconf default-mfd-top.m2c@
@   include default-mfd-top.m2c@
@end@
##
@if $name =~ /Table$/i@
@else@
@   print This module can only be used with tables, not branches or entire MIBs.@
@   print Please specify and OID that is a table. (OID: $name)@
@   die@
@end@
##
@run mfd-top.m2c@
##
[EMAIL PROTECTED] ${name}_Makefile@
[EMAIL PROTECTED]@
#@   run mfd-makefile.m2m@
[EMAIL PROTECTED]@
[EMAIL PROTECTED] ${name}_subagent.c@
[EMAIL PROTECTED]@
##@   run subagent.m2c@
[EMAIL PROTECTED]@
##
########################################################################
@if $m2c_mark_boundary == 1@
/** END code generated by $RCSfile: mib2c.mfd.conf,v $ $Revision: 1.2.2.3 $ */
@end@

I have read the accompanying README-FIRST text file and it advises that I should be able to make the agent by executing the Makefile. Of course the problem is that the Makefile doesn't exist.

A whole bunch of other files are produced but I have also noticed that some of the .h files aren't generated.

I'm sorry that this has been a bit of a ramble on my part but I really don't know where else to turn so any help will be gratefully received and acknowledged.

Regard,
Martin.




Reply via email to