1NUTSCAN_SCAN_SNMP(3)              NUT Manual              NUTSCAN_SCAN_SNMP(3)
2
3
4

NAME

6       nutscan_scan_snmp - Scan network for SNMP devices.
7

SYNOPSIS

9       #include <nut-scan.h>
10       #include <unistd.h> /* useconds_t */
11
12       nutscan_device_t * nutscan_scan_snmp(
13              const char * start_ip,
14              const char * stop_ip,
15              useconds_t timeout,
16              nutscan_snmp_t * sec);
17

DESCRIPTION

19       The nutscan_scan_snmp() function try to detect NUT compatible SNMP
20       devices. It tries SNMP queries on every IP ranging from start_ip to
21       stop_ip. Those IP arguments may be either IPv4 or IPv6 addresses or
22       host names.
23
24       You MUST call nutscan_init(3) before using this function.
25
26       This function waits up to timeout microseconds before considering an IP
27       address does not respond to SNMP queries.
28
29       A valid nutscan_snmp_t structure must be passed to this function.
30
31       The nutscan_snmp_t structure contains the following members which must
32       be filled as described below:
33
34           char * 'community';
35           char * 'secLevel';
36           char * 'secName';
37           char * 'authPassword';
38           char * 'privPassword';
39           char * 'authProtocol';
40           char * 'privProtocol';
41
42       If community is not NULL, SNMP v1 request are sent using this
43       community.
44
45       If community is NULL and secLevel is NULL, SNMP v1 is selected and
46       community is set to "public".
47
48       In the other cases, SNMP v3 is used. secLevel may be one of
49       SNMP_SEC_LEVEL_NOAUTH, SNMP_SEC_LEVEL_AUTHNOPRIV or
50       SNMP_SEC_LEVEL_AUTHPRIV. secName is the security name and must be non
51       NULL.
52
53       If secLevel is set to SNMP_SEC_LEVEL_AUTHNOPRIV, authPassword must be
54       non NULL.
55
56       If secLevel is set to SNMP_SEC_LEVEL_AUTHPRIV, authPassword and
57       privPassword must be non NULL.
58
59       If authProtocol is NULL, MD5 protocol is used. Else you can set
60       authProtocol to either "MD5" or "SHA".
61
62       If privProtocol is NULL, DES protocol is used. Else you can set
63       privProtocol to either "AES" or "DES".
64
65       peername and handle are used internally and do not need any
66       initialization.
67

RETURN VALUE

69       The nutscan_scan_snmp() function returns a pointer to a
70       nutscan_device_t structure containing all found devices or NULL if an
71       error occurs or no device is found.
72

SEE ALSO

74       nutscan_init(3), nutscan_scan_usb(3), nutscan_scan_xml_http_range(3),
75       nutscan_scan_nut(3), nutscan_scan_avahi(3), nutscan_scan_ipmi(3),
76       nutscan_display_ups_conf(3), nutscan_display_parsable(3),
77       nutscan_new_device(3), nutscan_free_device(3),
78       nutscan_add_option_to_device(3), nutscan_add_device_to_device(3),
79       nutscan_scan_eaton_serial(3), nutscan_cidr_to_ip(3)
80
81
82
83Network UPS Tools 2.8.0           04/26/2022              NUTSCAN_SCAN_SNMP(3)
Impressum