udev_monitor_receive_device.xml revision 06255d6f76f3f630a9634d745a48910b1ea3e4d3
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann<!ENTITY % entities SYSTEM "custom-entities.ent" >
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann This file is part of systemd.
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann Copyright 2015 David Herrmann <dh.herrmann@gmail.com>
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann systemd is free software; you can redistribute it and/or modify it
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann under the terms of the GNU Lesser General Public License as published by
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann the Free Software Foundation; either version 2.1 of the License, or
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann (at your option) any later version.
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann systemd is distributed in the hope that it will be useful, but
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann WITHOUT ANY WARRANTY; without even the implied warranty of
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann Lesser General Public License for more details.
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann You should have received a copy of the GNU Lesser General Public License
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann along with systemd; If not, see <http://www.gnu.org/licenses/>.
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann <refentryinfo>
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann <authorgroup>
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann </authorgroup>
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann </refentryinfo>
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann <refentrytitle>udev_monitor_receive_device</refentrytitle>
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann <refname>udev_monitor_receive_device</refname>
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann <refname>udev_monitor_enable_receiving</refname>
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann <refname>udev_monitor_set_receive_buffer_size</refname>
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann <refpurpose>Query and modify device monitor</refpurpose>
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann </refnamediv>
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann <refsynopsisdiv>
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann <funcsynopsis>
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann <funcsynopsisinfo>#include <libudev.h></funcsynopsisinfo>
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann <funcprototype>
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann <funcdef>struct udev_device *<function>udev_monitor_receive_device</function></funcdef>
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann <paramdef>struct udev_monitor *<parameter>udev_monitor</parameter></paramdef>
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann </funcprototype>
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann <funcprototype>
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann <funcdef>int <function>udev_monitor_enable_receiving</function></funcdef>
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann <paramdef>struct udev_monitor *<parameter>udev_monitor</parameter></paramdef>
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann </funcprototype>
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann <funcprototype>
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann <funcdef>int <function>udev_monitor_set_receive_buffer_size</function></funcdef>
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann <paramdef>struct udev_monitor *<parameter>udev_monitor</parameter></paramdef>
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann <paramdef>int <parameter>size</parameter></paramdef>
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann </funcprototype>
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann <funcprototype>
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann <funcdef>int <function>udev_monitor_get_fd</function></funcdef>
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann <paramdef>struct udev_monitor *<parameter>udev_monitor</parameter></paramdef>
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann </funcprototype>
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann <funcprototype>
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann <funcdef>struct udev *<function>udev_monitor_get_udev</function></funcdef>
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann <paramdef>struct udev_monitor *<parameter>udev_monitor</parameter></paramdef>
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann </funcprototype>
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann </funcsynopsis>
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann </refsynopsisdiv>
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann <!--<refsect1>
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann <title>Description</title>
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann <para>XXX: Add short description.</para>
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann </refsect1>-->
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann <para>On success,
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann <function>udev_monitor_receive_device()</function> returns a
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann pointer to a newly referenced device that was received via the
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann monitor. The caller is responsible to drop this reference when
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann done. On failure, <constant>NULL</constant> is returned.</para>
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann <para>On success,
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann <function>udev_monitor_enable_receiving()</function> and
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann <function>udev_monitor_set_receive_buffer_size()</function>
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann return an integer greater than, or equal to,
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann <constant>0</constant>. On failure, a negative error code is
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann returned.</para>
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann <para>On success, <function>udev_monitor_get_fd()</function>
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann returns the file descriptor used by this monitor. On failure,
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann a negative error code is returned.</para>
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann <para><function>udev_monitor_get_udev()</function> always returns
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann a pointer to the udev context that this monitor is associated
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann <citerefentry><refentrytitle>udev_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann <citerefentry><refentrytitle>udev_device_new_from_syspath</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann <citerefentry><refentrytitle>udev_enumerate_new</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann <citerefentry><refentrytitle>udev_monitor_new_from_netlink</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann <citerefentry><refentrytitle>udev_monitor_filter_update</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann <citerefentry><refentrytitle>udev_list_entry</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
06255d6f76f3f630a9634d745a48910b1ea3e4d3David Herrmann <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,