Home
last modified time | relevance | path

Searched refs:tunfd (Results 1 - 3 of 3) sorted by relevance

/foundation/communication/netmanager_base/services/netmanagernative/src/manager/
H A Ddistributed_manager.cpp63 int32_t tunfd = open(DISTRIBUTED_TUN_DEVICE_PATH, O_RDWR | O_NONBLOCK); in CreateDistributedInterface() local
64 if (tunfd <= 0) { in CreateDistributedInterface()
70 if (ioctl(tunfd, TUNSETIFF, &ifr) < 0) { in CreateDistributedInterface()
71 close(tunfd); in CreateDistributedInterface()
76 NETNATIVE_LOGI("create virtual device successfully, [%{public}d]", tunfd); in CreateDistributedInterface()
77 tunFd_ = tunfd; in CreateDistributedInterface()
H A Dvpn_manager.cpp59 int32_t tunfd = open(TUN_DEVICE_PATH, O_RDWR | O_NONBLOCK); in CreateVpnInterface() local
60 if (tunfd <= 0) { in CreateVpnInterface()
66 if (ioctl(tunfd, TUNSETIFF, &ifr) < 0) { in CreateVpnInterface()
67 close(tunfd); in CreateVpnInterface()
81 close(tunfd); in CreateVpnInterface()
86 NETNATIVE_LOGI("open virtual device successfully, [%{public}d]", tunfd); in CreateVpnInterface()
87 tunFd_ = tunfd; in CreateVpnInterface()
285 NETNATIVE_LOGE("sendmsg error: %{public}d, clientfd[%{public}d], tunfd[%{public}d]", errno, clientFd, tunFd); in SendVpnInterfaceFdToClient()
294 int32_t serverfd = GetControlSocket("tunfd"); in StartUnixSocketListen()
H A Dvnic_manager.cpp83 int32_t tunfd = open(VNIC_TUN_DEVICE_PATH, O_RDWR | O_NONBLOCK); in CreateVnicInterface() local
85 if (tunfd <= 0) { in CreateVnicInterface()
91 if (ioctl(tunfd, TUNSETIFF, &ifr) < 0) { in CreateVnicInterface()
92 close(tunfd); in CreateVnicInterface()
107 close(tunfd); in CreateVnicInterface()
113 NETNATIVE_LOGI("open virtual device successfully, [%{public}d]", tunfd); in CreateVnicInterface()
114 tunFd_ = tunfd; in CreateVnicInterface()

Completed in 2 milliseconds