NUTSCAN_SCAN_XML_HTT(3)
π NUTSCAN_SCAN_XML_HTT(3) β the NUT Manual, bestie edition π
okay so this is a page from the NUT Manual (that's Network UPS Tools, iykyk) and it's literally all about sniffing out XML/HTTP devices on your network. put your hair up, grab a strawberry π, and let's get into it.
β¨ NAME β¨
nutscan_scan_xml_http_range β go scan the network for XML/HTTP devices, no cap.
πΈ SYNOPSIS πΈ
#include <nut-scan.h>
#include <unistd.h> /* useconds_t */
nutscan_device_t * nutscan_scan_xml_http_range(
const char * start_ip,
const char * end_ip,
useconds_t usec_timeout,
nutscan_xml_t * sec)
nutscan_device_t * nutscan_scan_ip_range_xml_http(
nutscan_ip_range_list_t irl,
useconds_t usec_timeout,
nutscan_xml_t * sec)
bestie pls note: yes, the second one takes a nutscan_ip_range_list_t * irl β I'm showing you the shape of it, the real signature is exactly the one up there in the code block. copy it, don't freestyle it π
π DESCRIPTION π
so the two functions, nutscan_scan_xml_http_range() and nutscan_scan_ip_range_xml_http(), are out here trying to detect NUT compatible XML/HTTP devices. that's the whole job. that's the assignment. β¨
here's the tea on how they decide where to look:
- if
start_ip(fornutscan_scan_xml_http_range()) orirl(fornutscan_scan_ip_range_xml_http()) isNULL, the function in question does the chaotic thing and issues a broadcast message on all currently configured network interfaces. yes, all of them. it's giving "i'll just ask everyone" π«Ά - otherwise,
nutscan_scan_xml_http_range()queries every IP ranging fromstart_iptostop_ip, wherestartIPis mandatory andstopIPis optional β ifstopIPisNULL, it just scans the onestartIPaddress. meanwhilenutscan_scan_ip_range_xml_http()can walk several IP address ranges represented by anutscan_ip_range_list_tstructure. iconic behavior, honestly.
and those IP arguments? they may be either IPv4 or IPv6 addresses, or even host names. flexible queen π
it waits up to usec_timeout microseconds for a response from potential devices. so like, set that timeout with intention, okay? β³
π¨ THE BIG ONE, DO NOT SKIP: You MUST call nutscan_init(3) before using this function. like, before. not after. before. this is not a vibe check you can skip π
π RETURN VALUE π
nutscan_scan_xml_http_range() returns a pointer to a nutscan_device_t structure containing all found devices, or NULL if an error occurs or no device is found. that's it. that's the return. either you get the goods or you get nothing, no in-between π
π¦ SEE ALSO π¦
go read these too, bestie, they're all part of the family:
nutscan_init(3)nutscan_scan_usb(3)nutscan_scan_snmp(3)nutscan_scan_nut(3)nutscan_scan_avahi(3)nutscan_scan_ipmi(3)nutscan_display_sanity_check(3)nutscan_display_sanity_check_serial(3)nutscan_display_ups_conf_with_sanity_check(3)nutscan_display_ups_conf(3)nutscan_display_parsable(3)nutscan_new_device(3)nutscan_free_device(3)nutscan_add_option_to_device(3)nutscan_add_device_to_device(3)nutscan_scan_eaton_serial(3)nutscan_init_ip_ranges(3)nutscan_free_ip_ranges(3)nutscan_add_ip_range(3)nutscan_cidr_to_ip(3)
okay that's the whole page, you ate it π this came to you from Network UPS Tools 2.8.5, dated 10/07/2026 β main character energy, periodt. now go call nutscan_init(3) first, I'm literally begging π«Άβ¨
π¦ where this page comes from
- fedora 43: nut-devel 2.8.5-9.fc43 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- fedora 43: nut-devel 2.8.5-9.fc43 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- fedora 44: nut-devel 2.8.5-9.fc44 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- fedora 44: nut-devel 2.8.5-9.fc44 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms