net-get-if.rst 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
  2. .. c:namespace:: DTV.net
  3. .. _NET_GET_IF:
  4. ****************
  5. ioctl NET_GET_IF
  6. ****************
  7. Name
  8. ====
  9. NET_GET_IF - Read the configuration data of an interface created via - :ref:`NET_ADD_IF <net>`.
  10. Synopsis
  11. ========
  12. .. c:macro:: NET_GET_IF
  13. ``int ioctl(int fd, NET_GET_IF, struct dvb_net_if *net_if)``
  14. Arguments
  15. =========
  16. ``fd``
  17. File descriptor returned by :c:func:`open()`.
  18. ``net_if``
  19. pointer to struct :c:type:`dvb_net_if`
  20. Description
  21. ===========
  22. The NET_GET_IF ioctl uses the interface number given by the struct
  23. :c:type:`dvb_net_if`::ifnum field and fills the content of
  24. struct :c:type:`dvb_net_if` with the packet ID and
  25. encapsulation type used on such interface. If the interface was not
  26. created yet with :ref:`NET_ADD_IF <net>`, it will return -1 and fill
  27. the ``errno`` with ``EINVAL`` error code.
  28. Return Value
  29. ============
  30. On success 0 is returned, and :c:type:`ca_slot_info` is filled.
  31. On error -1 is returned, and the ``errno`` variable is set
  32. appropriately.
  33. The generic error codes are described at the
  34. :ref:`Generic Error Codes <gen-errors>` chapter.