Back to home page

OSCL-LXR

 
 

    


0001 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
0002 .. c:namespace:: DTV.net
0003 
0004 .. _NET_ADD_IF:
0005 
0006 ****************
0007 ioctl NET_ADD_IF
0008 ****************
0009 
0010 Name
0011 ====
0012 
0013 NET_ADD_IF - Creates a new network interface for a given Packet ID.
0014 
0015 Synopsis
0016 ========
0017 
0018 .. c:macro:: NET_ADD_IF
0019 
0020 ``int ioctl(int fd, NET_ADD_IF, struct dvb_net_if *net_if)``
0021 
0022 Arguments
0023 =========
0024 
0025 ``fd``
0026     File descriptor returned by :c:func:`open()`.
0027 
0028 ``net_if``
0029     pointer to struct :c:type:`dvb_net_if`
0030 
0031 Description
0032 ===========
0033 
0034 The NET_ADD_IF ioctl system call selects the Packet ID (PID) that
0035 contains a TCP/IP traffic, the type of encapsulation to be used (MPE or
0036 ULE) and the interface number for the new interface to be created. When
0037 the system call successfully returns, a new virtual network interface is
0038 created.
0039 
0040 The struct :c:type:`dvb_net_if`::ifnum field will be
0041 filled with the number of the created interface.
0042 
0043 Return Value
0044 ============
0045 
0046 On success 0 is returned, and :c:type:`ca_slot_info` is filled.
0047 
0048 On error -1 is returned, and the ``errno`` variable is set
0049 appropriately.
0050 
0051 The generic error codes are described at the
0052 :ref:`Generic Error Codes <gen-errors>` chapter.