[prev in list] [next in list] [prev in thread] [next in thread] 

List:       netsaintplug-devel
Subject:    Re: [Netsaintplug-devel] Use of connect() in check_udp
From:       Karl DeBisschop <kdebisschop () range ! infoplease ! com>
Date:       2001-08-22 13:42:31
[Download RAW message or body]

Ian Wakeling wrote:
> 
> I'm trying to use check_udp to monitor a service which responds to
> udp requests. Unfortunately, check_udp isn't getting the responses
> the server sends.
> 
> I looked at the check_udp source code and noticed that it uses
> connect(), which restricts which host/port messages are received
> from, as well as controlling where they are sent to.
> 
> I talked to the developer of the service and he confirmed that the
> service has one thread/port which listens for incoming requests
> and places them on a queue. A set of other threads process
> requests from the queue, using a different port to send the reply,
> in much the same way as a tcp server accepts connections on one
> port, but creates a new local socket to handle each connection.
> 
> I can work around the problem (by writing a custom plugin), but
> this is a fairly common server pattern and it seems a shame that
> check_udp won't work with it. Is there a particular reason for
> being so restrictive, or is it just like that because it uses the
> common code in netutils.c?

netutils.c should not restrict what the plugin can do. But it should
allow code sharing whenever possible. It may be that the code in
netutils.c is primarily what should be modified.
 
> The required changes are pretty trivial and I'd be happy to help
> if requested, but I wouldn't presume to meddle without invitation!

Go ahead and have at it. (please use the code in CVS as your
starting point, if at all possible).

-- 
Karl

_______________________________________________
Netsaintplug-devel mailing list
Netsaintplug-devel@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/netsaintplug-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic