1NUTSCAN(3) NUT Manual NUTSCAN(3)
2
3
4
6 nutscan - Network UPS Tools (NUT) device discovery library
7
9 The Network UPS Tools (NUT) nutscan library provides the same discovery
10 related features that are also offered by nut-scanner(8).
11
12 It enables the discovery of supported NUT devices (USB, SNMP, Eaton
13 XML/HTTP and IPMI) and NUT servers (either using Avahi, or the classic
14 connection method).
15
17 First, include the required header file:
18
19 #include <nut-scan.h>
20
21 Then, to discover new devices, use the appropriate function:
22
23 • nutscan_scan_usb(3) for supported USB devices,
24
25 • nutscan_scan_snmp(3) for supported SNMP agents,
26
27 • nutscan_scan_xml_http_range(3) for Eaton Network Management Card,
28
29 • nutscan_scan_nut(3) for NUT servers (upsd), using the classic
30 method (search for port),
31
32 • nutscan_scan_avahi(3) for NUT servers (upsd), using the mDNS
33 (Avahi) method,
34
35 • nutscan_scan_ipmi(3) for supported IPMI PSU.
36
37 All of these functions return a list of devices found, using the
38 nutscan_device_t structure. This structure is described in
39 nutscan_add_device_to_device(3).
40
41 Helper functions are also provided to output data using standard
42 formats:
43
44 • nutscan_display_parsable(3) for parsable output,
45
46 • nutscan_display_ups_conf(3) for ups.conf style.
47
49 There is currently no specific mechanism for error handling.
50
52 nut-scanner(8), nutscan_scan_usb(3), nutscan_scan_snmp(3),
53 nutscan_scan_xml_http_range(3), nutscan_scan_nut(3),
54 nutscan_scan_avahi(3), nutscan_scan_ipmi(3),
55 nutscan_display_parsable(3), nutscan_display_ups_conf(3),
56 nutscan_new_device(3), nutscan_free_device(3),
57 nutscan_add_device_to_device(3), nutscan_add_option_to_device(3),
58 nutscan_cidr_to_ip(3)
59
60 Internet resources:
61 http://avahi.org/
62
63
64
65Network UPS Tools 2.8.0 04/26/2022 NUTSCAN(3)