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
11       nutscan_device_t * nutscan_scan_snmp(const char * start_ip,const char * stop_ip,long timeout, nutscan_snmp_t * sec);
12

DESCRIPTION

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

RETURN VALUE

63       The nutscan_scan_snmp() function returns a pointer to a
64       nutscan_device_t structure containing all found devices or NULL if an
65       error occurs or no device is found.
66

SEE ALSO

68       nutscan_init(3), nutscan_scan_usb(3), nutscan_scan_xml_http(3),
69       nutscan_scan_nut(3), nutscan_scan_avahi(3), nutscan_scan_ipmi(3),
70       nutscan_display_ups_conf(3), nutscan_display_parsable(3),
71       nutscan_new_device(3), nutscan_free_device(3),
72       nutscan_add_option_to_device(3), nutscan_add_device_to_device(3),
73       nutscan_scan_eaton_serial(3), nutscan_cidr_to_ip(3)
74
75
76
77Network UPS Tools 2.7.3.          03/02/2016              NUTSCAN_SCAN_SNMP(3)
Impressum