nodeupdown_up_count

Langue: en

Autres versions - même langue

Version: September 2003 (fedora - 01/12/10)

Section: 3 (Bibliothèques de fonctions)

NAME

nodeupdown_up_count, nodeupdown_down_count - return the number of nodes that are up or down

SYNOPSIS

#include <nodeupdown.h>

int nodeupdown_up_count(nodeupdown_t handle);

int nodeupdown_down_count(nodeupdown_t handle);

DESCRIPTION

nodeupdown_up_count() returns the number of nodes that are up.

nodeupdown_down_count() returns the number of nodes that are down.


RETURN VALUES

On success, nodeupdown_up_count() and nodeupdown_down_count() will return the number of up or down nodes respectively. On error, both return -1, and an error code is returned in handle. The error code can be retrieved via nodeupdown_errnum(3), and a description of the error code can be retrieved via nodeupdown_strerror(3). Error codes are defined in nodeupdown.h.

ERRORS

NODEUPDOWN_ERR_NULLHANDLE
The handle parameter is NULL. The nodeupdown handle must be created with nodeupdown_handle_create(3).
NODEUPDOWN_ERR_NOTLOADED
nodeupdown_load_data(3) has not been called and no data has been retrieved.
NODEUPDOWN_ERR_MAGIC
handle has an incorrect magic number. handle does not point to a nodeupdown handle or handle has been destroyed by nodeupdown_handle_destroy(3).

FILES

/usr/include/nodeupdown.h

SEE ALSO

libnodeupdown(3), nodeupdown_handle_create(3), nodeupdown_load_data(3), nodeupdown_errnum(3), nodeupdown_strerror(3)