Re: SNMP::MainLoop
"Vipin K" <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
Hi Rob...
Thanks for the reply. One more questions:
I want to add net snmp in perl module using Cygwin. I have copied the net
snmp source in home and have following configuartion set.
./configure \
--with-mib-modules="host agentx disman/event-mib examples/example" \
--with-out-mib-modules=host/hr_network --with-libs="-lws2_32" \
--disable-embedded-perl --with-perl-modules \
Then i run "perl Makefile.PL -NET-SNMP-IN-SOURCE=true" in /netsnmp/perl.
There are no errors generated when I run this command but when I
"make" command it gives error.
-----------------------------------------
Error is :
$ make
make[1]: Entering directory `/home/User/net-snmp-5.4.1.2/perl/default_store'
rm -f ../blib/arch/auto/NetSNMP/default_store/default_store.dll
g++ --shared -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--stack,838
8608 -Wl,--enable-auto-image-base -L/usr/local/lib default_store.o -o ../blib/
arch/auto/NetSNMP/default_store/default_store.dll \
/usr/lib/perl5/5.10/i686-cygwin/CORE/libperl.dll.a \
default_store.o: In function `XS_NetSNMP__default_store_netsnmp_ds_get_boolean':
/home/User/net-snmp-5.4.1.2/perl/default_store/default_store.c:1386: undefined r
eference to `_netsnmp_ds_get_boolean'
default_store.o: In function `XS_NetSNMP__default_store_netsnmp_ds_get_int':
/home/User/net-snmp-5.4.1.2/perl/default_store/default_store.c:1410: undefined r
eference to `_netsnmp_ds_get_int'
default_store.o: In function `XS_NetSNMP__default_store_netsnmp_ds_get_string':
/home/User/net-snmp-5.4.1.2/perl/default_store/default_store.c:1434: undefined r
eference to `_netsnmp_ds_get_string'
default_store.o: In function `XS_NetSNMP__default_store_netsnmp_ds_get_void':
/home/User/net-snmp-5.4.1.2/perl/default_store/default_store.c:1458: undefined r
eference to `_netsnmp_ds_get_void'
default_store.o: In function `XS_NetSNMP__default_store_netsnmp_ds_register_conf
ig':
/home/User/net-snmp-5.4.1.2/perl/default_store/default_store.c:1485: undefined r
eference to `_netsnmp_ds_register_config'
default_store.o: In function `XS_NetSNMP__default_store_netsnmp_ds_register_prem
ib':
/home/User/net-snmp-5.4.1.2/perl/default_store/default_store.c:1512: undefined r
eference to `_netsnmp_ds_register_premib'
default_store.o: In function `XS_NetSNMP__default_store_netsnmp_ds_set_boolean':
/home/User/net-snmp-5.4.1.2/perl/default_store/default_store.c:1537: undefined r
eference to `_netsnmp_ds_set_boolean'
default_store.o: In function `XS_NetSNMP__default_store_netsnmp_ds_set_int':
/home/User/net-snmp-5.4.1.2/perl/default_store/default_store.c:1562: undefined r
eference to `_netsnmp_ds_set_int'
default_store.o: In function `XS_NetSNMP__default_store_netsnmp_ds_set_string':
/home/User/net-snmp-5.4.1.2/perl/default_store/default_store.c:1587: undefined r
eference to `_netsnmp_ds_set_string'
default_store.o: In function `XS_NetSNMP__default_store_netsnmp_ds_set_void':
/home/User/net-snmp-5.4.1.2/perl/default_store/default_store.c:1612: undefined r
eference to `_netsnmp_ds_set_void'
default_store.o: In function `XS_NetSNMP__default_store_netsnmp_ds_shutdown':
/home/User/net-snmp-5.4.1.2/perl/default_store/default_store.c:1632: undefined r
eference to `_netsnmp_ds_shutdown'
default_store.o: In function `XS_NetSNMP__default_store_netsnmp_ds_toggle_boolea
n':
/home/User/net-snmp-5.4.1.2/perl/default_store/default_store.c:1655: undefined r
eference to `_netsnmp_ds_toggle_boolean'
collect2: ld returned 1 exit status
make[1]: *** [../blib/arch/auto/NetSNMP/default_store/default_store.dll] Error 1
make[1]: Leaving directory `/home/User/net-snmp-5.4.1.2/perl/default_store'
make: *** [subdirs] Error 2
---------------------------------------------
In the link "http://net-snmp.sourceforge.net/docs/perl-SNMP-README.html",
it said that we need to install regex. I coudnt get the regex
from the link provided. Is the error because of regex?
Thanks in advance.
Regards,
Vipin
On Fri, Aug 8, 2008 at 1:05 AM, Rob Bloodgood <[email protected]> wrote:
> SNMP::MainLoop is written to run until SNMP::finish is called. This is
> usually done within a perl callback function.
> Details are here:
> http://search.cpan.org/~hardaker/SNMP-5.0401/SNMP.pm#Acceptable_callback_formats<http://search.cpan.org/%7Ehardaker/SNMP-5.0401/SNMP.pm#Acceptable_callback_formats>
> .
>
> < plug > An alternative is to use POE::Component::SNMP::Session, and make
> all of your queries async (except for v3 authentication). < / plug > :-)
>
> On Wed, Jul 30, 2008 at 2:49 AM, Vipin K <[email protected]> wrote:
>
>> Hi....
>>
>> I wanted to know the detail use/functionality of SNMP::MainLoop. The
>> problem I am facing is that when I run the perl script it goes in infinite
>> loop at SNMP::MainLoop even though timeout is mentioned. I wanted to know
>> when should we use SNMP::MainLoop and is there any replacement.
>>
>> Regards,
>> Vipin
>>
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>> challenge
>> Build the coolest Linux based applications with Moblin SDK & win great
>> prizes
>> Grand prize is a trip for two to an Open Source event anywhere in the
>> world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> _______________________________________________
>> 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
>>
>>
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
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