Re: stop trapd serivce on windows timeout?

2010-05-21 Thread Bart Van Assche
On Fri, May 21, 2010 at 7:38 PM, Snmp Nmcsnmp  wrote:

> Stop net-snmp trapd on windows timeout and it think it hang on the select.
> Does anyone have run into the same issue? or have a solution to solve it?
>

I haven't seen this so far. With which version did this occur ? And how does
your snmptrapd.conf look like ?

Bart.
--

___
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: stop trapd serivce on windows timeout?

2010-05-22 Thread Bart Van Assche
Hello Huy,

The Win32 snmptrapd calls closesocket() on the UDP socket(s) owned by
snmptrapd to make select() stop. While this seems to work with some Windows
versions (e.g. Windows XP), this is undocumented Winsock behavior. So
whether or not this works may depend on the Windows version. On which
Windows version did you observe this behavior ?

Bart.


On Fri, May 21, 2010 at 9:54 PM, Snmp Nmcsnmp  wrote:

>
> Hi Bart,
> It is net-snmp-5.4.2.1 and the conf file contains just these two lines:
>
> authCommunity log, net, execute public
> snmpTrapdAddr udp:137.69.187.10:666
> regards,
> Huy
>
>
>  --
> *From:* Bart Van Assche 
> *To:* Snmp Nmcsnmp 
> *Cc:* net-snmp-users@lists.sourceforge.net
> *Sent:* Fri, May 21, 2010 11:53:33 AM
> *Subject:* Re: stop trapd serivce on windows timeout?
>
> On Fri, May 21, 2010 at 7:38 PM, Snmp Nmcsnmp  wrote:
>
>>  Stop net-snmp trapd on windows timeout and it think it hang on the
>> select. Does anyone have run into the same issue? or have a solution to
>> solve it?
>>
>
> I haven't seen this so far. With which version did this occur ? And how
> does your snmptrapd.conf look like ?
>
> Bart.
>
>
--

___
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: stop trapd serivce on windows timeout?

2010-05-23 Thread Snmp Nmcsnmp
On windows XP service pack 3 it does not seem to stop in a timely manner. If I 
put in the call WSACancelBlockingCall() then it break out fine. I will test it 
on several version of windows and will broadcast what I learn from it.
thanks,
Huy





From: Bart Van Assche 
To: Snmp Nmcsnmp 
Cc: net-snmp-users@lists.sourceforge.net
Sent: Sat, May 22, 2010 3:44:07 AM
Subject: Re: stop trapd serivce on windows timeout?

Hello Huy,

The Win32 snmptrapd calls closesocket() on the UDP socket(s) owned by snmptrapd 
to make select() stop. While this seems to work with some Windows versions 
(e.g. Windows XP), this is undocumented Winsock behavior. So whether or not 
this works may depend on the Windows version. On which Windows version did you 
observe this behavior ?

Bart.



On Fri, May 21, 2010 at 9:54 PM, Snmp Nmcsnmp  wrote:


>
>Hi Bart,
>It is net-snmp-5.4.2.1 and the conf file contains just these two lines:
>
>authCommunity log, net, execute public
>snmpTrapdAddr udp:137.69.187.10:666
>regards,
>Huy
>
>
>
>

From: Bart Van Assche 
>To: Snmp Nmcsnmp 
>Cc: net-snmp-users@lists.sourceforge.net
>Sent: Fri, May 21, 2010 11:53:33 AM
>Subject: Re: stop trapd serivce on windows timeout?
>
>
>
>On Fri, May 21, 2010 at 7:38 PM, Snmp Nmcsnmp  wrote:
>
>Stop net-snmp trapd on windows timeout and it think it hang on the select. 
>Does anyone have run into the same issue? or have a solution to solve it?
>
>I haven't seen this so far. With which version did this occur ? And how does 
>your snmptrapd.conf look like ?
>
>Bart.
>
>



  --

___
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: stop trapd serivce on windows timeout?

2010-05-24 Thread Bart Van Assche
Hello Huy,

Are you aware that WSACancelBlockingCall() has been removed from Winsock 2,
and that Net-SNMP needs Winsock 2 in order to support IPv6 ? See also
http://msdn.microsoft.com/en-us/library/ms741547%28VS.85%29.aspx. So two
possible solutions are:
* Add a Windows-specific alarm to snmptrapd that is triggered e.g. once per
second. This will limit the timeout argument of select(). See also the
documentation of snmp_alarm_register() on
http://www.net-snmp.org/dev/agent/group__snmp__alarm.html.
* Or, more elegant, use a socket pair to let select() return when a service
stop is requested. A socket pair can be created by calling
create_winpipe_transport() (see also snmplib/winpipe.c). The read end of the
socket pair can be registered for use in the select() call by calling
register_readfd().

Bart.

On Mon, May 24, 2010 at 6:31 AM, Snmp Nmcsnmp  wrote:

> On windows XP service pack 3 it does not seem to stop in a timely manner.
> If I put in the call WSACancelBlockingCall() then it break out fine. I will
> test it on several version of windows and will broadcast what I learn from
> it.
> thanks,
> Huy
>
>  --
> *From:* Bart Van Assche 
> *To:* Snmp Nmcsnmp 
> *Cc:* net-snmp-users@lists.sourceforge.net
> *Sent:* Sat, May 22, 2010 3:44:07 AM
>
> *Subject:* Re: stop trapd serivce on windows timeout?
>
> Hello Huy,
>
> The Win32 snmptrapd calls closesocket() on the UDP socket(s) owned by
> snmptrapd to make select() stop. While this seems to work with some Windows
> versions (e.g. Windows XP), this is undocumented Winsock behavior. So
> whether or not this works may depend on the Windows version. On which
> Windows version did you observe this behavior ?
>
--

___
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: stop trapd serivce on windows timeout?

2010-06-04 Thread Bart Van Assche
Hello Huy,

Please file a bug report or a patch for this issue such that it doesn't get
forgotten.

Bart.


On Mon, May 24, 2010 at 6:31 AM, Snmp Nmcsnmp  wrote:

> On windows XP service pack 3 it does not seem to stop in a timely manner.
> If I put in the call WSACancelBlockingCall() then it break out fine. I will
> test it on several version of windows and will broadcast what I learn from
> it.
> thanks,
> Huy
>
>  --
> *From:* Bart Van Assche 
> *To:* Snmp Nmcsnmp 
> *Cc:* net-snmp-users@lists.sourceforge.net
> *Sent:* Sat, May 22, 2010 3:44:07 AM
>
> *Subject:* Re: stop trapd serivce on windows timeout?
>
> Hello Huy,
>
> The Win32 snmptrapd calls closesocket() on the UDP socket(s) owned by
> snmptrapd to make select() stop. While this seems to work with some Windows
> versions (e.g. Windows XP), this is undocumented Winsock behavior. So
> whether or not this works may depend on the Windows version. On which
> Windows version did you observe this behavior ?
>
> Bart.
>
>
> On Fri, May 21, 2010 at 9:54 PM, Snmp Nmcsnmp  wrote:
>
>>
>> Hi Bart,
>> It is net-snmp-5.4.2.1 and the conf file contains just these two lines:
>>
>> authCommunity log, net, execute public
>> snmpTrapdAddr udp:137.69.187.10:666
>> regards,
>> Huy
>>
>>
>>   --
>> *From:* Bart Van Assche 
>> *To:* Snmp Nmcsnmp 
>> *Cc:* net-snmp-users@lists.sourceforge.net
>> *Sent:* Fri, May 21, 2010 11:53:33 AM
>> *Subject:* Re: stop trapd serivce on windows timeout?
>>
>> On Fri, May 21, 2010 at 7:38 PM, Snmp Nmcsnmp  wrote:
>>
>>>  Stop net-snmp trapd on windows timeout and it think it hang on the
>>> select. Does anyone have run into the same issue? or have a solution to
>>> solve it?
>>>
>>
>> I haven't seen this so far. With which version did this occur ? And how
>> does your snmptrapd.conf look like ?
>>
>> Bart.
>>
>
--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo___
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