NAME

nutscan_free_ip_ranges - Free contents of a nutscan_ip_range_list_t structure populated (and optionally created) by nutscan_init_ip_ranges() and, more importantly, filled by a series of nutscan_add_ip_range() calls.

SYNOPSIS

Note
Two NUT websites

This version of the page reflects NUT release v2.8.3 with codebase commited c0acf09af at 2025-04-21T23:59:59+00:00

Options, features and capabilities in current development (and future releases) are detailed on the main site and may differ from ones described here.

        #include <nut-scan.h>

        void nutscan_free_ip_ranges(nutscan_ip_range_list_t *irl);

DESCRIPTION

The nutscan_free_ip_ranges() function can free a nutscan_ip_range_list_t structure. Doing so, it frees the whole linked list of nutscan_ip_range_t entries, and zeroes out helper properties.

The structure itself is not freed (as it can be a statically allocated variable on the stack), and can be re-used for a new list if needed.

The caller must ultimately free the structure object if it was allocated dynamically (e.g. by originally calling nutscan_init_ip_ranges(NULL)).

NOTES

Technically, the function is currently defined in nutscan-ip.h file.

SEE ALSO