点击界面不会出现 [英] tap interface not coming up

查看:136
本文介绍了点击界面不会出现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我决定添加一个点击界面并在我的代码中使用它,但我能够将其状态设置为UP。

I decided to add a tap interface and use it in my code , but I am able to get its state UP.

sudo ip -f link tuntap add tap10 mode tap
sudo ip link set tap10 up

在此之后我做ip link

After this when I do "ip link"

tap10: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN qlen 500
link/ether 26:cc:d2:b4:37:ea brd ff:ff:ff:ff:ff:ff

状态DOWN:如何将此状态设置为UP?我正在尝试向它发送数据包,但没有收到任何信息。

state DOWN: How to get this state UP ? I am trying to send packets to it and nothing is received .

推荐答案

事实证明,你需要有一个使用你的tap接口的进程才能使它处于活动状态。

It turns out that you need to have a proccess that uses your tap interface in order for it to be active.

这意味着您需要编写或使用连接到接口文件描述符的程序,然后将其状态更改为RUNNING。

This means that you need to write or use a program that connects to the interface file descriptor, then it will change its state to "RUNNING".

这篇关于点击界面不会出现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆