Move TUN ioctl commnd to include/nuttx/net/ioctl.h so that it will always be unique. It a error in netdev_register: it was not handling device names properly when TUN is the only network device.

This commit is contained in:
Gregory Nutt
2017-07-07 13:03:04 -06:00
parent fcb91c84f0
commit b29c99fa6f
4 changed files with 13 additions and 9 deletions
+5 -1
View File
@@ -119,9 +119,13 @@
#define SIOCINQ _SIOC(0x0025) /* Returns the amount of queued unread
* data in the receive */
/* TUN/TAP driver ***********************************************************/
#define TUNSETIFF _SIOC(0x0026) /* Set TUN/TAP interface */
/* Telnet driver ************************************************************/
#define SIOCTELNET _SIOC(0x0026) /* Create a Telnet sessions.
#define SIOCTELNET _SIOC(0x0027) /* Create a Telnet sessions.
* See include/nuttx/net/telnet.h */
/****************************************************************************
+2 -4
View File
@@ -52,8 +52,6 @@
* Pre-processor Definitions
****************************************************************************/
#define TUNSETIFF _SIOC(0x1001)
/* TUNSETIFF ifr flags */
#define IFF_TUN 0x01
@@ -85,12 +83,12 @@ extern "C"
* Name: tun_initialize
*
* Description:
* Instantiate a SLIP network interface.
* Instantiate a TUN network interface.
*
* Parameters:
*
* Returned Value:
* OK on success; Negated errno on failure.
* OK on success; Negated errno value on failure.
*
* Assumptions:
*