0001 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
0002 .. c:namespace:: DTV.net
0003
0004 .. _NET_GET_IF:
0005
0006 ****************
0007 ioctl NET_GET_IF
0008 ****************
0009
0010 Name
0011 ====
0012
0013 NET_GET_IF - Read the configuration data of an interface created via - :ref:`NET_ADD_IF <net>`.
0014
0015 Synopsis
0016 ========
0017
0018 .. c:macro:: NET_GET_IF
0019
0020 ``int ioctl(int fd, NET_GET_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_GET_IF ioctl uses the interface number given by the struct
0035 :c:type:`dvb_net_if`::ifnum field and fills the content of
0036 struct :c:type:`dvb_net_if` with the packet ID and
0037 encapsulation type used on such interface. If the interface was not
0038 created yet with :ref:`NET_ADD_IF <net>`, it will return -1 and fill
0039 the ``errno`` with ``EINVAL`` error code.
0040
0041 Return Value
0042 ============
0043
0044 On success 0 is returned, and :c:type:`ca_slot_info` is filled.
0045
0046 On error -1 is returned, and the ``errno`` variable is set
0047 appropriately.
0048
0049 The generic error codes are described at the
0050 :ref:`Generic Error Codes <gen-errors>` chapter.