rpmsgdev: add tun device ioctl support
In a multi-core heterogeneous architecture, tun device nodes of protocol stack core can be accessed by other cores through ioctl Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This commit is contained in:
parent
86ae87b1ec
commit
7b11162b24
@ -32,6 +32,7 @@
|
||||
#include <poll.h>
|
||||
#include <limits.h>
|
||||
#include <debug.h>
|
||||
#include <net/if.h>
|
||||
|
||||
#include <nuttx/kmalloc.h>
|
||||
#include <nuttx/fs/fs.h>
|
||||
@ -39,6 +40,7 @@
|
||||
#include <nuttx/video/fb.h>
|
||||
#include <nuttx/mutex.h>
|
||||
#include <nuttx/rptun/openamp.h>
|
||||
#include <nuttx/net/ioctl.h>
|
||||
#include <nuttx/drivers/rpmsgdev.h>
|
||||
|
||||
#include "rpmsgdev.h"
|
||||
@ -639,6 +641,9 @@ static ssize_t rpmsgdev_ioctl_arglen(int cmd)
|
||||
case FBIOSET_POWER:
|
||||
case FBIOGET_POWER:
|
||||
return sizeof(int);
|
||||
case TUNSETIFF:
|
||||
case TUNGETIFF:
|
||||
return sizeof(struct ifreq);
|
||||
default:
|
||||
return -ENOTTY;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user