RE: Installing Perl SNMP support on Windows

2010-09-14 Thread Vinod Nanjaiah
 Hello Vinod,

Are you trying to build the Perl modules with MinGW ? As you can see on the 
Net-SNMP wiki (http://www.net-snmp.org/wiki/index.php/Build_System/Windows), 
that does not yet work.

Bart.


Hi Bart,
I tried building perl modules from command prompt as suggested in the README. I 
didn't use MinGW.

The good news is that I am now able to compile the code on windows.
I tested snmp get, set and walk. It works!

Like I mentioned earlier, I used the snmp code generated on linux.

Thanks for your help.

Best Regards,
Vinod




http://www.mindtree.com/email/disclaimer.html
--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


RE: Installing Perl SNMP support on Windows

2010-09-09 Thread Vinod Nanjaiah
Hi,
I was not able to proceed further with building the perl snmp modules. I tried 
installing it on another system also, but got stuck at the same point.
One deviation I did from the README file is to install regex from a different 
source. The link provided to gnu_regex.exe downloads a corrupt file.
I hope this has nothing to do with the perl snmp build failure.

I tried an alternate way -
used source code of my subagent generated on linux and compiled it as windows 
service. But I am not able to run it.
Even on registering the service with the command my_subagent.exe -register, I 
don't see it in the list of services.

Another problem is that without completing the perl snmp installation, snmpconf 
is not available; without which snmpd throws up some warnings as shown below.

  snmpd
No log handling enabled - turning on stderr logging
iquerySecName has not been configured - internal queries will 
fail
Warning: no access control information configured.
  (Config search path: 
c:/usr/etc/snmp;c:/usr/share/snmp;c:/usr/lib)
  It's unlikely this agent can serve any useful purpose in this 
state.
  Run snmpconf -g basic_setup to help you configure the 
snmpd.conf file for th
is agent.
NET-SNMP version 5.4.3


I could not find any information on how to go about running subagents on 
windows or how to get over the perl snmp build problem.
Appreciate any pointers.

Thank you,
Vinod

From: bart.vanass...@gmail.com [mailto:bart.vanass...@gmail.com] On Behalf Of 
Bart Van Assche
Sent: Monday, September 06, 2010 8:47 PM
To: Vinod Nanjaiah
Cc: net-snmp-users@lists.sourceforge.net
Subject: Re: Installing Perl SNMP support on Windows

On Mon, Sep 6, 2010 at 1:04 PM, Vinod Nanjaiah 
vinod_nanja...@mindtree.commailto:vinod_nanja...@mindtree.com wrote:

On Mon, Sep 6, 2010 at 12:55 PM, Vinod Nanjaiah 
vinod_nanja...@mindtree.commailto:vinod_nanja...@mindtree.com wrote:
Just to add to this, I am running net-snmp-5.4.3 as suggested by Bart Van Assche
[ ... ]

As far as I know version 5.4.3 builds fine, so there might be a problem with 
the setup of the PC you are using for building Net-SNMP.

Bart.


Thanks Bart.

I will probably try installing the same on another PC.
BTW, which library has the definitions for
_RegisterService, _UnregisterService, _RunAsService, etc.


That's an easy question:

$ find-svn | xargs grep -w RegisterService
apps/snmptrapd.c:exit (RegisterService(lpszServiceName,
snmplib/winservice.c:RegisterService (LPCTSTR lpszServiceName, LPCTSTR 
lpszServiceDisplayName,
include/net-snmp/library/winservice.h:  int RegisterService (LPCTSTR 
lpszServiceName,
agent/snmpd.c:exit (RegisterService(lpszServiceName,
$ find-svn win32 | xargs grep -i winservice.c
win32/snmptrapd/Makefile.in:SOURCE=..\..\snmplib\winservice.c
win32/snmptrapd/snmptrapd.dsp:SOURCE=..\..\snmplib\winservice.c
win32/snmpd/Makefile.in:SOURCE=..\..\snmplib\winservice.c
win32/snmpd/snmpd.dsp:SOURCE=..\..\snmplib\winservice.c
win32/libnetsnmptrapd/Makefile.in:SOURCE=..\..\snmplib\winservice.c

So the answer is: at least the function RegisterService() is defined in the 
source file snmplib/winservice.c, and this source file is included in 
libnetsnmptrapd.

Bart.


http://www.mindtree.com/email/disclaimer.html
--
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Installing Perl SNMP support on Windows

2010-09-09 Thread Dave Shield
On 9 September 2010 07:37, Vinod Nanjaiah vinod_nanja...@mindtree.com wrote:
 Another problem is that without completing the perl snmp installation,
 snmpconf is not available; without which snmpd throws up some warnings
 as shown below.



 snmpd
  No log handling enabled - turning on stderr logging
  iquerySecName has not been configured - internal queries will fail
  Warning: no access control information configured.
       (Config search path: 
 c:/usr/etc/snmp;c:/usr/share/snmp;c:/usr/lib)

      It's unlikely this agent can serve any useful purpose in this state.

      Run snmpconf -g basic_setup to help you configure the snmpd.conf
  file for this agent.

It's not complaining about snmpconf.
It's complaining about the file 'snmpd.conf'
(which may well not exist in any of the specified locations)

Without a valid snmpd.conf file (including suitable access control settings)
the agent will not provide any information at all.

This snmpd.conf file is simply a text file - you can create it using your
favourite text editor.  One possibility is to use snmpconf, as suggested
in this error message.  But this is not strictly necessary.
   The simplest approach is just to create a text file containing

 rocommunity public

(or your preferred community string), and this would be sufficient to
get the agent working again.


I'll leave the windows/perl issues to someone with more knowledge
and time.

Dave

--
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Installing Perl SNMP support on Windows

2010-09-09 Thread Bart Van Assche
On Thu, Sep 9, 2010 at 8:37 AM, Vinod Nanjaiah
vinod_nanja...@mindtree.comwrote:

  Hi,

 I was not able to proceed further with building the perl snmp modules. I
 tried installing it on another system also, but got stuck at the same point.

 One deviation I did from the README file is to install regex from a
 different source. The link provided to gnu_regex.exe downloads a corrupt
 file.

 I hope this has nothing to do with the perl snmp build failure.



 I tried an alternate way -

 used source code of my subagent generated on linux and compiled it as
 windows service. But I am not able to run it.

 Even on registering the service with the command my_subagent.exe
 -register, I don't see it in the list of services.



 Another problem is that without completing the perl snmp installation,
 snmpconf is not available; without which snmpd throws up some warnings as
 shown below.



   snmpd

 No log handling enabled - turning on stderr logging

 iquerySecName has not been configured - internal queries
 will fail

 Warning: no access control information configured.

   (Config search path:
 c:/usr/etc/snmp;c:/usr/share/snmp;c:/usr/lib)

   It's unlikely this agent can serve any useful purpose in
 this state.

   Run snmpconf -g basic_setup to help you configure the
 snmpd.conf file for th

 is agent.

 NET-SNMP version 5.4.3





 I could not find any information on how to go about running subagents on
 windows or how to get over the perl snmp build problem.

 Appreciate any pointers.


 Hello Vinod,

Are you trying to build the Perl modules with MinGW ? As you can see on the
Net-SNMP wiki (http://www.net-snmp.org/wiki/index.php/Build_System/Windows),
that does not yet work.

Bart.
--
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Installing Perl SNMP support on Windows

2010-09-06 Thread Bart Van Assche
On Mon, Sep 6, 2010 at 12:50 PM, Vinod Nanjaiah vinod_nanja...@mindtree.com
 wrote:

 As per the Perl README file (
 http://www.net-snmp.org/docs/perl-SNMP-README.html), I am trying

 to install perl support for snmp.

 But, on running win32\nmakeperl.bat, it is exiting with the following
 error.



 Make the Perl SNMP modules.

 NMAKE : fatal error U1077: 'C:\Program Files\Microsoft Visual Studio
 9.0\VC\BIN

 \link.EXE' : return code '0x460'

 Stop.

 NMAKE : fatal error U1077: 'C:\PROGRA~1\MICROS~1.0\VC\BIN\nmake.exe' :
 return code '0x2'

 Stop.

 If errors are seen stop here and review perl\nmake.out.

 Press any key to continue . . .



 The corresponding perl\make.out file indicates the following errors:



 Creating library ..\blib\arch\auto\NetSNMP\TrapReceiver\TrapReceiver.lib
 and object ..\blib\arch\auto\NetSNMP\TrapReceiver\TrapReceiver.exp

 netsnmptrapd.lib(snmptrapd.obj) : error LNK2019: unresolved external symbol
 _RegisterService referenced in function _main

 netsnmptrapd.lib(snmptrapd.obj) : error LNK2019: unresolved external symbol
 _UnregisterService referenced in function _main

 netsnmptrapd.lib(snmptrapd.obj) : error LNK2019: unresolved external symbol
 _RunAsService referenced in function _main

 netsnmptrapd.lib(snmptrapd.obj) : error LNK2019: unresolved external symbol
 _RegisterStopFunction referenced in function _main

 netsnmptrapd.lib(snmptrapd.obj) : error LNK2019: unresolved external symbol
 _ParseCmdLineForServiceOption referenced in function _main

 ..\blib\arch\auto\NetSNMP\TrapReceiver\TrapReceiver.dll : fatal error
 LNK1120: 5 unresolved externals





 The path of the snmplibs is also set correctly.

 Appreciate any pointers on solving this linking problem.


With which Net-SNMP version did this occur ?

The Perl module support of at least Net-SNMP version 5.6rc2 should build
fine (see also
http://sourceforge.net/projects/net-snmp/files/net-snmp/5.6-pre-releases/).

Bart.

Bart.
--
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


RE: Installing Perl SNMP support on Windows

2010-09-06 Thread Vinod Nanjaiah
Just to add to this, I am running net-snmp-5.4.3 as suggested by Bart Van Assche

Thank you,
Vinod

From: Vinod Nanjaiah
Sent: Monday, September 06, 2010 4:21 PM
To: 'net-snmp-users@lists.sourceforge.net'
Subject: Installing Perl SNMP support on Windows

Hi!
As per the Perl README file 
(http://www.net-snmp.org/docs/perl-SNMP-README.html), I am trying
to install perl support for snmp.
But, on running win32\nmakeperl.bat, it is exiting with the following error.

Make the Perl SNMP modules.
NMAKE : fatal error U1077: 'C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN
\link.EXE' : return code '0x460'
Stop.
NMAKE : fatal error U1077: 'C:\PROGRA~1\MICROS~1.0\VC\BIN\nmake.exe' : return 
code '0x2'
Stop.
If errors are seen stop here and review perl\nmake.out.
Press any key to continue . . .

The corresponding perl\make.out file indicates the following errors:

Creating library ..\blib\arch\auto\NetSNMP\TrapReceiver\TrapReceiver.lib and 
object ..\blib\arch\auto\NetSNMP\TrapReceiver\TrapReceiver.exp
netsnmptrapd.lib(snmptrapd.obj) : error LNK2019: unresolved external symbol 
_RegisterService referenced in function _main
netsnmptrapd.lib(snmptrapd.obj) : error LNK2019: unresolved external symbol 
_UnregisterService referenced in function _main
netsnmptrapd.lib(snmptrapd.obj) : error LNK2019: unresolved external symbol 
_RunAsService referenced in function _main
netsnmptrapd.lib(snmptrapd.obj) : error LNK2019: unresolved external symbol 
_RegisterStopFunction referenced in function _main
netsnmptrapd.lib(snmptrapd.obj) : error LNK2019: unresolved external symbol 
_ParseCmdLineForServiceOption referenced in function _main
..\blib\arch\auto\NetSNMP\TrapReceiver\TrapReceiver.dll : fatal error LNK1120: 
5 unresolved externals


The path of the snmplibs is also set correctly.
Appreciate any pointers on solving this linking problem.

Thank you,
Vinod






http://www.mindtree.com/email/disclaimer.html
--
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Installing Perl SNMP support on Windows

2010-09-06 Thread Bart Van Assche
On Mon, Sep 6, 2010 at 12:55 PM, Vinod Nanjaiah vinod_nanja...@mindtree.com
 wrote:

  Just to add to this, I am running net-snmp-5.4.3 as suggested by Bart Van
 Assche
 [ ... ]


As far as I know version 5.4.3 builds fine, so there might be a problem with
the setup of the PC you are using for building Net-SNMP.

Bart.
--
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


RE: Installing Perl SNMP support on Windows

2010-09-06 Thread Vinod Nanjaiah

On Mon, Sep 6, 2010 at 12:55 PM, Vinod Nanjaiah 
vinod_nanja...@mindtree.commailto:vinod_nanja...@mindtree.com wrote:
Just to add to this, I am running net-snmp-5.4.3 as suggested by Bart Van Assche
[ ... ]

As far as I know version 5.4.3 builds fine, so there might be a problem with 
the setup of the PC you are using for building Net-SNMP.

Bart.


Thanks Bart.

I will probably try installing the same on another PC.
BTW, which library has the definitions for
_RegisterService, _UnregisterService, _RunAsService, etc.

Thank you,
Vinod


http://www.mindtree.com/email/disclaimer.html
--
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Installing Perl SNMP support on Windows

2010-09-06 Thread Bart Van Assche
 On Mon, Sep 6, 2010 at 1:04 PM, Vinod Nanjaiah vinod_nanja...@mindtree.com
 wrote:



 On Mon, Sep 6, 2010 at 12:55 PM, Vinod Nanjaiah 
 vinod_nanja...@mindtree.com wrote:

  Just to add to this, I am running net-snmp-5.4.3 as suggested by Bart Van
 Assche
 [ ... ]


 As far as I know version 5.4.3 builds fine, so there might be a problem
 with the setup of the PC you are using for building Net-SNMP.

 Bart.





 Thanks Bart.



 I will probably try installing the same on another PC.

 BTW, which library has the definitions for

 _RegisterService, _UnregisterService, _RunAsService, etc.


That's an easy question:

$ find-svn | xargs grep -w RegisterService
apps/snmptrapd.c:exit (RegisterService(lpszServiceName,
snmplib/winservice.c:RegisterService (LPCTSTR lpszServiceName, LPCTSTR
lpszServiceDisplayName,
include/net-snmp/library/winservice.h:  int RegisterService (LPCTSTR
lpszServiceName,
agent/snmpd.c:exit (RegisterService(lpszServiceName,
$ find-svn win32 | xargs grep -i winservice.c
win32/snmptrapd/Makefile.in:SOURCE=..\..\snmplib\winservice.c
win32/snmptrapd/snmptrapd.dsp:SOURCE=..\..\snmplib\winservice.c
win32/snmpd/Makefile.in:SOURCE=..\..\snmplib\winservice.c
win32/snmpd/snmpd.dsp:SOURCE=..\..\snmplib\winservice.c
win32/libnetsnmptrapd/Makefile.in:SOURCE=..\..\snmplib\winservice.c

So the answer is: at least the function RegisterService() is defined in the
source file snmplib/winservice.c, and this source file is included in
libnetsnmptrapd.

Bart.
--
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users