net-add-if.rst 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. .. -*- coding: utf-8; mode: rst -*-
  2. .. _NET_ADD_IF:
  3. ****************
  4. ioctl NET_ADD_IF
  5. ****************
  6. Name
  7. ====
  8. NET_ADD_IF - Creates a new network interface for a given Packet ID.
  9. Synopsis
  10. ========
  11. .. c:function:: int ioctl( int fd, NET_ADD_IF, struct dvb_net_if *net_if )
  12. :name: NET_ADD_IF
  13. Arguments
  14. =========
  15. ``fd``
  16. File descriptor returned by :ref:`open() <frontend_f_open>`.
  17. ``net_if``
  18. pointer to struct :c:type:`dvb_net_if`
  19. Description
  20. ===========
  21. The NET_ADD_IF ioctl system call selects the Packet ID (PID) that
  22. contains a TCP/IP traffic, the type of encapsulation to be used (MPE or
  23. ULE) and the interface number for the new interface to be created. When
  24. the system call successfully returns, a new virtual network interface is
  25. created.
  26. The struct :c:type:`dvb_net_if`::ifnum field will be
  27. filled with the number of the created interface.
  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.