libnutclient_general(3)

libnutclient_general3

General and utility functions in network ups tools high-level client access library

Usage

        #include <nutclient.h>
        typedef void* NUTCLIENT_t;
        void nutclient_destroy(NUTCLIENT_t client);
        typedef char** strarr;
        strarr strarr_alloc(unsigned short count);
        void strarr_free(strarr arr);

Overview

The nutclient_destroy() function destroys a NUTCLIENT_t or derived (like NUTCLIENT_TCP_t) connection object, and frees allocated memory.

• The strarr type represents an array of C strings (array of char pointer). The array must always be terminated by a NULL pointer.

Pointed strings must be allocated by (x)calloc or (x)strdup.

• The strarr_alloc() function allocates a strarr array with the specified number of (non-initialized) string pointers.

Another additional pointer set to NULL is added at the end of the array.

• The strarr_free function frees a strarr array. It also frees all pointed strings.

Common arguments:

• dev is the device name.

Releases

6 releases since Debian 9 (Stretch); the text changed 3 times.

  1. 9–11
  2. 12
  3. 13
  4. Arch

From nut 2.8.5-2 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.