1GENDERS_GETNODES(3)               LIBGENDERS               GENDERS_GETNODES(3)
2
3
4

NAME

6       genders_getnodes - get nodes from the genders file
7

SYNOPSIS

9       #include <genders.h>
10
11       int  genders_getnodes(genders_t  handle,  char *nodes[], int len, const
12       char *attr, const char *val);
13

DESCRIPTION

15       genders_getnodes() gets the names of nodes in  the  genders  file  that
16       have  the  attribute  specified by attr and the value specified by val.
17       The nodes are stored in the list pointed to by  nodes.   len  indicates
18       the  number  of nodes that can be stored in the list.  If attr is NULL,
19       genders_getnodes() returns all the nodes listed in  the  genders  file.
20       If val is NULL, attribute values are ignored.
21
22       To  avoid  passing  in a list that is not large enough to store all the
23       nodes, genders_getnumnodes(3) should be used to determine  the  minimum
24       number   of   elements   nodes   should   be   able   to  store.   gen‐
25       ders_nodelist_create(3) could be used to create a list that is  guaran‐
26       teed to be large enough to store all of the nodes.
27

RETURN VALUES

29       On success, the number of nodes stored in nodes is returned.  On error,
30       -1 is returned, and an error code is returned  in  handle.   The  error
31       code  can be retrieved via genders_errnum(3) , and a description of the
32       error code can be retrieved via genders_strerror(3).  Error  codes  are
33       defined in genders.h.
34

ERRORS

36       GENDERS_ERR_NULLHANDLE
37              The  handle  parameter is NULL.  The genders handle must be cre‐
38              ated with genders_handle_create(3).
39
40       GENDERS_ERR_NOTLOADED
41              genders_load_data(3) has not been called to load genders data.
42
43       GENDERS_ERR_OVERFLOW
44              The list pointed to by nodes is not large enough  to  store  all
45              the nodes.
46
47       GENDERS_ERR_PARAMETERS
48              An incorrect parameter has been passed in.
49
50       GENDERS_ERR_NULLPTR
51              A null pointer has been found in the list passed in.
52
53       GENDERS_ERR_MAGIC
54              handle  has an incorrect magic number.  handle does not point to
55              a genders handle or handle has been  destroyed  by  genders_han‐
56              dle_destroy(3).
57

FILES

59       /usr/include/genders.h
60

SEE ALSO

62       libgenders(3),   genders_handle_create(3),  genders_load_data(3),  gen‐
63       ders_getnumnodes(3),   genders_nodelist_create(3),   genders_errnum(3),
64       genders_strerror(3)
65
66
67
68LLNL                              August 2003              GENDERS_GETNODES(3)
Impressum