1LIBNUTCLIENT_GENERAL(3)           NUT Manual           LIBNUTCLIENT_GENERAL(3)
2
3
4

NAME

6       libnutclient_general, nutclient_destroy, strarr_alloc, strarr_free -
7       General and utility functions in Network UPS Tools high-level client
8       access library
9

SYNOPSIS

11       #include <nutclient.h>
12
13       typedef void* NUTCLIENT_t;
14
15       void nutclient_destroy(NUTCLIENT_t client);
16
17       typedef char** strarr;
18
19       strarr strarr_alloc(unsigned short count);
20       void strarr_free(strarr arr);
21

DESCRIPTION

23       The nutclient_destroy() function destroys a NUTCLIENT_t or derived
24       (like NUTCLIENT_TCP_t) connection object, and frees allocated memory.
25
26       The strarr type represents an array of C strings (array of char
27       pointer). The array must always be terminated by a NULL pointer.
28       Pointed strings must be allocated by (x)calloc or (x)strdup.
29
30       The strarr_alloc() function allocates a strarr array with the specified
31       number of (non-initialized) string pointers. Another additional pointer
32       set to 0 is added at the end of the array.
33
34       The strarr_free function frees a strarr array. It also frees all
35       pointed strings.
36
37       dev is the device name.
38

SEE ALSO

40       libnutclient(3)
41
42
43
44Network UPS Tools 2.7.3.          03/02/2016           LIBNUTCLIENT_GENERAL(3)
Impressum