nodeupdown_get_up_nodes_list

Langue: en

Autres versions - même langue

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

Section: 3 (Bibliothèques de fonctions)

NAME

nodeupdown_get_up_nodes_list, nodeupdown_get_down_nodes_list, - get up or down nodes

SYNOPSIS

#include <nodeupdown.h>

int nodeupdown_get_up_nodes_list(nodeupdown_t handle, char **list, int len);

int nodeupdown_get_down_nodes_list(nodeupdown_t handle, char **list, int len);

DESCRIPTION

nodeupdown_get_up_nodes_list() retrieves a list of noddes that are up and places each node name into the list pointed to by list. len should indicate the number of nodes that can be stored in list. nodeupdown_get_down_nodes_list() is identical to nodeupdown_get_up_nodes_list(), except that it retrieves a list of down nodes.

To avoid passing in a list that is not large enough to store all of the up or down nodes, nodeupdown_nodelist_create(3) should be used to create a list that is guaranteed to be large enough to store all of the nodes.

RETURN VALUES

On success, the number of nodes copied into list is returned. On error, -1 is returned, 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_PARAMETERS
An incorrect parameter has been passed in.
NODEUPDOWN_ERR_NULLPTR
A null pointer has been found in the list passed in.
NODEUPDOWN_ERR_OVERFLOW
The list pointed to by list is not large enough to store all the nodes.
NODEUPDOWN_ERR_OUTMEM
malloc(3) has failed internally.
NODEUPDOWN_ERR_CLUSTERLIST_MODULE
Internal error with the clusterlist module
NODEUPDOWN_ERR_HOSTLIST
Hostlist API has failed internally.
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_get_up_nodes_string (3), nodeupdown_get_down_nodes_string (3), nodeupdown_errnum(3), nodeupdown_strerror(3)