1 /* SPDX-License-Identifier: LGPL-2.1-or-later */ 2 #pragma once 3 4 #include <errno.h> 5 6 #include "sd-device.h" 7 8 typedef enum MonitorNetlinkGroup { 9 MONITOR_GROUP_NONE, 10 MONITOR_GROUP_KERNEL, 11 MONITOR_GROUP_UDEV, 12 _MONITOR_NETLINK_GROUP_MAX, 13 _MONITOR_NETLINK_GROUP_INVALID = -EINVAL, 14 } MonitorNetlinkGroup; 15 16 int device_monitor_new_full(sd_device_monitor **ret, MonitorNetlinkGroup group, int fd); 17 int device_monitor_disconnect(sd_device_monitor *m); 18 int device_monitor_allow_unicast_sender(sd_device_monitor *m, sd_device_monitor *sender); 19 int device_monitor_enable_receiving(sd_device_monitor *m); 20 int device_monitor_get_fd(sd_device_monitor *m); 21 int device_monitor_send_device(sd_device_monitor *m, sd_device_monitor *destination, sd_device *device); 22 int device_monitor_receive_device(sd_device_monitor *m, sd_device **ret); 23