1GENDERS_GETNODENAME(3) LIBGENDERS GENDERS_GETNODENAME(3)
2
3
4
6 genders_getnodename - get the current node name
7
9 #include <genders.h>
10
11 int genders_getnodename(genders_t handle, char *node, int len);
12
14 genders_getnodename() retrieves the name of the node that the function
15 is being called from. The node name returned is the shortened hostname
16 of the node and is stored in the buffer pointed to be node. len should
17 indicate the length of the buffer. The node returned by genders_getn‐
18 odename() is the shortened hostname of the node.
19
20 To avoid passing in a buffer that is not large enough to store the node
21 name, genders_getmaxnodelen(3) should be used to determine the minimum
22 buffer size that should be used.
23
25 On success, 0 is returned. On error, -1 is returned, and an error code
26 is returned in handle. The error code can be retrieved via gen‐
27 ders_errnum(3) , and a description of the error code can be retrieved
28 via genders_strerror(3). Error codes are defined in genders.h.
29
31 GENDERS_ERR_NULLHANDLE
32 The handle parameter is NULL. The genders handle must be cre‐
33 ated with genders_handle_create(3).
34
35 GENDERS_ERR_NOTLOADED
36 genders_load_data(3) has not been called to load genders data.
37
38 GENDERS_ERR_OVERFLOW
39 The buffer pointed to by node is not large enough to store the
40 node name.
41
42 GENDERS_ERR_PARAMETERS
43 An incorrect parameter has been passed in.
44
45 GENDERS_ERR_MAGIC
46 handle has an incorrect magic number. handle does not point to
47 a genders handle or handle has been destroyed by genders_han‐
48 dle_destroy(3).
49
51 /usr/include/genders.h
52
54 libgenders(3), genders_handle_create(3), genders_load_data(3), gen‐
55 ders_getmaxnodelen(3), genders_errnum(3), genders_strerror(3)
56
57
58
59LLNL August 2003 GENDERS_GETNODENAME(3)