1 <?xml version='1.0'?> <!--*-nxml-*-->
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
4 <!ENTITY % entities SYSTEM "custom-entities.ent" >
7 <!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
9 <refentry id="udev_monitor_receive_device"
10 xmlns:xi="http://www.w3.org/2001/XInclude">
13 <title>udev_monitor_receive_device</title>
14 <productname>systemd</productname>
18 <refentrytitle>udev_monitor_receive_device</refentrytitle>
19 <manvolnum>3</manvolnum>
23 <refname>udev_monitor_receive_device</refname>
24 <refname>udev_monitor_enable_receiving</refname>
25 <refname>udev_monitor_set_receive_buffer_size</refname>
26 <refname>udev_monitor_get_fd</refname>
27 <refname>udev_monitor_get_udev</refname>
29 <refpurpose>Query and modify device monitor</refpurpose>
34 <funcsynopsisinfo>#include <libudev.h></funcsynopsisinfo>
37 <funcdef>struct udev_device *<function>udev_monitor_receive_device</function></funcdef>
38 <paramdef>struct udev_monitor *<parameter>udev_monitor</parameter></paramdef>
42 <funcdef>int <function>udev_monitor_enable_receiving</function></funcdef>
43 <paramdef>struct udev_monitor *<parameter>udev_monitor</parameter></paramdef>
47 <funcdef>int <function>udev_monitor_set_receive_buffer_size</function></funcdef>
48 <paramdef>struct udev_monitor *<parameter>udev_monitor</parameter></paramdef>
49 <paramdef>int <parameter>size</parameter></paramdef>
53 <funcdef>int <function>udev_monitor_get_fd</function></funcdef>
54 <paramdef>struct udev_monitor *<parameter>udev_monitor</parameter></paramdef>
58 <funcdef>struct udev *<function>udev_monitor_get_udev</function></funcdef>
59 <paramdef>struct udev_monitor *<parameter>udev_monitor</parameter></paramdef>
66 <title>Description</title>
68 <para>XXX: Add short description.</para>
72 <title>Return Value</title>
75 <function>udev_monitor_receive_device()</function> returns a
76 pointer to a newly referenced device that was received via the
77 monitor. The caller is responsible to drop this reference when
78 done. On failure, <constant>NULL</constant> is returned.</para>
81 <function>udev_monitor_enable_receiving()</function> and
82 <function>udev_monitor_set_receive_buffer_size()</function>
83 return an integer greater than, or equal to,
84 <constant>0</constant>. On failure, a negative error code is
87 <para>On success, <function>udev_monitor_get_fd()</function>
88 returns the file descriptor used by this monitor. On failure,
89 a negative error code is returned.</para>
91 <para><function>udev_monitor_get_udev()</function> always returns
92 a pointer to the udev context that this monitor is associated
97 <title>History</title>
98 <para><function>udev_monitor_receive_device()</function>,
99 <function>udev_monitor_enable_receiving()</function>,
100 <function>udev_monitor_set_receive_buffer_size()</function>,
101 <function>udev_monitor_get_fd()</function>, and
102 <function>udev_monitor_get_udev()</function> were added in version 221.</para>
106 <title>See Also</title>
109 <citerefentry><refentrytitle>udev_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
110 <citerefentry><refentrytitle>udev_device_new_from_syspath</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
111 <citerefentry><refentrytitle>udev_enumerate_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
112 <citerefentry><refentrytitle>udev_monitor_new_from_netlink</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
113 <citerefentry><refentrytitle>udev_monitor_filter_update</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
114 <citerefentry><refentrytitle>udev_list_entry</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
115 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,