1*4882a593Smuzhiyun.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2*4882a593Smuzhiyun.. c:namespace:: DTV.net 3*4882a593Smuzhiyun 4*4882a593Smuzhiyun.. _NET_GET_IF: 5*4882a593Smuzhiyun 6*4882a593Smuzhiyun**************** 7*4882a593Smuzhiyunioctl NET_GET_IF 8*4882a593Smuzhiyun**************** 9*4882a593Smuzhiyun 10*4882a593SmuzhiyunName 11*4882a593Smuzhiyun==== 12*4882a593Smuzhiyun 13*4882a593SmuzhiyunNET_GET_IF - Read the configuration data of an interface created via - :ref:`NET_ADD_IF <net>`. 14*4882a593Smuzhiyun 15*4882a593SmuzhiyunSynopsis 16*4882a593Smuzhiyun======== 17*4882a593Smuzhiyun 18*4882a593Smuzhiyun.. c:macro:: NET_GET_IF 19*4882a593Smuzhiyun 20*4882a593Smuzhiyun``int ioctl(int fd, NET_GET_IF, struct dvb_net_if *net_if)`` 21*4882a593Smuzhiyun 22*4882a593SmuzhiyunArguments 23*4882a593Smuzhiyun========= 24*4882a593Smuzhiyun 25*4882a593Smuzhiyun``fd`` 26*4882a593Smuzhiyun File descriptor returned by :c:func:`open()`. 27*4882a593Smuzhiyun 28*4882a593Smuzhiyun``net_if`` 29*4882a593Smuzhiyun pointer to struct :c:type:`dvb_net_if` 30*4882a593Smuzhiyun 31*4882a593SmuzhiyunDescription 32*4882a593Smuzhiyun=========== 33*4882a593Smuzhiyun 34*4882a593SmuzhiyunThe NET_GET_IF ioctl uses the interface number given by the struct 35*4882a593Smuzhiyun:c:type:`dvb_net_if`::ifnum field and fills the content of 36*4882a593Smuzhiyunstruct :c:type:`dvb_net_if` with the packet ID and 37*4882a593Smuzhiyunencapsulation type used on such interface. If the interface was not 38*4882a593Smuzhiyuncreated yet with :ref:`NET_ADD_IF <net>`, it will return -1 and fill 39*4882a593Smuzhiyunthe ``errno`` with ``EINVAL`` error code. 40*4882a593Smuzhiyun 41*4882a593SmuzhiyunReturn Value 42*4882a593Smuzhiyun============ 43*4882a593Smuzhiyun 44*4882a593SmuzhiyunOn success 0 is returned, and :c:type:`ca_slot_info` is filled. 45*4882a593Smuzhiyun 46*4882a593SmuzhiyunOn error -1 is returned, and the ``errno`` variable is set 47*4882a593Smuzhiyunappropriately. 48*4882a593Smuzhiyun 49*4882a593SmuzhiyunThe generic error codes are described at the 50*4882a593Smuzhiyun:ref:`Generic Error Codes <gen-errors>` chapter. 51