UDEV\_MONITOR\_RECEIVE\_DEVICE(3) udev\_monitor\_receive\_device UDEV\_MONITOR\_RECEIVE\_DEVICE(3)

.SH "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

.SH "SYNOPSIS"

```
#include <libudev.h>
```

.HP 1152u **struct udev\_device \*udev\_monitor\_receive\_device(struct udev\_monitor \*udev\_monitor);**

.HP 816u **int udev\_monitor\_enable\_receiving(struct udev\_monitor \*udev\_monitor);**

.HP 984u **int udev\_monitor\_set\_receive\_buffer\_size(struct udev\_monitor \*udev\_monitor, int size);**

.HP 576u **int udev\_monitor\_get\_fd(struct udev\_monitor \*udev\_monitor);**

.HP 840u **struct udev \*udev\_monitor\_get\_udev(struct udev\_monitor \*udev\_monitor);**

.SH "RETURN VALUE"

.PP 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.

.PP 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.

.PP On success, **udev\_monitor\_get\_fd()** returns the file descriptor used by this monitor. On failure, a negative error code is returned.

.PP **udev\_monitor\_get\_udev()** always returns a pointer to the udev context that this monitor is associated with.

.SH "HISTORY"

.PP **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.

.SH "SEE ALSO"

.PP [**udev\_new**(3)](/man/os/systemd/udev_new.3), [**udev\_device\_new\_from\_syspath**(3)](/man/os/systemd/udev_device_new_from_syspath.3), [**udev\_enumerate\_new**(3)](/man/os/systemd/udev_enumerate_new.3), [**udev\_monitor\_new\_from\_netlink**(3)](/man/os/systemd/udev_monitor_new_from_netlink.3), [**udev\_monitor\_filter\_update**(3)](/man/os/systemd/udev_monitor_filter_update.3), [**udev\_list\_entry**(3)](/man/os/systemd/udev_list_entry.3), [**systemd**(1)](/man/os/systemd/systemd.1)

systemd 262.2

---

Document: udev_monitor_receive_device(3) from systemd 262.2-r1 (Chainguard OS)
Source: https://github.com/systemd/systemd
