···11<title>DVB Network API</title>22-<para>The DVB net device enables feeding of MPE (multi protocol encapsulation) packets33-received via DVB into the Linux network protocol stack, e.g. for internet via satellite44-applications. It can be accessed through <emphasis role="bold">/dev/dvb/adapter0/net0</emphasis>. Data types and55-and ioctl definitions can be accessed by including <emphasis role="bold">linux/dvb/net.h</emphasis> in your66-application.77-</para>88-<section id="dvb_net_types">99-<title>DVB Net Data Types</title>22+<para>The DVB net device controls the mapping of data packages that are33+ part of a transport stream to be mapped into a virtual network interface,44+ visible through the standard Linux network protocol stack.</para>55+<para>Currently, two encapsulations are supported:</para>66+<itemizedlist>77+ <listitem><para><ulink url="http://en.wikipedia.org/wiki/Multiprotocol_Encapsulation">88+ Multi Protocol Encapsulation (MPE)</ulink></para></listitem>99+ <listitem><para><ulink url="http://en.wikipedia.org/wiki/Unidirectional_Lightweight_Encapsulation">1010+ Ultra Lightweight Encapsulation (ULE)</ulink></para></listitem>1111+</itemizedlist>10121111-<section id="dvb-net-if">1212-<title>struct dvb_net_if</title>1313-<programlisting>1414-struct dvb_net_if {1515- __u16 pid;1616- __u16 if_num;1717- __u8 feedtype;1818-#define DVB_NET_FEEDTYPE_MPE 0 /⋆ multi protocol encapsulation ⋆/1919-#define DVB_NET_FEEDTYPE_ULE 1 /⋆ ultra lightweight encapsulation ⋆/2020-};2121-</programlisting>2222-</section>1313+<para>In order to create the Linux virtual network interfaces, an application1414+ needs to tell to the Kernel what are the PIDs and the encapsulation types1515+ that are present on the transport stream. This is done through1616+ <emphasis role="bold">/dev/dvb/adapter?/net?</emphasis> device node.1717+ The data will be available via virtual <constant>dvb?_?</constant>1818+ network interfaces, and will be controled/routed via the standard1919+ ip tools (like ip, route, netstat, ifconfig, etc).</para>2020+<para> Data types and and ioctl definitions are defined via2121+ <emphasis role="bold">linux/dvb/net.h</emphasis> header.</para>23222424-</section>2523<section id="net_fcalls">2624<title>DVB net Function Calls</title>2727-<para>To be written…2828-</para>29253030-<section id="NET_ADD_IF"3131-role="subsection"><title>NET_ADD_IF</title>3232-<para>DESCRIPTION3333-</para>3434-<informaltable><tgroup cols="1"><tbody><row><entry3535- align="char">3636-<para>This ioctl is undocumented. Documentation is welcome.</para>3737-</entry>3838- </row></tbody></tgroup></informaltable>3939-<para>SYNOPSIS4040-</para>4141-<informaltable><tgroup cols="1"><tbody><row><entry4242- align="char">4343-<para>int ioctl(fd, int request = NET_ADD_IF,4444- struct dvb_net_if *if);</para>4545-</entry>4646- </row></tbody></tgroup></informaltable>4747-<para>PARAMETERS4848-</para>4949-<informaltable><tgroup cols="2"><tbody><row><entry5050- align="char">5151-<para>int fd</para>5252-</entry><entry5353- align="char">5454-<para>File descriptor returned by a previous call to open().</para>5555-</entry>5656- </row><row><entry5757- align="char">5858-<para>int request</para>5959-</entry><entry6060- align="char">6161-<para>Equals NET_ADD_IF for this command.</para>6262-</entry>6363- </row><row><entry6464- align="char">6565-<para>struct dvb_net_if *if6666-</para>6767-</entry><entry6868- align="char">6969-<para>Undocumented.</para>7070-</entry>7171- </row></tbody></tgroup></informaltable>7272-&return-value-dvb;7373-</section>74267575-<section id="NET_REMOVE_IF"7676-role="subsection"><title>NET_REMOVE_IF</title>7777-<para>DESCRIPTION7878-</para>7979-<informaltable><tgroup cols="1"><tbody><row><entry8080- align="char">8181-<para>This ioctl is undocumented. Documentation is welcome.</para>8282-</entry>8383- </row></tbody></tgroup></informaltable>8484-<para>SYNOPSIS8585-</para>8686-<informaltable><tgroup cols="1"><tbody><row><entry8787- align="char">8888-<para>int ioctl(fd, int request = NET_REMOVE_IF);8989-</para>9090-</entry>9191- </row></tbody></tgroup></informaltable>9292-<para>PARAMETERS9393-</para>9494-<informaltable><tgroup cols="2"><tbody><row><entry9595- align="char">9696-<para>int fd</para>9797-</entry><entry9898- align="char">9999-<para>File descriptor returned by a previous call to open().</para>100100-</entry>101101- </row><row><entry102102- align="char">103103-<para>int request</para>104104-</entry><entry105105- align="char">106106-<para>Equals NET_REMOVE_IF for this command.</para>107107-</entry>108108- </row></tbody></tgroup></informaltable>109109-&return-value-dvb;110110-</section>2727+<refentry id="NET_ADD_IF">2828+ <refmeta>2929+ <refentrytitle>ioctl NET_ADD_IF</refentrytitle>3030+ &manvol;3131+ </refmeta>11132112112-<section id="NET_GET_IF"113113-role="subsection"><title>NET_GET_IF</title>114114-<para>DESCRIPTION115115-</para>116116-<informaltable><tgroup cols="1"><tbody><row><entry117117- align="char">118118-<para>This ioctl is undocumented. Documentation is welcome.</para>119119-</entry>120120- </row></tbody></tgroup></informaltable>121121-<para>SYNOPSIS122122-</para>123123-<informaltable><tgroup cols="1"><tbody><row><entry124124- align="char">125125-<para>int ioctl(fd, int request = NET_GET_IF,126126- struct dvb_net_if *if);</para>127127-</entry>128128- </row></tbody></tgroup></informaltable>129129-<para>PARAMETERS130130-</para>131131-<informaltable><tgroup cols="2"><tbody><row><entry132132- align="char">133133-<para>int fd</para>134134-</entry><entry135135- align="char">136136-<para>File descriptor returned by a previous call to open().</para>137137-</entry>138138- </row><row><entry139139- align="char">140140-<para>int request</para>141141-</entry><entry142142- align="char">143143-<para>Equals NET_GET_IF for this command.</para>144144-</entry>145145- </row><row><entry146146- align="char">147147-<para>struct dvb_net_if *if148148-</para>149149-</entry><entry150150- align="char">151151-<para>Undocumented.</para>152152-</entry>153153- </row></tbody></tgroup></informaltable>3333+ <refnamediv>3434+ <refname>NET_ADD_IF</refname>3535+ <refpurpose>Creates a new network interface for a given Packet ID.</refpurpose>3636+ </refnamediv>3737+3838+ <refsynopsisdiv>3939+ <funcsynopsis>4040+ <funcprototype>4141+ <funcdef>int <function>ioctl</function></funcdef>4242+ <paramdef>int <parameter>fd</parameter></paramdef>4343+ <paramdef>int <parameter>request</parameter></paramdef>4444+ <paramdef>struct dvb_net_if *<parameter>net_if</parameter></paramdef>4545+ </funcprototype>4646+ </funcsynopsis>4747+ </refsynopsisdiv>4848+4949+ <refsect1>5050+ <title>Arguments</title>5151+ <variablelist>5252+ <varlistentry>5353+ <term><parameter>fd</parameter></term>5454+ <listitem>5555+ <para>&fe_fd;</para>5656+ </listitem>5757+ </varlistentry>5858+ <varlistentry>5959+ <term><parameter>request</parameter></term>6060+ <listitem>6161+ <para>FE_SET_TONE</para>6262+ </listitem>6363+ </varlistentry>6464+ <varlistentry>6565+ <term><parameter>net_if</parameter></term>6666+ <listitem>6767+ <para>pointer to &dvb-net-if;</para>6868+ </listitem>6969+ </varlistentry>7070+ </variablelist>7171+ </refsect1>7272+7373+ <refsect1>7474+ <title>Description</title>7575+7676+<para>The NET_ADD_IF ioctl system call selects the Packet ID (PID) that7777+ contains a TCP/IP traffic, the type of encapsulation to be used (MPE or ULE)7878+ and the interface number for the new interface to be created. When the7979+ system call successfully returns, a new virtual network interface is created.</para>8080+<para>The &dvb-net-if;::ifnum field will be filled with the number of the8181+ created interface.</para>8282+15483&return-value-dvb;155155-</section>8484+</refsect1>8585+8686+<refsect1 id="dvb-net-if-t">8787+<title>struct <structname>dvb_net_if</structname> description</title>8888+8989+<table pgwide="1" frame="none" id="dvb-net-if">9090+ <title>struct <structname>dvb_net_if</structname></title>9191+ <tgroup cols="2">9292+ &cs-def;9393+ <thead>9494+ <row>9595+ <entry>ID</entry>9696+ <entry>Description</entry>9797+ </row>9898+ </thead>9999+ <tbody valign="top">100100+ <row>101101+ <entry align="char">pid</entry>102102+ <entry align="char">Packet ID (PID) of the MPEG-TS that contains103103+ data</entry>104104+ </row><row>105105+ <entry align="char">ifnum</entry>106106+ <entry align="char">number of the DVB interface.</entry>107107+ </row><row>108108+ <entry align="char">feedtype</entry>109109+ <entry align="char">Encapsulation type of the feed. It can be:110110+ <constant>DVB_NET_FEEDTYPE_MPE</constant> for MPE encoding111111+ or112112+ <constant>DVB_NET_FEEDTYPE_ULE</constant> for ULE encoding.113113+ </entry>114114+ </row>115115+ </tbody>116116+ </tgroup>117117+</table>118118+</refsect1>119119+</refentry>120120+121121+<refentry id="NET_REMOVE_IF">122122+ <refmeta>123123+ <refentrytitle>ioctl NET_REMOVE_IF</refentrytitle>124124+ &manvol;125125+ </refmeta>126126+127127+ <refnamediv>128128+ <refname>NET_REMOVE_IF</refname>129129+ <refpurpose>Removes a network interface.</refpurpose>130130+ </refnamediv>131131+132132+ <refsynopsisdiv>133133+ <funcsynopsis>134134+ <funcprototype>135135+ <funcdef>int <function>ioctl</function></funcdef>136136+ <paramdef>int <parameter>fd</parameter></paramdef>137137+ <paramdef>int <parameter>request</parameter></paramdef>138138+ <paramdef>int <parameter>ifnum</parameter></paramdef>139139+ </funcprototype>140140+ </funcsynopsis>141141+ </refsynopsisdiv>142142+143143+ <refsect1>144144+ <title>Arguments</title>145145+ <variablelist>146146+ <varlistentry>147147+ <term><parameter>fd</parameter></term>148148+ <listitem>149149+ <para>&fe_fd;</para>150150+ </listitem>151151+ </varlistentry>152152+ <varlistentry>153153+ <term><parameter>request</parameter></term>154154+ <listitem>155155+ <para>FE_SET_TONE</para>156156+ </listitem>157157+ </varlistentry>158158+ <varlistentry>159159+ <term><parameter>net_if</parameter></term>160160+ <listitem>161161+ <para>number of the interface to be removed</para>162162+ </listitem>163163+ </varlistentry>164164+ </variablelist>165165+ </refsect1>166166+167167+ <refsect1>168168+ <title>Description</title>169169+170170+<para>The NET_REMOVE_IF ioctl deletes an interface previously created171171+ via &NET-ADD-IF;.</para>172172+173173+&return-value-dvb;174174+</refsect1>175175+</refentry>176176+177177+178178+<refentry id="NET_GET_IF">179179+ <refmeta>180180+ <refentrytitle>ioctl NET_GET_IF</refentrytitle>181181+ &manvol;182182+ </refmeta>183183+184184+ <refnamediv>185185+ <refname>NET_GET_IF</refname>186186+ <refpurpose>Read the configuration data of an interface created via187187+ &NET-ADD-IF;.</refpurpose>188188+ </refnamediv>189189+190190+ <refsynopsisdiv>191191+ <funcsynopsis>192192+ <funcprototype>193193+ <funcdef>int <function>ioctl</function></funcdef>194194+ <paramdef>int <parameter>fd</parameter></paramdef>195195+ <paramdef>int <parameter>request</parameter></paramdef>196196+ <paramdef>struct dvb_net_if *<parameter>net_if</parameter></paramdef>197197+ </funcprototype>198198+ </funcsynopsis>199199+ </refsynopsisdiv>200200+201201+ <refsect1>202202+ <title>Arguments</title>203203+ <variablelist>204204+ <varlistentry>205205+ <term><parameter>fd</parameter></term>206206+ <listitem>207207+ <para>&fe_fd;</para>208208+ </listitem>209209+ </varlistentry>210210+ <varlistentry>211211+ <term><parameter>request</parameter></term>212212+ <listitem>213213+ <para>FE_SET_TONE</para>214214+ </listitem>215215+ </varlistentry>216216+ <varlistentry>217217+ <term><parameter>net_if</parameter></term>218218+ <listitem>219219+ <para>pointer to &dvb-net-if;</para>220220+ </listitem>221221+ </varlistentry>222222+ </variablelist>223223+ </refsect1>224224+225225+ <refsect1>226226+ <title>Description</title>227227+228228+<para>The NET_GET_IF ioctl uses the interface number given by the229229+ &dvb-net-if;::ifnum field and fills the content of &dvb-net-if; with230230+ the packet ID and encapsulation type used on such interface. If the231231+ interface was not created yet with &NET-ADD-IF;, it will return -1 and232232+ fill the <constant>errno</constant> with <constant>EINVAL</constant>233233+ error code.</para>234234+235235+&return-value-dvb;236236+</refsect1>237237+</refentry>156238</section>
+15-5
Documentation/DocBook/media_api.tmpl
···9595 <para>For discussing improvements, reporting troubles, sending new drivers, etc, please mail to: <ulink url="http://vger.kernel.org/vger-lists.html#linux-media">Linux Media Mailing List (LMML).</ulink>.</para>9696</preface>97979898-<part id="v4l2spec">&sub-v4l2;</part>9999-<part id="dvbapi">&sub-dvbapi;</part>100100-<part id="remotes">&sub-remote_controllers;</part>101101-<part id="media_common">&sub-media-controller;</part>9898+<part id="v4l2spec">9999+&sub-v4l2;100100+</part>101101+<part id="dvbapi">102102+&sub-dvbapi;103103+</part>104104+<part id="remotes">105105+&sub-remote_controllers;106106+</part>107107+<part id="media_common">108108+&sub-media-controller;109109+</part>102110103103-<chapter id="gen_errors">&sub-gen-errors;</chapter>111111+<chapter id="gen_errors">112112+&sub-gen-errors;113113+</chapter>104114105115&sub-fdl-appendix;106116