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
21       void strarr_free(strarr arr);
22

DESCRIPTION

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

SEE ALSO

41       libnutclient(3)
42
43
44
45Network UPS Tools 2.8.0           04/26/2022           LIBNUTCLIENT_GENERAL(3)
Impressum