Thank you Alex for answer about build tool,
I /   - your configuration advice is working, but
II /   - using mib2c.mfd.conf still mistake
     (and thank you for your later explanations about shell.bat)

I /----------
I had began to get it working with a first solution (partially),
but yours is better....
I began by copying the Linux founded files, directly
in my working directory (ie.  c:/usr/work !)

But with your advice, it seems to work  better :
espacially the directory renamed from Linux is OK
   (see 4 tryies detailled behind at the end of the message)
     1- just with my local copy of M*Cfiles in .   (c:/usr/work)
     2- with also M*Cfiles in c:/usr/share/snmp/mib2c-data
     3- deleting just C:/usr/work/*.m2* files
     4- dropping subdirectory to c:/usr/share/snmp/mib2c-data.NO

II / ---------------------- still mistakes !
For I'm not sure of the cause of errors, I joined detailed traces below !
So I sayed it worked partially : let me explain my difficulties :

   a) as you may see on line 3! downthere
       I've got sometimes a message "writing to -"
       (and find nothing written there) ;
       it happened on several mib2c.*.conf template files
       (as first, other times last line..)
   Is it 'normal' ? What does it mean ?

---------------------------------------------------------------------------------------------
!  C:\usr\work>type mib2ic.bat
!  @..\bin\mib2c -c mib2c.%1.conf -f %1 -i IC-TEST-MIB::interface-core
!
!  C:\usr\work>mib2ic mfd
!  writing to mfd.h
3! writing to -
!  writing to default-table-confPhyTable.m2d
!  writing to default-node-confPhy.m2d
!  Can't find a configuration file called default-table-statusTable.m2d
!  (referenced at ./m2c_setup_table.m2i:54)

   b) I always have difficulties as  I cannot use: mib2c.mfd.conf
        nor get mib2c.notify.conf working !
       The command:   mib2c -c mib2c.mfd.conf .....
       lacks to find one "generated file"
       for   statusTable is also of my MIB.....


  c) Not sure which M*Cfile to use, I made some "essais-erreurs", so :
      having read so many files, FAQ, Docs and TXT files I found,
without more than 'scalar' (obvious) and MFD (just for I am ;-) Dummies
      I'm not "clear in mind" which M*Cfile to use when and why ?

1°/ is there any final explanation about M*Cfiles choice ?

2°/ is my intuition that user-specific 6 or other (LinkDown..) Traps are
     to be programmed in snmp-agent with code-squelettes
     also generated by using MIB2C ?

I apologize to write such a long message, but it spoils between
precisions for Win32 port for Alex, and mistakes about MIB2C mfD
(and a very old english-not fluent speaking......sorry)

If anybody can give advice or other reference URL, Thanks

jdx

=====================================================
Glad to Reports below to help Alex to build next version !

Alex,  I'm ready to help to test and validate Win32 builds if you want.....

my station (or I may try Win2k if you want)...
WinXP Pro 2002  (HP OEM)   Service Pack 2
--------------------------------------------------------------------
This first extraction lacks to find one "generated file"
  for   statusTable is also of my MIB.....

1-!
!  C:\usr\work>mib2ic mfd
!  writing to mfd.h
3! writing to -
!  writing to default-table-confPhyTable.m2d
!  writing to default-node-confPhy.m2d
!  Can't find a configuration file called default-table-statusTable.m2d
!  (referenced at ./m2c_setup_table.m2i:54)
!  I looked in:
!
!  C:\usr\work>ls *.m2d
!  default-node-confPhy.m2d        default-table-confPortTable.m2d
!  default-node-confPort.m2d       syntax-DateAndTime-get.m2d
!  default-table-confPhyTable.m2d
!
------------------------------------------------------------------------------
2_ Then, accordling to your answer, I renamed
C:/usr/share/snmp/mib2c-conf.d
to
C:/usr/share/snmp/mib2c-data
  (it seems to find well tools)

C:\usr\work>mib2ic mfd
writing to mfd.h
writing to -
writing to default-table-statusTable.m2d
Warning: something's wrong at C:\usr\bin\mib2c line 780, <GEN28> line 9.
./m2c_setup_node.m2i:9 [@  eval $m2c_node_needlength = $node.needlength@
]
Warning: something's wrong at C:\usr\bin\mib2c line 780, <GEN28> line 60.
./m2c_setup_node.m2i:60 [@    eval $m2c_decl = $node.decl@
]
writing to default-node-statusPhyEntry.m2d
Can't find a configuration file called default-table-stpConfTable.m2d
(referenced at ./m2c_setup_table.m2i:54)
I looked in:


------------------------------------------------------------------
3- dropping local files :
C:\usr\work>mib2ic mfd
writing to mfd.h
writing to -
writing to default-table-statusTable.m2d
Warning: something's wrong at C:\usr\bin\mib2c line 780, <GEN28> line 9.
./m2c_setup_node.m2i:9 [@  eval $m2c_node_needlength = $node.needlength@
]
Warning: something's wrong at C:\usr\bin\mib2c line 780, <GEN28> line 60.
./m2c_setup_node.m2i:60 [@    eval $m2c_decl = $node.decl@
]
writing to default-node-statusPhyEntry.m2d
Can't find a configuration file called default-table-stpConfTable.m2d
(referenced at ./m2c_setup_table.m2i:54)
I looked in:

C:\usr\work>mib2ic mfd
c:/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 mfd.h
writing to -
Le chemin d'accès spécifié est introuvable.
Unable to get Terminal Size. The Win32 GetConsoleScreenBufferInfo call didn't wo rk. The COLUMNS and LINES environment variables didn't work. The resize program
didn't work. at C:/Perl/site/lib/Term/ReadKey.pm line 362, <GEN6> line 30.
Compilation failed in require at C:/Perl/site/lib/Term/ReadLine/Perl.pm line 59,
<GEN6> line 30.

-----------------------------------------------------------------------------------------
4- with directory renamed to ...NO

C:\usr\work>mib2ic mfd
c:/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 @?)
Can't find a configuration file called mfd-top.m2c
(referenced at c:/usr/share/snmp//mib2c.mfd.conf:28)
I looked in:

----- Original Message ----- From: "Alex Burger" <[EMAIL PROTECTED]>
To: "jdx" <[EMAIL PROTECTED]>
Cc: "taner memet ali" <[EMAIL PROTECTED]>; "net-snmp-users" <[email protected]>
Sent: Wednesday, November 09, 2005 4:42 PM
Subject: Re: Mib2c /Win32


jdx wrote:
http://prdownloads.sourceforge.net/net-snmp/net-snmp-5.2.2.pre1-1.win32.exe )
No mfd-top.m2c file (In Linux tar file, they are in: ./local/mib2c-conf.d/* => where to copy them in Windows tree ?

The folder is missing in the binary. I will add it for the next release. Try:

md c:\usr\share\snmp\mib2c-data
xcopy (source)\local\mib2c-conf.d\*.* c:\usr\share\snmp\mib2c-data

Please let me know if it work as that is how the binary will install the files in future versions.

PS: for Win32 packaging..
When I was modifying MIB2C.bat
adding just:  SET MIBS=ALL in second line,
it works better, but still asks for IANA-RTPROTO-MIB.txt
that I supplied for another tool. May be it would be added to package.

We could, but then it wouldn't be the same as the Unix version. Unix users are not forced to have MIBS=ALL.

Another question, if you please :
why does this script ( MIB2C.bat ) call just the <same-name-perl-script>
is it just not to have to rename Perl scripts with a .pl extension ?
Or is there any other better reason ? For I didn't understand
why to have two calls on IF test like :
if "%OS%"=="Windows_NT" goto ...

We didn't want to rename the scripts as that would require users on ALL platforms to use the new name. That wouldn't be nice. :) The batch file is just a wrapper to call the Perl script as you noticed. All the Net-SNMP documentation references 'mib2c'. You can call the script directly if you want. Windows NT and higher allows you to pass all command line arguments to another program by using %*. Windows 9x does not support it so you need to use %1 %2 %3 %4 %5 etc. %* is the preferred method as there is no limit on the number of arguments. That is why the .bat file has the 'if "%OS%"=="Windows_NT"' statement.

Thank you for your pretty complete answer...

Alex


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
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






-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
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

Reply via email to