Lines Matching refs:iface
60 int32_t EthernetManagement::DevInterfaceStateCallback::OnInterfaceAdded(const std::string &iface) in OnInterfaceAdded() argument
63 if (std::regex_search(iface, re)) { in OnInterfaceAdded()
64 ethernetManagement_.DevInterfaceAdd(iface); in OnInterfaceAdded()
65 if (NetsysController::GetInstance().SetInterfaceUp(iface) != ERR_NONE) { in OnInterfaceAdded()
66 NETMGR_EXT_LOG_E("Iface[%{public}s] added set up fail!", iface.c_str()); in OnInterfaceAdded()
72 int32_t EthernetManagement::DevInterfaceStateCallback::OnInterfaceRemoved(const std::string &iface) in OnInterfaceRemoved() argument
75 if (std::regex_search(iface, re)) { in OnInterfaceRemoved()
76 ethernetManagement_.DevInterfaceRemove(iface); in OnInterfaceRemoved()
77 if (NetsysController::GetInstance().SetInterfaceDown(iface) != ERR_NONE) { in OnInterfaceRemoved()
78 NETMGR_EXT_LOG_E("Iface[%{public}s] added set down fail!", iface.c_str()); in OnInterfaceRemoved()
115 … const std::string &iface) in OnBandwidthReachedLimit() argument
194 for (const auto &iface : ifaceLists) { in GetMacAddress() local
195 if (std::regex_search(iface, re)) { in GetMacAddress()
197 auto spMacAddr = GetMacAddr(iface); in GetMacAddress()
199 … NETMGR_EXT_LOG_E("The iface[%{public}s] device does not find MAC address", iface.c_str()); in GetMacAddress()
202 macAddressInfo.iface_ = iface; in GetMacAddress()
214 std::string EthernetManagement::GetMacAddr(const std::string &iface) in GetMacAddr() argument
220 strncpy_s(ifr.ifr_name, IFNAMSIZ, iface.c_str(), iface.length()); in GetMacAddr()
247 int32_t EthernetManagement::UpdateDevInterfaceCfg(const std::string &iface, sptr<InterfaceConfigura… in UpdateDevInterfaceCfg() argument
254 auto fit = devs_.find(iface); in UpdateDevInterfaceCfg()
256 …NETMGR_EXT_LOG_E("The iface[%{public}s] device or device information does not exist", iface.c_str(… in UpdateDevInterfaceCfg()
260 NETMGR_EXT_LOG_E("The iface[%{public}s] device is unlink", iface.c_str()); in UpdateDevInterfaceCfg()
264 …NETMGR_EXT_LOG_E("The iface[%{public}s] device can not exchange between WAN and LAN", iface.c_str(… in UpdateDevInterfaceCfg()
267 if (!ethConfiguration_->WriteUserConfiguration(iface, cfg)) { in UpdateDevInterfaceCfg()
273 StartDhcpClient(iface, fit->second); in UpdateDevInterfaceCfg()
275 StopDhcpClient(iface, fit->second); in UpdateDevInterfaceCfg()
276 netLinkConfigs_[iface] = nullptr; in UpdateDevInterfaceCfg()
288 devCfgs_[iface] = cfg; in UpdateDevInterfaceCfg()
296 auto fit = devs_.find(dhcpResult.iface); in UpdateDevInterfaceLinkInfo()
298 …G_E("The iface[%{public}s] device or device information does not exist", dhcpResult.iface.c_str()); in UpdateDevInterfaceLinkInfo()
302 … NETMGR_EXT_LOG_E("The iface[%{public}s] The device is not turned on", dhcpResult.iface.c_str()); in UpdateDevInterfaceLinkInfo()
308 NETMGR_EXT_LOG_E("The iface[%{public}s] set mode is STATIC now", dhcpResult.iface.c_str()); in UpdateDevInterfaceLinkInfo()
312 auto &config = netLinkConfigs_[dhcpResult.iface]; in UpdateDevInterfaceLinkInfo()
316 … NETMGR_EXT_LOG_E("Iface:%{public}s's link info config is nullptr", dhcpResult.iface.c_str()); in UpdateDevInterfaceLinkInfo()
335 int32_t EthernetManagement::GetDevInterfaceCfg(const std::string &iface, sptr<InterfaceConfiguratio… in GetDevInterfaceCfg() argument
338 auto fit = devs_.find(iface); in GetDevInterfaceCfg()
340 NETMGR_EXT_LOG_E("The iface[%{public}s] device does not exist", iface.c_str()); in GetDevInterfaceCfg()
355 int32_t EthernetManagement::IsIfaceActive(const std::string &iface, int32_t &activeStatus) in IsIfaceActive() argument
358 auto fit = devs_.find(iface); in IsIfaceActive()
360 NETMGR_EXT_LOG_E("The iface[%{public}s] device does not exist", iface.c_str()); in IsIfaceActive()
444 bool EthernetManagement::IsIfaceLinkUp(const std::string &iface) in IsIfaceLinkUp() argument
447 config.ifName = iface; in IsIfaceLinkUp()
455 UpdateInterfaceState(iface, true); in IsIfaceLinkUp()