NUTSCAN_FREE_IP_RANG(3)
π NUTSCAN_FREE_IP_RANG(3) β the cleanup era π
okay so bestie, we're in the NUT Manual and this page is literally all about saying goodbye to your IP ranges properly. no leaks, no mess, just β¨closureβ¨.
π NAME π
nutscan_free_ip_ranges β it frees the contents of a nutscan_ip_range_list_t structure, the one that got populated (and optionally created) by nutscan_init_ip_ranges() and β more importantly β filled by a whole series of nutscan_add_ip_range() calls. it's the cleanup bestie. the one who stays after the party π«Ά
β¨ SYNOPSIS β¨
#include <nut-scan.h>
void nutscan_free_ip_ranges(nutscan_ip_range_list_t *irl);
π¦ DESCRIPTION π¦
so nutscan_free_ip_ranges() can free a nutscan_ip_range_list_t structure. and like, when it does that? it frees the whole linked list of nutscan_ip_range_t entries, and zeroes out helper properties. every single node. gone. slay π
heads up though: the structure itself is not freed β because it can totally be a statically allocated variable on the stack, and we are not out here freeing stack memory, no ma'am π
and because the structure is still there, it can be re-used for a new list if needed. recycling icon behavior, we love to see it π
the caller must ultimately free the structure object if it was allocated dynamically (e.g. by originally calling nutscan_init_ip_ranges(NULL)). that part is on you, bestie β this function handles the contents, not the container π
π NOTES π
technically (iykyk), the function is currently defined in nutscan-ip.h file. not nut-scan.h. don't come for me, that's just what the docs say π
π SEE ALSO π
nutscan_init_ip_ranges(3)nutscan_add_ip_range(3)nutscan_stringify_ip_ranges(3)nutscan_cidr_to_ip(3)nutscan_ip_ranges_iter_init(3)nutscan_ip_ranges_iter_inc(3)
Network UPS Tools 2.8.5 πΈ 06/21/2026 πΈ and yeah, the page itself is NUTSCAN_FREE_IP_RANG(3) β mwah, go free those ranges, you icon π«Άπβ¨
π¦ where this page comes from
- arch rolling: nut 2.8.5-2 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms