手机移动端网卡信息获取原理分析

有些场景我们需要获取当前手机上的网卡信息(如双卡双待、Wifi等)。本文准备研究一下这块的原理,以便更好的掌握相关技术原理。

1、底层系统接口 getifaddrs

使用 getifaddrs 接口可以达到我们的目的,该接口会返回本地所有网卡的信息,结果保存在 ifaddrs 结构的链表中,但结果中可能存在不是蜂窝网络的结果,因此需要进一步做筛选过滤。详细介绍可以查阅官方文档:https://man7.org/linux/man-pages/man3/getifaddrs.3.html。

2、存在的问题-虚拟网卡

虚拟网卡是什么, 指名称(ifa_name)中包含 vmnet、vnic 的网卡;

3、关于网卡的常识

3.1 网卡名称,对应 ifaddrs 中的 ifa_name 成员,

ifa_name 用途
awdl0 在iOS中,ifa_name 值为 awdl0 的网络接口代表的是"Apple Wireless Direct Link"(AWDL)。AWDL是苹果开发的一种专用于设备间直接通信的网络协议,利用该协议,苹果设备能够进行点对点的连接,从而支持AirDrop、AirPlay、游戏连接和其他形式的设备间通信。
enX 在 iOS 中,ifa_name 为 en0、en1、en2 等表示的是 Ethernet 接口,通常用于连接到本地网络或者互联网。这些接口代表设备上的不同网络接口,例如 Wi-Fi、以太网(Ethernet)、蓝牙网络等。
pdp_ipX 在iOS设备中,ifa_name 值为 pdp_ip0, pdp_ip1, pdp_ip2, pdp_ip5 等都代表蜂窝数据网络接口。这些接口用于管理设备通过蜂窝网络(例如3G、4G LTE或5G)进行的数据通信。每个 pdp_ipX 接口代表一个蜂窝数据通道,这些通道可以用于不同的数据服务或应用。
utunX 在 iOS 中,ifa_name 为 utun0、utun1、utun2、utun3 等表示的是 UTUN 接口,是一种虚拟网络接口,通常用于建立 VPN(Virtual Private Network,虚拟专用网络)连接。每个 utunX 接口代表一个不同的 VPN 连接,其中 X 是一个数字标识符,用于区分不同的接口。这些接口可以用于实现安全的通信,例如连接到公司内部网络或者使用特定的安全服务。
ipsecX 在 iOS 中,ifa_name 为 ipsec0、ipsec1、ipsec2 等表示的是 IPsec(Internet Protocol Security,互联网协议安全)接口。IPsec 是一种用于保护 IP 数据包的协议,通常用于建立安全的通信连接,例如 VPN(Virtual Private Network,虚拟专用网络)连接。这些接口通常用于实现 IPsec VPN 连接,以提供加密和认证功能,确保通信的安全性和完整性。
anpi0 当ifa_name为anpi0时,代表使用了自定义的网络插件接口(Apple Network Plug-in Interface)。这种接口的应用场景可能是通过自定义的网络插件实现特定的网络功能或协议。例如,某些企业可能需要定制化的网络连接方式,以满足其特定的安全要求或者与特定的网络设备进行通信。
llw0 在 iOS 中,ifa_name 为 llw0 的接口通常与需要低延迟通信( Low Latency Wireless)的应用相关联。一个实际的应用例子是实时音频或视频通话应用,比如视频会议软件或者语音通话应用。这些应用需要保持低延迟的数据传输,以确保用户之间的通信流畅、自然,而不会出现明显的延迟或者延迟。

3.2 检测网卡是否运行

cpp 复制代码
怎样算是运行?域 IFF_UP 的区别是什么?
(IFF_RUNNING & interface->ifa_flags) // 这里 interface 是 ifaddrs 结构的变量

3.2 检测网卡是否是本地回环地址

怎样算是回环地址?

cpp 复制代码
(IFF_LOOPBACK & interface->ifa_flags)

3.2 检测网卡是否已被分配 ip 地址

cpp 复制代码
(nullptr == interface->ifa_addr)

3.3 返回的蜂窝网络

网卡名为 pdp_ip0 的一般有多个,第一个一般是 ipv4 地址,其他都是 ipv6 地址。

cpp 复制代码
struct ifaddrs {
	struct ifaddrs	*ifa_next;              /* Next item in list */
	char		*ifa_name;              /* Name of interface */
	unsigned int	ifa_flags;              /* Flags from SIOCGIFFLAGS */
	struct sockaddr *ifa_addr;              /* Address of interface */
	struct sockaddr *ifa_netmask;           /* Netmask of interface */
	union {
		struct sockaddr *ifu_broadaddr;
		/* Broadcast address of interface */
		struct sockaddr *ifu_dstaddr;
		/* Point-to-point destination address */
	} ifa_ifu;
#define              ifa_broadaddr	ifa_ifu.ifu_broadaddr
#define              ifa_dstaddr	ifa_ifu.ifu_dstaddr
	void *ifa_data;                      /* Address-specific data */
};

4、真机测试结果

分别有以下五种情况:1、wifi 功能关闭,移动未插卡且关闭

;2、wifi 功能开启但未连接任何网络,移动未插卡且关闭;3、wifi 功能开启且连接网络,移动未插卡且关闭;4、wifi 功能开启且连接网络,移动单槽插卡且关闭;5、wifi 功能开启且连接网络,移动单槽插卡且开启;6、wifi 功能开启且连接网络,移动双槽槽插卡且开启,不允许切换蜂窝数据;7、wifi 功能开启且连接网络,移动双槽插卡且开启,允许切换蜂窝数据;

cpp 复制代码
// 1. wifi 功能关闭,移动未插卡且关闭 
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: lo0, IFF_RUNNING: 1, IFF_LOOPBACK: 1, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: lo0, IFF_RUNNING: 1, IFF_LOOPBACK: 1, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: lo0, IFF_RUNNING: 1, IFF_LOOPBACK: 1, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: lo0, IFF_RUNNING: 1, IFF_LOOPBACK: 1, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: XHC0, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip0, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip1, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip3, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip2, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip4, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip6, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip5, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip7, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ap1, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun1, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun2, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun3, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun3, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun3, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: anpi0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: anpi0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: anpi0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en1, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: en2, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: en2, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: awdl0, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: awdl0, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: llw0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: llw0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: llw0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun5, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun5, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun5, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun6, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun6, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun6, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec3, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun7, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun7, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun7, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun8, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun8, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun8, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun4, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun4, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun4, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun4, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun4, connection_type: CONNECTION_UNKNOWN

// 2. wifi 功能开启但未连接任何网络,移动未插卡且关闭
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: lo0, IFF_RUNNING: 1, IFF_LOOPBACK: 1, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: lo0, IFF_RUNNING: 1, IFF_LOOPBACK: 1, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: lo0, IFF_RUNNING: 1, IFF_LOOPBACK: 1, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: lo0, IFF_RUNNING: 1, IFF_LOOPBACK: 1, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: XHC0, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip0, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip1, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip3, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip2, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip4, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip6, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip5, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip7, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ap1, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun1, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun2, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun3, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun3, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun3, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: anpi0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: anpi0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: anpi0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en1, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: en2, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: en2, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: awdl0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: awdl0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: awdl0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: llw0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: llw0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: llw0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun5, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun5, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun5, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun6, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun6, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun6, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec3, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun7, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun7, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun7, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun8, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun8, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun8, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun4, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun4, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun4, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun4, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun4, connection_type: CONNECTION_UNKNOWN

// 3. wifi 功能开启且连接网络,移动未插卡且关闭
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: lo0, IFF_RUNNING: 1, IFF_LOOPBACK: 1, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: lo0, IFF_RUNNING: 1, IFF_LOOPBACK: 1, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: lo0, IFF_RUNNING: 1, IFF_LOOPBACK: 1, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: lo0, IFF_RUNNING: 1, IFF_LOOPBACK: 1, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: XHC0, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip0, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip1, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip3, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip2, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip4, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip6, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip5, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip7, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ap1, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: en0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: en0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: en0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: en0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: en0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun1, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun2, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun3, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun3, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun3, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: anpi0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: anpi0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: anpi0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en1, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: en2, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: en2, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: awdl0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: awdl0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: awdl0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: llw0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: llw0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: llw0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun5, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun5, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun5, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun6, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun6, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun6, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec3, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun7, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun7, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun7, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun8, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun8, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun8, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun4, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun4, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun4, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun4, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun4, connection_type: CONNECTION_UNKNOWN

// 4. wifi 功能开启且连接网络,移动单槽插卡且关闭
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: lo0, IFF_RUNNING: 1, IFF_LOOPBACK: 1, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: lo0, IFF_RUNNING: 1, IFF_LOOPBACK: 1, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: lo0, IFF_RUNNING: 1, IFF_LOOPBACK: 1, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: lo0, IFF_RUNNING: 1, IFF_LOOPBACK: 1, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: XHC0, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip0, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip1, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip1, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip1, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip3, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip2, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip4, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip6, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip5, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip7, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ap1, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: en0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: en0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: en0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: en0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: en0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun1, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun2, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun3, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun3, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun3, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: anpi0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: anpi0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: anpi0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en1, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: en2, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: en2, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: awdl0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: awdl0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: awdl0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: llw0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: llw0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: llw0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun5, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun5, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun5, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun6, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun6, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun6, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec3, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun7, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun7, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun7, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun8, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun8, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun8, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun4, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun4, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun4, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun4, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun4, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec1, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec1, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec2, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec2, connection_type: CONNECTION_UNKNOWN

// 5. wifi 功能开启且连接网络,移动单槽插卡且开启
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: lo0, IFF_RUNNING: 1, IFF_LOOPBACK: 1, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: lo0, IFF_RUNNING: 1, IFF_LOOPBACK: 1, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: lo0, IFF_RUNNING: 1, IFF_LOOPBACK: 1, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: lo0, IFF_RUNNING: 1, IFF_LOOPBACK: 1, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: XHC0, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip1, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip1, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip1, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip3, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip2, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip4, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip6, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip5, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip7, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ap1, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: en0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: en0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: en0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: en0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: en0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun1, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun2, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun3, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun3, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun3, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: anpi0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: anpi0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: anpi0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en1, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: en2, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: en2, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: awdl0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: awdl0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: awdl0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: llw0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: llw0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: llw0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun5, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun5, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun5, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun6, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun6, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun6, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec3, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun7, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun7, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun7, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun8, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun8, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun8, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun4, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun4, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun4, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun4, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun4, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec1, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec1, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec2, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec2, connection_type: CONNECTION_UNKNOWN

// 6. wifi 功能开启且连接网络,移动双槽槽插卡且开启,不允许切换蜂窝数据
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: lo0, IFF_RUNNING: 1, IFF_LOOPBACK: 1, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: lo0, IFF_RUNNING: 1, IFF_LOOPBACK: 1, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: lo0, IFF_RUNNING: 1, IFF_LOOPBACK: 1, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: lo0, IFF_RUNNING: 1, IFF_LOOPBACK: 1, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: XHC0, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip1, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip1, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip1, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip3, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip3, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip3, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip3, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip3, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip3, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip3, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip3, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip3, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip2, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip2, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip2, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip4, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip6, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip5, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip7, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ap1, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: en0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: en0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: en0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: en0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: en0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun1, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun2, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun3, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun3, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun3, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: anpi0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: anpi0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: anpi0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en1, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: en2, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: en2, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: awdl0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: awdl0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: awdl0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: llw0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: llw0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: llw0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun5, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun5, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun5, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun6, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun6, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun6, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec3, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun7, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun7, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun7, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun8, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun8, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun8, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun4, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun4, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun4, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun4, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun4, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec1, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec1, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec2, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec2, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec4, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec4, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec4, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec4, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec4, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec5, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec5, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec5, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec5, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec5, connection_type: CONNECTION_UNKNOWN

// 7. wifi 功能开启且连接网络,移动双槽插卡且开启,允许切换蜂窝数据
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: lo0, IFF_RUNNING: 1, IFF_LOOPBACK: 1, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: lo0, IFF_RUNNING: 1, IFF_LOOPBACK: 1, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: lo0, IFF_RUNNING: 1, IFF_LOOPBACK: 1, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: lo0, IFF_RUNNING: 1, IFF_LOOPBACK: 1, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: XHC0, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip1, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip1, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip1, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip3, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip3, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip3, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip3, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip3, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip3, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip3, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip3, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip3, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip2, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip2, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip2, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip4, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip6, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip5, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip7, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ap1, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: en0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: en0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: en0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: en0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: en0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun1, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun2, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun3, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun3, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun3, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: anpi0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: anpi0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: anpi0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en1, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: en2, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: en2, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: awdl0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: awdl0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: awdl0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: llw0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: llw0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: llw0, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun5, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun5, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun5, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun6, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun6, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun6, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec3, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun7, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun7, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun7, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun8, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun8, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun8, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun4, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun4, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun4, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: utun4, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: utun4, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec1, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec1, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec2, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec2, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec4, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec4, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec4, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec4, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec4, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec5, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec5, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec5, connection_type: CONNECTION_UNKNOWN
INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec5, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec5, connection_type: CONNECTION_UNKNOWN

日志diff 点:

bash 复制代码
// diff 1 2
37,38c37,39
< INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: awdl0, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
< INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: awdl0, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
---
> INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: awdl0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
> INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: awdl0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
> INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: awdl0, connection_type: CONNECTION_UNKNOWN

// diff 2 3
15a16,25
> INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
> INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: en0, connection_type: CONNECTION_UNKNOWN
> INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
> INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: en0, connection_type: CONNECTION_UNKNOWN
> INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
> INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: en0, connection_type: CONNECTION_UNKNOWN
> INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
> INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: en0, connection_type: CONNECTION_UNKNOWN
> INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: en0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
> INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: en0, connection_type: CONNECTION_UNKNOWN
> 
// diff 3 4
7c7,13
< INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip1, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
---
> INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
> INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
> INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip1, connection_type: CONNECTION_UNKNOWN
> INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
> INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip1, connection_type: CONNECTION_UNKNOWN
> INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
> INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip1, connection_type: CONNECTION_UNKNOWN
71a78,87
> INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
> INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
> INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec1, connection_type: CONNECTION_UNKNOWN
> INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec1, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
> INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec1, connection_type: CONNECTION_UNKNOWN
> INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
> INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
> INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec2, connection_type: CONNECTION_UNKNOWN
> INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
> INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec2, connection_type: CONNECTION_UNKNOWN

// diff 4 5
6c6,14
< INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip0, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
---
> INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
> INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
> INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip0, connection_type: CONNECTION_UNKNOWN
> INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
> INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip0, connection_type: CONNECTION_UNKNOWN
> INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
> INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip0, connection_type: CONNECTION_UNKNOWN
> INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip0, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
> INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip0, connection_type: CONNECTION_UNKNOWN

// diff 5 6
22,23c22,37
< INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip3, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
< INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip2, IFF_RUNNING: 0, IFF_LOOPBACK: 0, IFF_UP: 0
---
> INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip3, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
> INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip3, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
> INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip3, connection_type: CONNECTION_UNKNOWN
> INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip3, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
> INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip3, connection_type: CONNECTION_UNKNOWN
> INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip3, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
> INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip3, connection_type: CONNECTION_UNKNOWN
> INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip3, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
> INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip3, connection_type: CONNECTION_UNKNOWN
> INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
> INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
> INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip2, connection_type: CONNECTION_UNKNOWN
> INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
> INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip2, connection_type: CONNECTION_UNKNOWN
> INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip2, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
> INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: pdp_ip2, connection_type: CONNECTION_UNKNOWN
95a110,119
> INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec4, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
> INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec4, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
> INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec4, connection_type: CONNECTION_UNKNOWN
> INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec4, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
> INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec4, connection_type: CONNECTION_UNKNOWN
> INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec5, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
> INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec5, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
> INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec5, connection_type: CONNECTION_UNKNOWN
> INFO:network_interfaces_getifaddrs.cc(144)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec5, IFF_RUNNING: 1, IFF_LOOPBACK: 0, IFF_UP: 1
> INFO:network_interfaces_getifaddrs.cc(218)] IfaddrsToNetworkInterfaceList, ifa_name: ipsec5, connection_type: CONNECTION_UNKNOWN

// diff 6 7
无

6、在哪里新增双链路代码,为什么在该处

在连接建立阶段(创建 socket 时,调用 connect 前),因为 Wifi或者蜂窝必须是二选一,Wifi 弱时不要再做无谓建连尝试了,避免增加网络成本,而是直接使用蜂窝网络即可。

iOS:

interface_index 为蜂窝网络的索引值,socket_fd_ 则为新建的 socket。

cpp 复制代码
setsockopt(socket_fd_, IPPROTO_IP /* IPPROTO_IPV6 */, IP_BOUND_IF,
           &interface_index, sizeof(interface_index));

安卓端:

需要区分 M 还是 L,前者需要用 android_setsocknetwork,后者则使用 setNetworkForSocket。

cpp 复制代码
using LollipopSetNetworkForSocket = int (*)(unsigned net_id, int socket_fd);
using MarshmallowSetNetworkForSocket = int (*)(int64_t net_id, int socket_fd);

MarshmallowSetNetworkForSocket GetMarshmallowSetNetworkForSocket() {
  // On Android M and newer releases use supported NDK API.
  base::FilePath file(base::GetNativeLibraryName("android"));
  // See declaration of android_setsocknetwork() here:
  // http://androidxref.com/6.0.0_r1/xref/development/ndk/platforms/android-M/include/android/multinetwork.h#65
  // Function cannot be called directly as it will cause app to fail to load on
  // pre-marshmallow devices.
  void* dl = dlopen(file.value().c_str(), RTLD_NOW);
  return reinterpret_cast<MarshmallowSetNetworkForSocket>(
      dlsym(dl, "android_setsocknetwork"));
}

LollipopSetNetworkForSocket GetLollipopSetNetworkForSocket() {
  // On Android L use setNetworkForSocket from libnetd_client.so. Android's netd
  // client library should always be loaded in our address space as it shims
  // socket().
  base::FilePath file(base::GetNativeLibraryName("netd_client"));
  // Use RTLD_NOW to match Android's prior loading of the library:
  // http://androidxref.com/6.0.0_r5/xref/bionic/libc/bionic/NetdClient.cpp#37
  // Use RTLD_NOLOAD to assert that the library is already loaded and avoid
  // doing any disk IO.
  void* dl = dlopen(file.value().c_str(), RTLD_NOW | RTLD_NOLOAD);
  return reinterpret_cast<LollipopSetNetworkForSocket>(
      dlsym(dl, "setNetworkForSocket"));
}
相关推荐
ggs_and_ddu1 分钟前
Android--java实现手机亮度控制
android·java·智能手机
livefan2 分钟前
医疗平板与普通平板对比:优势尽显
智能手机·电脑
网络安全Jack1 小时前
什么是网络安全等级保护?
网络·安全·web安全
Dovir多多2 小时前
Python数据处理——re库与pydantic的使用总结与实战,处理采集到的思科ASA防火墙设备信息
网络·python·计算机网络·安全·网络安全·数据分析
VVVVWeiYee3 小时前
项目2路由交换
运维·服务器·网络·网络协议·信息与通信
ii_best5 小时前
ios按键精灵自动化的脚本教程:自动点赞功能的实现
运维·ios·自动化
小伍_Five5 小时前
透视网络世界:计算机网络习题的深度解析与总结【前3章】
服务器·网络·计算机网络
网络安全(king)7 小时前
网络安全攻防学习平台 - 基础关
网络·学习·web安全
李白你好7 小时前
家用无线路由器的 2.4GHz 和 5GHz
运维·网络
嵌入(师)7 小时前
嵌入式驱动开发详解21(网络驱动开发)
网络·驱动开发