2012-01-24 10:22:33 +00:00
'\" t
. \" Title: nutscan
2022-06-29 10:37:36 +00:00
. \" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
. \" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
. \" Date: 04/26/2022
2012-01-24 10:22:33 +00:00
. \" Manual: NUT Manual
2022-06-29 10:37:36 +00:00
. \" Source: Network UPS Tools 2.8.0
2012-01-24 10:22:33 +00:00
. \" Language: English
. \"
2022-06-29 10:37:36 +00:00
.TH "NUTSCAN" "3" "04/26/2022" "Network UPS Tools 2\&.8\&.0" "NUT Manual"
2012-01-24 10:22:33 +00:00
. \" -----------------------------------------------------------------
. \" * Define some portability stuff
. \" -----------------------------------------------------------------
. \" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
. \" http://bugs.debian.org/507673
. \" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
. \" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n (.g .ds Aq \(aq
.el .ds Aq '
. \" -----------------------------------------------------------------
. \" * set default formatting
. \" -----------------------------------------------------------------
. \" disable hyphenation
.nh
. \" disable justification (adjust text to left margin only)
.ad l
. \" -----------------------------------------------------------------
. \" * MAIN CONTENT STARTS HERE *
. \" -----------------------------------------------------------------
.SH "NAME"
nutscan \- Network UPS Tools (NUT) device discovery library
.SH "DESCRIPTION"
.sp
The Network UPS Tools (NUT) \fB nutscan\fR library provides the same discovery related features that are also offered by \fB nut-scanner\fR (8)\& .
.sp
2022-06-29 10:37:36 +00:00
It enables the discovery of supported NUT devices (USB, SNMP, Eaton XML/HTTP and IPMI) and NUT servers (either using Avahi, or the classic connection method)\& .
2012-01-24 10:22:33 +00:00
.SH "DISCOVERY FUNCTIONS"
.sp
2012-08-12 21:39:31 +00:00
First, include the required header file:
2012-01-24 10:22:33 +00:00
.sp
.if n \{ \
.RS 4
. \}
.nf
#include <nut\- scan\& .h>
.fi
.if n \{ \
.RE
. \}
.sp
Then, to discover new devices, use the appropriate function:
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
\fB nutscan_scan_usb\fR (3)
for supported USB devices,
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
\fB nutscan_scan_snmp\fR (3)
for supported SNMP agents,
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
2022-06-29 10:37:36 +00:00
\fB nutscan_scan_xml_http_range\fR (3)
2012-01-24 10:22:33 +00:00
for Eaton Network Management Card,
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
\fB nutscan_scan_nut\fR (3)
2022-06-29 10:37:36 +00:00
for NUT servers (upsd), using the classic method (search for port),
2012-01-24 10:22:33 +00:00
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
\fB nutscan_scan_avahi\fR (3)
for NUT servers (upsd), using the mDNS (Avahi) method,
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
\fB nutscan_scan_ipmi\fR (3)
for supported IPMI PSU\& .
.RE
.sp
2012-08-12 21:39:31 +00:00
All of these functions return a list of devices found, using the nutscan_device_t structure\& . This structure is described in \fB nutscan_add_device_to_device\fR (3)\& .
2012-01-24 10:22:33 +00:00
.sp
2012-08-12 21:39:31 +00:00
Helper functions are also provided to output data using standard formats:
2012-01-24 10:22:33 +00:00
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
\fB nutscan_display_parsable\fR (3)
for parsable output,
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
\fB nutscan_display_ups_conf\fR (3)
for ups\& .conf style\& .
.RE
.SH "ERROR HANDLING"
.sp
2012-08-12 21:39:31 +00:00
There is currently no specific mechanism for error handling\& .
2012-01-24 10:22:33 +00:00
.SH "SEE ALSO"
.sp
2022-06-29 10:37:36 +00:00
\fB nut-scanner\fR (8), \fB nutscan_scan_usb\fR (3), \fB nutscan_scan_snmp\fR (3), \fB nutscan_scan_xml_http_range\fR (3), \fB nutscan_scan_nut\fR (3), \fB nutscan_scan_avahi\fR (3), \fB nutscan_scan_ipmi\fR (3), \fB nutscan_display_parsable\fR (3), \fB nutscan_display_ups_conf\fR (3), \fB nutscan_new_device\fR (3), \fB nutscan_free_device\fR (3), \fB nutscan_add_device_to_device\fR (3), \fB nutscan_add_option_to_device\fR (3), \fB nutscan_cidr_to_ip\fR (3)
.SS "Internet resources:"
.sp
http://avahi\& .org/