1NUTSCAN_ADD_DEVICE_T(3) NUT Manual NUTSCAN_ADD_DEVICE_T(3)
2
3
4
6 nutscan_add_device_to_device - Concatenate two devices structure.
7
9 #include <nut-scan.h>
10
11 nutscan_device_t * nutscan_add_device_to_device(
12 nutscan_device_t * first,
13 nutscan_device_t * second);
14
16 The nutscan_device_t contains the following variables:
17
18 nutscan_device_type_t type;
19 char * driver;
20 char * port;
21 nutscan_options_t opt;
22 struct nutscan_device * prev;
23 struct nutscan_device * next;
24
25 This is a double linked list of device. Each device is described by its
26 type, its driver name, its port and any number of optional data.
27
28 The nutscan_add_device_to_device() concatenates first and second
29 devices to a unique device. No new device is created, the two linked
30 lists are simply linked to each other. So first and second devices are
31 likely to be modified by this function.
32
34 The nutscan_add_device_to_device() functions returns a pointer to a
35 device containing both passed devices. Note that it’s not a new device,
36 so it is either first or second which is returned.
37
39 Technically, the function is currently defined in nutscan-device.h
40 file.
41
43 nutscan_scan_usb(3), nutscan_scan_xml_http_range(3),
44 nutscan_scan_nut(3), nutscan_scan_avahi(3), nutscan_scan_ipmi(3),
45 nutscan_scan_snmp(3), nutscan_display_ups_conf(3),
46 nutscan_display_parsable(3), nutscan_new_device(3),
47 nutscan_free_device(3), nutscan_add_option_to_device(3)
48
49
50
51Network UPS Tools 2.8.0 04/26/2022 NUTSCAN_ADD_DEVICE_T(3)