1NODEUPDOWN_NODELIST_CREATE(3)    LIBNODEUPDOWN   NODEUPDOWN_NODELIST_CREATE(3)
2
3
4

NAME

6       nodeupdown_nodelist_create,      nodeupdown_nodelist_clear,     nodeup‐
7       down_nodelist_destroy - create, clear, and destroy lists
8

SYNOPSIS

10       #include <nodeupdown.h>
11
12       int nodeupdown_nodelist_create(nodeupdown_t handle, char ***list);
13
14       int nodeupdown_nodelist_clear(nodeupdown_t handle, char **list);
15
16       int nodeupdown_nodelist_destroy(nodeupdown_t handle, char **list);
17

DESCRIPTION

19       nodeupdown_nodelist_create(), nodeupdown_nodelist_clear(), and  nodeup‐
20       down_nodelist_destroy()  are  used  to create, clear, and destroy lists
21       (arrays of strings) for use  with  nodeupdown_get_up_nodes_list(3)  and
22       nodeupdown_get_down_nodes_list(3).
23
24       nodeupdown_nodelist_create()  creates a list with minimum size to store
25       nodes.  list is set to point to the created list.  The created list  is
26       guaranteed   to   store   all   the   nodes   returned   from   nodeup‐
27       down_get_up_nodes_list(3) and nodeupdown_get_down_nodes_list(3).
28
29       nodeupdown_nodelist_clear() clears any information stored in  the  list
30       pointed  to  by  list.   This  does  not  have  be called after nodeup‐
31       down_nodelist_create().  It only has to be called after being used with
32       nodeupdown_get_up_nodes_list(3)   or  nodeupdown_get_down_nodes_list(3)
33       and the programmer wishes to re-use the list.
34
35       nodeupdown_nodelist_destroy() destroys the list pointed to by list  and
36       frees all memory assocated with the list.
37

RETURN VALUES

39       On success, nodeupdown_nodelist_create() returns the number of elements
40       the created list can store.  On  success,  nodeupdown_nodelist_clear(),
41       and  nodeupdown_nodelist_destroy() return 0.  On error, -1 is returned,
42       and an error code is  returned  in  handle.   The  error  code  can  be
43       retrieved  via  nodeupdown_errnum(3)  ,  and a description of the error
44       code can be retrieved  via  nodeupdown_strerror(3).   Error  codes  are
45       defined in nodeupdown.h.
46

ERRORS

48       NODEUPDOWN_ERR_NULLHANDLE
49              The  handle  parameter  is  NULL.  The nodeupdown handle must be
50              created with nodeupdown_handle_create(3).
51
52       NODEUPDOWN_ERR_NOTLOADED
53              nodeupdown_load_data(3) has not been called and no data has been
54              retrieved.
55
56       NODEUPDOWN_ERR_PARAMETERS
57              An incorrect parameter has been passed in.
58
59       NODEUPDOWN_ERR_NULLPTR
60              A null pointer has been found in the list passed in.
61
62       NODEUPDOWN_ERR_OUTMEM
63              malloc(3) has failed internally.
64
65       NODEUPDOWN_ERR_ISFREE
66              All lists associated with handle have already been freed.
67
68       NODEUPDOWN_ERR_MAGIC
69              handle  has an incorrect magic number.  handle does not point to
70              a nodeupdown handle or handle  has  been  destroyed  by  nodeup‐
71              down_handle_destroy(3).
72

FILES

74       /usr/include/nodeupdown.h
75

SEE ALSO

77       libnodeupdown(3), nodeupdown_handle_create(3), nodeupdown_load_data(3),
78       nodeupdown_get_up_nodes_list (3),  nodeupdown_get_down_nodes_list  (3),
79       nodeupdown_errnum(3), nodeupdown_strerror(3)
80
81
82
83LLNL                              August 2003    NODEUPDOWN_NODELIST_CREATE(3)
Impressum