Main Page | Modules | Data Structures | File List | Data Fields

Services
[Service Check Library]


Data Structures

struct  chksvc_service_t

Typedefs

typedef chksvc_service_t chksvc_service_t

Functions

apr_status_t chksvc_service_create (chksvc_service_t **self, const char *addr, short port, const char *type, sul_boolean_t use_ssl, apr_pool_t *pool)
apr_status_t chksvc_service_open (chksvc_service_t *self)
apr_status_t chksvc_service_initialize (chksvc_service_t *self, apr_pool_t *pool)
apr_status_t chksvc_service_set_default_port (chksvc_service_t *self, short port, short sport)
apr_status_t chksvc_service_close (chksvc_service_t *self)
apr_status_t chksvc_service_send (chksvc_service_t *self, char *data, apr_size_t *sz)
apr_status_t chksvc_service_recv (chksvc_service_t *self, char *data, apr_size_t *sz)

Typedef Documentation

typedef struct chksvc_service_t chksvc_service_t
 

Service object, contains the properties on the actual service being checked, where it's located and the information necessary to check. The socket and SSL context are also associated with the chksvc_service_t object.


Function Documentation

apr_status_t chksvc_service_close chksvc_service_t self  ) 
 

Closes the service connection, cleaning up after ourselves and making sure we don't leave the remote end just hanging there.

Parameters:
self A service.
Returns:
Success or failure.

apr_status_t chksvc_service_create chksvc_service_t **  self,
const char *  addr,
short  port,
const char *  type,
sul_boolean_t  use_ssl,
apr_pool_t *  pool
 

Creates a new chksvc_service_t object with the given properties.

Parameters:
self Pointer to receive the new Service object.
addr Address of the service's machine.
port Port that the service is running on.
type Type of the service, so that the proper check function gets invoked.
use_ssl Flag indicating if we should use SSL to do the check.
pool Pool for dynamic memory and resource allocation.
Returns:
Success or failure.

apr_status_t chksvc_service_initialize chksvc_service_t self,
apr_pool_t *  pool
 

Initializes the internal data structures that this service uses to perform its check, including polling, sockets, and SSL data structures.

Parameters:
self A service.
pool Pool for dynamic memory and resource allocation.
Returns:
Success or failure.

apr_status_t chksvc_service_open chksvc_service_t self  ) 
 

Opens a new connection, establishing a connection with the remote machine.

Parameters:
self A service.
Returns:
Success or failure.

apr_status_t chksvc_service_recv chksvc_service_t self,
char *  data,
apr_size_t *  sz
 

Receives some data from the remote service, taking into consideration if we're using SSL or have a time constraint or some other special condition to consider.

Parameters:
self A service.
data Memory to take the data that is received.
sz Size of the memory block at data and the maximum length to be received.
Returns:
Success or failure.

apr_status_t chksvc_service_send chksvc_service_t self,
char *  data,
apr_size_t *  sz
 

Sends some data to the service, taking into consideration if we're using SSL or have a time constraint or some other special condition that should be considered.

Parameters:
self A service.
data Memory to send to the service.
sz Number of bytes starting at data to send.
Returns:
Success or failure.

apr_status_t chksvc_service_set_default_port chksvc_service_t self,
short  port,
short  sport
 

Sets the default ports for this service if a port hasn't been specified, this is nice for when that aren't given and we'd just like to use the defaults.

Parameters:
self A service.
port Port number to be assigned if one isn't already.
sport Port number to be assigned if one isn't already.
Returns:
Success or failure.


Generated on Wed Apr 28 09:38:37 2004 for State by doxygen 1.3.5