]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/udev_monitor_receive_device.xml
man: xinclude the generic text to talk about libsystemd pkgconfig
[thirdparty/systemd.git] / man / udev_monitor_receive_device.xml
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" >
5 %entities;
6 ]>
7
8 <!--
9 SPDX-License-Identifier: LGPL-2.1+
10
11 This file is part of systemd.
12
13 Copyright 2015 David Herrmann <dh.herrmann@gmail.com>
14 -->
15
16 <refentry id="udev_monitor_receive_device"
17 xmlns:xi="http://www.w3.org/2001/XInclude">
18
19 <refentryinfo>
20 <title>udev_monitor_receive_device</title>
21 <productname>systemd</productname>
22
23 <authorgroup>
24 <author>
25 <contrib>Developer</contrib>
26 <firstname>David</firstname>
27 <surname>Herrmann</surname>
28 <email>dh.herrmann@gmail.com</email>
29 </author>
30 </authorgroup>
31 </refentryinfo>
32
33 <refmeta>
34 <refentrytitle>udev_monitor_receive_device</refentrytitle>
35 <manvolnum>3</manvolnum>
36 </refmeta>
37
38 <refnamediv>
39 <refname>udev_monitor_receive_device</refname>
40 <refname>udev_monitor_enable_receiving</refname>
41 <refname>udev_monitor_set_receive_buffer_size</refname>
42 <refname>udev_monitor_get_fd</refname>
43 <refname>udev_monitor_get_udev</refname>
44
45 <refpurpose>Query and modify device monitor</refpurpose>
46 </refnamediv>
47
48 <refsynopsisdiv>
49 <funcsynopsis>
50 <funcsynopsisinfo>#include &lt;libudev.h&gt;</funcsynopsisinfo>
51
52 <funcprototype>
53 <funcdef>struct udev_device *<function>udev_monitor_receive_device</function></funcdef>
54 <paramdef>struct udev_monitor *<parameter>udev_monitor</parameter></paramdef>
55 </funcprototype>
56
57 <funcprototype>
58 <funcdef>int <function>udev_monitor_enable_receiving</function></funcdef>
59 <paramdef>struct udev_monitor *<parameter>udev_monitor</parameter></paramdef>
60 </funcprototype>
61
62 <funcprototype>
63 <funcdef>int <function>udev_monitor_set_receive_buffer_size</function></funcdef>
64 <paramdef>struct udev_monitor *<parameter>udev_monitor</parameter></paramdef>
65 <paramdef>int <parameter>size</parameter></paramdef>
66 </funcprototype>
67
68 <funcprototype>
69 <funcdef>int <function>udev_monitor_get_fd</function></funcdef>
70 <paramdef>struct udev_monitor *<parameter>udev_monitor</parameter></paramdef>
71 </funcprototype>
72
73 <funcprototype>
74 <funcdef>struct udev *<function>udev_monitor_get_udev</function></funcdef>
75 <paramdef>struct udev_monitor *<parameter>udev_monitor</parameter></paramdef>
76 </funcprototype>
77
78 </funcsynopsis>
79 </refsynopsisdiv>
80
81 <!--<refsect1>
82 <title>Description</title>
83
84 <para>XXX: Add short description.</para>
85 </refsect1>-->
86
87 <refsect1>
88 <title>Return Value</title>
89
90 <para>On success,
91 <function>udev_monitor_receive_device()</function> returns a
92 pointer to a newly referenced device that was received via the
93 monitor. The caller is responsible to drop this reference when
94 done. On failure, <constant>NULL</constant> is returned.</para>
95
96 <para>On success,
97 <function>udev_monitor_enable_receiving()</function> and
98 <function>udev_monitor_set_receive_buffer_size()</function>
99 return an integer greater than, or equal to,
100 <constant>0</constant>. On failure, a negative error code is
101 returned.</para>
102
103 <para>On success, <function>udev_monitor_get_fd()</function>
104 returns the file descriptor used by this monitor. On failure,
105 a negative error code is returned.</para>
106
107 <para><function>udev_monitor_get_udev()</function> always returns
108 a pointer to the udev context that this monitor is associated
109 with.</para>
110 </refsect1>
111
112 <refsect1>
113 <title>See Also</title>
114
115 <para>
116 <citerefentry><refentrytitle>udev_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
117 <citerefentry><refentrytitle>udev_device_new_from_syspath</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
118 <citerefentry><refentrytitle>udev_enumerate_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
119 <citerefentry><refentrytitle>udev_monitor_new_from_netlink</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
120 <citerefentry><refentrytitle>udev_monitor_filter_update</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
121 <citerefentry><refentrytitle>udev_list_entry</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
122 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
123 </para>
124 </refsect1>
125
126 </refentry>