java p2p0 是 android 中 WIFI DIRECT 的无线接口吗?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/15324889/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-31 19:14:44  来源:igfitidea点击:

is p2p0 a wireless interface for WIFI DIRECT in android?

javaandroidnetworkingnetwork-programmingwifi

提问by Hana90

when i print all interfaces in my android device:

当我打印我的 android 设备中的所有接口时:

03-10 19:50:15.484: I/System.out(22415): lo
03-10 19:50:15.494: I/System.out(22415): upnlink0
03-10 19:50:15.504: I/System.out(22415): svnet0
03-10 19:50:15.504: I/System.out(22415): rmnet0
03-10 19:50:15.514: I/System.out(22415): rmnet1
03-10 19:50:15.524: I/System.out(22415): rmnet2
03-10 19:50:15.534: I/System.out(22415): sit0
03-10 19:50:15.544: I/System.out(22415): ip6tnl0
03-10 19:50:15.554: I/System.out(22415): p2p0
03-10 19:50:15.564: I/System.out(22415): wlan0

i wounder if p2p0 is the actual interface for WIFI DIRECT? also how to print just the currently used INTERFACES ??

我更担心 p2p0 是 WIFI DIRECT 的实际接口吗?还有如何只打印当前使用的 INTERFACES ??

回答by Biswajit Karmakar

p2p0 is the interface for WIFI DIRECT.

p2p0 是 WIFI DIRECT 的接口。

Send 'ifconfig' command in android studio console to see currently used INTERFACES. If any interface is used currently then the status shows active otherwise it shows inactive.

在 android studio 控制台中发送“ifconfig”命令以查看当前使用的接口。如果当前使用任何接口,则状态显示为活动状态,否则显示为非活动状态。