HALF ECHO LEARN / REFERENCE COLLECTION

v262.2

udev_monitor_receive_device(3)

Query and modify device monitor

Man pages use the upstream DocBook stylesheet. Build-specific template values are explicitly labelled build-dependent. Host systemd version is not inferred from this collection.

Index · Directives systemd v262.2

Name

udev_monitor_receive_device, udev_monitor_enable_receiving, udev_monitor_set_receive_buffer_size, udev_monitor_get_fd, udev_monitor_get_udev — Query and modify device monitor

Synopsis

#include <libudev.h>
struct udev_device *udev_monitor_receive_device(udev_monitor); 
struct udev_monitor *udev_monitor;
 
int udev_monitor_enable_receiving(udev_monitor); 
struct udev_monitor *udev_monitor;
 
int udev_monitor_set_receive_buffer_size(udev_monitor,  
 size); 
struct udev_monitor *udev_monitor;
int size;
 
int udev_monitor_get_fd(udev_monitor); 
struct udev_monitor *udev_monitor;
 
struct udev *udev_monitor_get_udev(udev_monitor); 
struct udev_monitor *udev_monitor;
 

Return Value

On success, udev_monitor_receive_device() returns a pointer to a newly referenced device that was received via the monitor. The caller is responsible to drop this reference when done. On failure, NULL is returned.

On success, udev_monitor_enable_receiving() and udev_monitor_set_receive_buffer_size() return an integer greater than, or equal to, 0. On failure, a negative error code is returned.

On success, udev_monitor_get_fd() returns the file descriptor used by this monitor. On failure, a negative error code is returned.

udev_monitor_get_udev() always returns a pointer to the udev context that this monitor is associated with.

History

udev_monitor_receive_device(), udev_monitor_enable_receiving(), udev_monitor_set_receive_buffer_size(), udev_monitor_get_fd(), and udev_monitor_get_udev() were added in version 221.

See Also

udev_new(3), udev_device_new_from_syspath(3), udev_enumerate_new(3), udev_monitor_new_from_netlink(3), udev_monitor_filter_update(3), udev_list_entry(3), systemd(1)

Reproduced upstream material. Formatting and navigation adapted for Half Echo. The original file and copyright notices remain available above.