1 <?xml version='
1.0'
?> <!--*-nxml-*-->
2 <!DOCTYPE refentry PUBLIC
"-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
4 <!ENTITY % entities SYSTEM
"custom-entities.ent" >
9 SPDX-License-Identifier: LGPL-2.1+
11 This file is part of systemd.
13 Copyright 2015 David Herrmann <dh.herrmann@gmail.com>
15 systemd is free software; you can redistribute it and/or modify it
16 under the terms of the GNU Lesser General Public License as published by
17 the Free Software Foundation; either version 2.1 of the License, or
18 (at your option) any later version.
20 systemd is distributed in the hope that it will be useful, but
21 WITHOUT ANY WARRANTY; without even the implied warranty of
22 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 Lesser General Public License for more details.
25 You should have received a copy of the GNU Lesser General Public License
26 along with systemd; If not, see <http://www.gnu.org/licenses/>.
29 <refentry id=
"udev_monitor_receive_device"
30 xmlns:
xi=
"http://www.w3.org/2001/XInclude">
33 <title>udev_monitor_receive_device
</title>
34 <productname>systemd
</productname>
38 <contrib>Developer
</contrib>
39 <firstname>David
</firstname>
40 <surname>Herrmann
</surname>
41 <email>dh.herrmann@gmail.com
</email>
47 <refentrytitle>udev_monitor_receive_device
</refentrytitle>
48 <manvolnum>3</manvolnum>
52 <refname>udev_monitor_receive_device
</refname>
53 <refname>udev_monitor_enable_receiving
</refname>
54 <refname>udev_monitor_set_receive_buffer_size
</refname>
55 <refname>udev_monitor_get_fd
</refname>
56 <refname>udev_monitor_get_udev
</refname>
58 <refpurpose>Query and modify device monitor
</refpurpose>
63 <funcsynopsisinfo>#include
<libudev.h
></funcsynopsisinfo>
66 <funcdef>struct udev_device *
<function>udev_monitor_receive_device
</function></funcdef>
67 <paramdef>struct udev_monitor *
<parameter>udev_monitor
</parameter></paramdef>
71 <funcdef>int
<function>udev_monitor_enable_receiving
</function></funcdef>
72 <paramdef>struct udev_monitor *
<parameter>udev_monitor
</parameter></paramdef>
76 <funcdef>int
<function>udev_monitor_set_receive_buffer_size
</function></funcdef>
77 <paramdef>struct udev_monitor *
<parameter>udev_monitor
</parameter></paramdef>
78 <paramdef>int
<parameter>size
</parameter></paramdef>
82 <funcdef>int
<function>udev_monitor_get_fd
</function></funcdef>
83 <paramdef>struct udev_monitor *
<parameter>udev_monitor
</parameter></paramdef>
87 <funcdef>struct udev *
<function>udev_monitor_get_udev
</function></funcdef>
88 <paramdef>struct udev_monitor *
<parameter>udev_monitor
</parameter></paramdef>
95 <title>Description</title>
97 <para>XXX: Add short description.</para>
101 <title>Return Value
</title>
104 <function>udev_monitor_receive_device()
</function> returns a
105 pointer to a newly referenced device that was received via the
106 monitor. The caller is responsible to drop this reference when
107 done. On failure,
<constant>NULL
</constant> is returned.
</para>
110 <function>udev_monitor_enable_receiving()
</function> and
111 <function>udev_monitor_set_receive_buffer_size()
</function>
112 return an integer greater than, or equal to,
113 <constant>0</constant>. On failure, a negative error code is
116 <para>On success,
<function>udev_monitor_get_fd()
</function>
117 returns the file descriptor used by this monitor. On failure,
118 a negative error code is returned.
</para>
120 <para><function>udev_monitor_get_udev()
</function> always returns
121 a pointer to the udev context that this monitor is associated
126 <title>See Also
</title>
129 <citerefentry><refentrytitle>udev_new
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
130 <citerefentry><refentrytitle>udev_device_new_from_syspath
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
131 <citerefentry><refentrytitle>udev_enumerate_new
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
132 <citerefentry><refentrytitle>udev_monitor_new_from_netlink
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
133 <citerefentry><refentrytitle>udev_monitor_filter_update
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
134 <citerefentry><refentrytitle>udev_list_entry
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
135 <citerefentry><refentrytitle>systemd
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,