1 LIBNUTCLIENT_GENERAL(3)
2 =======================
7 libnutclient_general, nutclient_destroy, strarr_alloc, strarr_free -
8 General and utility functions in Network UPS Tools high-level client access library
13 #include <nutclient.h>
15 typedef void* NUTCLIENT_t;
17 void nutclient_destroy(NUTCLIENT_t client);
19 typedef char** strarr;
21 strarr strarr_alloc(unsigned short count);
22 void strarr_free(strarr arr);
27 The *nutclient_destroy()* function destroys a 'NUTCLIENT_t' or derived
28 (like 'NUTCLIENT_TCP_t') connection object, and frees allocated memory.
30 The *strarr* type represents an array of C strings (array of char pointer).
31 The array must always be terminated by a NULL pointer.
32 Pointed strings must be allocated by (x)calloc or (x)strdup.
34 The *strarr_alloc()* function allocates a 'strarr' array with the specified
35 number of (non-initialized) string pointers.
36 Another additional pointer set to 0 is added at the end of the array.
38 The *strarr_free* function frees a 'strarr' array.
39 It also frees all pointed strings.
41 'dev' is the device name.
45 linkman:libnutclient[3]