NUTSCAN_SCAN_AVAHI(3)

πŸ’– NUTSCAN_SCAN_AVAHI πŸ’–

okay bestie, welcome to the NUT Manual ✨ this is the page for nutscan_scan_avahi from the NUT manual, section 3, and it's literally about finding your NUT services out there in the wild via mDNS πŸ¦‹


🌸 NAME 🌸

nutscan_scan_avahi β€” scan the network for NUT services via mDNS πŸ”βœ¨


πŸŽ€ SYNOPSIS πŸŽ€

#include <nut-scan.h>
#include <unistd.h> /* useconds_t */

nutscan_device_t * nutscan_scan_avahi(useconds_t usec_timeout);

πŸ’… DESCRIPTION πŸ’…

so the nutscan_scan_avahi() function is the one that goes out there and tries to detect the NUT service via mDNS, plus all its associated devices 🫢 it does that using the Avahi library, no cap.

⚠️ You MUST call nutscan_init(3) before using this function. like, mandatory. not optional. do it first, bestie 😀

and here's the tea: this function can query perspective IP addresses using the NUT protocol, and when it does that, it waits up to usec_timeout microseconds before deciding an IP address is unresponsive ⏳ so yeah, that timeout is doing real work.


πŸ‘‘ RETURN VALUE πŸ‘‘

  • it returns a pointer to a nutscan_device_t structure containing all found devices πŸŽ‰
  • it returns NULL if an error occurs, or if no device is found 😭 (it's giving "nobody home")

🌈 SEE ALSO 🌈

go read these too, they're iconic:

🧚 Internet resources 🧚


that's the whole page, bestie, you ate it πŸ’…βœ¨ this was Network UPS Tools 2.8.5, dated 10/07/2026, from the NUTSCAN_SCAN_AVAHI(3) manual page β€” mwah, go scan something πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ where this page comes from