net-add-if.rst 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
  2. .. c:namespace:: DTV.net
  3. .. _NET_ADD_IF:
  4. ****************
  5. ioctl NET_ADD_IF
  6. ****************
  7. Name
  8. ====
  9. NET_ADD_IF - Creates a new network interface for a given Packet ID.
  10. Synopsis
  11. ========
  12. .. c:macro:: NET_ADD_IF
  13. ``int ioctl(int fd, NET_ADD_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_ADD_IF ioctl system call selects the Packet ID (PID) that
  23. contains a TCP/IP traffic, the type of encapsulation to be used (MPE or
  24. ULE) and the interface number for the new interface to be created. When
  25. the system call successfully returns, a new virtual network interface is
  26. created.
  27. The struct :c:type:`dvb_net_if`::ifnum field will be
  28. filled with the number of the created interface.
  29. Return Value
  30. ============
  31. On success 0 is returned, and :c:type:`ca_slot_info` is filled.
  32. On error -1 is returned, and the ``errno`` variable is set
  33. appropriately.
  34. The generic error codes are described at the
  35. :ref:`Generic Error Codes <gen-errors>` chapter.