/foundation/communication/netmanager_ext/services/ethernetmanager/src/ |
H A D | ethernet_dhcp_controller.cpp | 87 EthernetDhcpCallback::DhcpResult dhcpResult; in OnDhcpSuccess() local 88 dhcpResult.iface = iface; in OnDhcpSuccess() 89 dhcpResult.ipAddr = result->strOptClientId; in OnDhcpSuccess() 90 dhcpResult.gateWay = result->strOptRouter1; in OnDhcpSuccess() 91 dhcpResult.subNet = result->strOptSubnet; in OnDhcpSuccess() 92 dhcpResult.route1 = result->strOptRouter1; in OnDhcpSuccess() 93 dhcpResult.route2 = result->strOptRouter2; in OnDhcpSuccess() 94 dhcpResult.dns1 = result->strOptDns1; in OnDhcpSuccess() 95 dhcpResult.dns2 = result->strOptDns2; in OnDhcpSuccess() 96 cbObject_->OnDhcpSuccess(dhcpResult); in OnDhcpSuccess() [all...] |
H A D | ethernet_configuration.cpp | 250 bool EthernetConfiguration::ConvertToConfiguration(const EthernetDhcpCallback::DhcpResult &dhcpResult, in ConvertToConfiguration() argument 257 if (!IsValidDhcpResult(dhcpResult, config)) { in ConvertToConfiguration() 262 ipAddr.address_ = dhcpResult.ipAddr; in ConvertToConfiguration() 263 ipAddr.family_ = static_cast<uint8_t>(CommonUtils::GetAddrFamily(dhcpResult.ipAddr)); in ConvertToConfiguration() 265 ? static_cast<uint8_t>(CommonUtils::Ipv6PrefixLen(dhcpResult.subNet)) in ConvertToConfiguration() 266 : static_cast<uint8_t>(CommonUtils::Ipv4PrefixLen(dhcpResult.subNet)); in ConvertToConfiguration() 270 netMask.address_ = dhcpResult.subNet; in ConvertToConfiguration() 274 gateway.address_ = dhcpResult.gateWay; in ConvertToConfiguration() 275 gateway.family_ = static_cast<uint8_t>(CommonUtils::GetAddrFamily(dhcpResult.gateWay)); in ConvertToConfiguration() 279 if (dhcpResult in ConvertToConfiguration() 694 IsValidDhcpResult(const EthernetDhcpCallback::DhcpResult &dhcpResult, sptr<StaticConfiguration> &config) IsValidDhcpResult() argument [all...] |
H A D | ethernet_management.cpp | 42 int32_t EthernetManagement::EhternetDhcpNotifyCallback::OnDhcpSuccess(EthernetDhcpCallback::DhcpResult &dhcpResult) in OnDhcpSuccess() argument 44 ethernetManagement_.UpdateDevInterfaceLinkInfo(dhcpResult); in OnDhcpSuccess() 109 int32_t EthernetManagement::DevInterfaceStateCallback::OnDhcpSuccess(NetsysControllerCallback::DhcpResult &dhcpResult) in OnDhcpSuccess() argument 293 int32_t EthernetManagement::UpdateDevInterfaceLinkInfo(EthernetDhcpCallback::DhcpResult &dhcpResult) in UpdateDevInterfaceLinkInfo() argument 297 auto fit = devs_.find(dhcpResult.iface); in UpdateDevInterfaceLinkInfo() 299 NETMGR_EXT_LOG_E("The iface[%{public}s] device or device information does not exist", dhcpResult.iface.c_str()); in UpdateDevInterfaceLinkInfo() 303 NETMGR_EXT_LOG_E("The iface[%{public}s] The device is not turned on", dhcpResult.iface.c_str()); in UpdateDevInterfaceLinkInfo() 309 NETMGR_EXT_LOG_E("The iface[%{public}s] set mode is STATIC now", dhcpResult.iface.c_str()); in UpdateDevInterfaceLinkInfo() 313 auto &config = netLinkConfigs_[dhcpResult.iface]; in UpdateDevInterfaceLinkInfo() 317 NETMGR_EXT_LOG_E("Iface:%{public}s's link info config is nullptr", dhcpResult in UpdateDevInterfaceLinkInfo() [all...] |
/foundation/communication/dhcp/frameworks/native/src/ |
H A D | dhcp_event.cpp | 30 void DhcpClientCallBack::ResultInfoCopy(DhcpResult &dhcpResult, OHOS::DHCP::DhcpResult& result) in ResultInfoCopy() argument 32 if (strcpy_s(dhcpResult.strOptClientId, DHCP_MAX_FILE_BYTES, result.strYourCli.c_str()) != EOK) { in ResultInfoCopy() 35 if (strcpy_s(dhcpResult.strOptServerId, DHCP_MAX_FILE_BYTES, result.strServer.c_str()) != EOK) { in ResultInfoCopy() 38 if (strcpy_s(dhcpResult.strOptSubnet, DHCP_MAX_FILE_BYTES, result.strSubnet.c_str()) != EOK) { in ResultInfoCopy() 41 if (strcpy_s(dhcpResult.strOptDns1, DHCP_MAX_FILE_BYTES, result.strDns1.c_str()) != EOK) { in ResultInfoCopy() 44 if (strcpy_s(dhcpResult.strOptDns2, DHCP_MAX_FILE_BYTES, result.strDns2.c_str()) != EOK) { in ResultInfoCopy() 47 if (strcpy_s(dhcpResult.strOptRouter1, DHCP_MAX_FILE_BYTES, result.strRouter1.c_str()) != EOK) { in ResultInfoCopy() 50 if (strcpy_s(dhcpResult.strOptRouter2, DHCP_MAX_FILE_BYTES, result.strRouter2.c_str()) != EOK) { in ResultInfoCopy() 53 if (strcpy_s(dhcpResult.strOptVendor, DHCP_MAX_FILE_BYTES, result.strVendor.c_str()) != EOK) { in ResultInfoCopy() 56 if (strcpy_s(dhcpResult in ResultInfoCopy() 86 DhcpResult dhcpResult; OnIpSuccessChanged() local 125 DhcpResult dhcpResult; OnDhcpOfferReport() local [all...] |
/foundation/communication/netmanager_base/test/netconnmanager/unittest/net_conn_add_test/ |
H A D | ethernet_configuration_test.cpp | 73 EthernetDhcpCallback::DhcpResult dhcpResult; in HWTEST_F() local 75 ret = ethernetConfiguration.ConvertToConfiguration(dhcpResult, config); in HWTEST_F() 97 EthernetDhcpCallback::DhcpResult dhcpResult; in HWTEST_F() local 99 bool ret = ethernetConfiguration.ConvertToConfiguration(dhcpResult, config); in HWTEST_F() 125 ret = ethernetConfiguration.IsValidDhcpResult(dhcpResult, config); in HWTEST_F() 132 EthernetDhcpCallback::DhcpResult dhcpResult; in HWTEST_F() local 133 dhcpResult.ipAddr = "test"; in HWTEST_F() 135 ethernetConfiguration.IsValidDhcpResult(dhcpResult, config); in HWTEST_F() 232 EthernetDhcpCallback::DhcpResult dhcpResult; in HWTEST_F() local 233 dhcpResult in HWTEST_F() 251 EthernetDhcpCallback::DhcpResult dhcpResult; HWTEST_F() local 264 EthernetDhcpCallback::DhcpResult dhcpResult; HWTEST_F() local 277 EthernetDhcpCallback::DhcpResult dhcpResult; HWTEST_F() local [all...] |
/foundation/communication/netmanager_ext/test/ethernetmanager/unittest/ethernet_manager_test/ |
H A D | ethernet_configuration_test.cpp | 73 EthernetDhcpCallback::DhcpResult dhcpResult; in HWTEST_F() local 75 ret = ethernetConfiguration.ConvertToConfiguration(dhcpResult, config); in HWTEST_F() 97 EthernetDhcpCallback::DhcpResult dhcpResult; in HWTEST_F() local 99 bool ret = ethernetConfiguration.ConvertToConfiguration(dhcpResult, config); in HWTEST_F() 125 ret = ethernetConfiguration.IsValidDhcpResult(dhcpResult, config); in HWTEST_F() 132 EthernetDhcpCallback::DhcpResult dhcpResult; in HWTEST_F() local 133 dhcpResult.ipAddr = "test"; in HWTEST_F() 135 ethernetConfiguration.IsValidDhcpResult(dhcpResult, config); in HWTEST_F() 232 EthernetDhcpCallback::DhcpResult dhcpResult; in HWTEST_F() local 233 dhcpResult in HWTEST_F() 251 EthernetDhcpCallback::DhcpResult dhcpResult; HWTEST_F() local 264 EthernetDhcpCallback::DhcpResult dhcpResult; HWTEST_F() local 277 EthernetDhcpCallback::DhcpResult dhcpResult; HWTEST_F() local [all...] |
H A D | ethernet_manager_test.cpp | 538 DhcpResult dhcpResult; in HWTEST_F() local 539 ethernetDhcpController.OnDhcpSuccess(IFACE, &dhcpResult); in HWTEST_F() 541 ethernetDhcpController.OnDhcpSuccess(IFACE, &dhcpResult); in HWTEST_F() 585 EthernetDhcpCallback::DhcpResult dhcpResult; in HWTEST_F() local 586 int32_t ret = ethernetManagement.UpdateDevInterfaceLinkInfo(dhcpResult); in HWTEST_F() 693 EthernetDhcpCallback::DhcpResult dhcpResult; in HWTEST_F() local 694 int32_t ret = ethernetManagement.UpdateDevInterfaceLinkInfo(dhcpResult); in HWTEST_F() 765 EthernetDhcpCallback::DhcpResult dhcpResult; in HWTEST_F() local 766 dhcpResult.iface = "eth0"; in HWTEST_F() 767 int32_t result = ethernetManagement.UpdateDevInterfaceLinkInfo(dhcpResult); in HWTEST_F() 779 EthernetDhcpCallback::DhcpResult dhcpResult; HWTEST_F() local 935 NetsysControllerCallback::DhcpResult dhcpResult; HWTEST_F() local 962 EthernetDhcpCallback::DhcpResult dhcpResult; HWTEST_F() local [all...] |
/foundation/communication/netmanager_base/test/netmanagernative/unittest/netsys_manager_test/ |
H A D | notify_callback_proxy_test.cpp | 113 sptr<DhcpResultParcel> dhcpResult = new (std::nothrow) DhcpResultParcel; in HWTEST_F() local 114 dhcpResult->iface_ = "test0"; in HWTEST_F() 115 dhcpResult->ipAddr_ = "192.168.11.55"; in HWTEST_F() 116 dhcpResult->gateWay_ = "192.168.10.1"; in HWTEST_F() 117 dhcpResult->subNet_ = "255.255.255.0"; in HWTEST_F() 118 int32_t ret = notifyProxy->OnDhcpSuccess(dhcpResult); in HWTEST_F()
|
H A D | notify_callback_stub_test.cpp | 240 sptr<DhcpResultParcel> dhcpResult = new (std::nothrow) DhcpResultParcel; in HWTEST_F() local 241 dhcpResult->iface_ = "test0"; in HWTEST_F() 242 dhcpResult->ipAddr_ = "192.168.11.55"; in HWTEST_F() 243 dhcpResult->gateWay_ = "192.168.10.1"; in HWTEST_F() 244 dhcpResult->subNet_ = "255.255.255.0"; in HWTEST_F() 245 dhcpResult->Marshalling(data); in HWTEST_F()
|
/foundation/communication/wifi/wifi/services/wifi_standard/wifi_framework/wifi_toolkit/net_helper/ |
H A D | if_config.cpp | 305 int IfConfig::SetIfDnsAndRoute(const DhcpResult *dhcpResult, int ipType, int instId) in SetIfDnsAndRoute() argument 308 dhcpResult->iptype, in SetIfDnsAndRoute() 309 dhcpResult->strOptClientId, in SetIfDnsAndRoute() 310 dhcpResult->strOptSubnet, in SetIfDnsAndRoute() 311 dhcpResult->strOptRouter1, in SetIfDnsAndRoute() 312 dhcpResult->strOptDns1, in SetIfDnsAndRoute() 313 dhcpResult->strOptDns2); in SetIfDnsAndRoute() 314 SetNetDns(WifiConfigCenter::GetInstance().GetStaIfaceName(), dhcpResult->strOptDns1, dhcpResult->strOptDns2); in SetIfDnsAndRoute() 315 AddIfRoute(WifiConfigCenter::GetInstance().GetStaIfaceName(), dhcpResult in SetIfDnsAndRoute() [all...] |
/foundation/communication/netmanager_ext/services/ethernetmanager/include/ |
H A D | ethernet_management.h | 38 int32_t OnDhcpSuccess(EthernetDhcpCallback::DhcpResult &dhcpResult) override; 56 int32_t OnDhcpSuccess(NetsysControllerCallback::DhcpResult &dhcpResult) override; 66 int32_t UpdateDevInterfaceLinkInfo(EthernetDhcpCallback::DhcpResult &dhcpResult);
|
H A D | ethernet_configuration.h | 45 bool ConvertToConfiguration(const EthernetDhcpCallback::DhcpResult &dhcpResult, sptr<StaticConfiguration> &config); 71 bool IsValidDhcpResult(const EthernetDhcpCallback::DhcpResult &dhcpResult, sptr<StaticConfiguration> &config);
|
H A D | ethernet_dhcp_callback.h | 39 virtual int32_t OnDhcpSuccess(EthernetDhcpCallback::DhcpResult &dhcpResult) = 0;
|
/foundation/communication/netmanager_base/test/netmanagernative/unittest/netsys_wrapper_test/ |
H A D | netsys_wrapper_test.cpp | 44 int32_t OnDhcpSuccess(sptr<OHOS::NetsysNative::DhcpResultParcel> &dhcpResult) override; 138 int32_t NetlinkNativeNotifyCallBack::OnDhcpSuccess(sptr<OHOS::NetsysNative::DhcpResultParcel> &dhcpResult) in OnDhcpSuccess() argument 141 EXPECT_NE(dhcpResult, nullptr); in OnDhcpSuccess()
|
/foundation/communication/netmanager_base/test/commonduplicatedcode/ |
H A D | common_netsys_controller_callback_test.h | 56 virtual int32_t OnDhcpSuccess(NetsysControllerCallback::DhcpResult &dhcpResult) in OnDhcpSuccess() argument
|
H A D | common_notify_callback_test.h | 63 int32_t OnDhcpSuccess(sptr<DhcpResultParcel> &dhcpResult) override
|
/foundation/communication/netmanager_base/test/netmanagernative/unit_test/ |
H A D | test_notify_callback.cpp | 76 int32_t TestNotifyCallback::OnDhcpSuccess(sptr<OHOS::NetsysNative::DhcpResultParcel> &dhcpResult) in OnDhcpSuccess() argument
|
H A D | test_notify_callback.h | 34 int32_t OnDhcpSuccess(sptr<OHOS::NetsysNative::DhcpResultParcel> &dhcpResult) override;
|
/foundation/communication/netmanager_base/interfaces/innerkits/netmanagernative/include/ |
H A D | notify_callback_proxy.h | 37 int32_t OnDhcpSuccess(sptr<DhcpResultParcel> &dhcpResult) override;
|
H A D | i_notify_callback.h | 44 virtual int32_t OnDhcpSuccess(sptr<DhcpResultParcel> &dhcpResult) = 0;
|
/foundation/communication/netmanager_base/services/netsyscontroller/include/ |
H A D | netsys_controller_callback.h | 44 virtual int32_t OnDhcpSuccess(NetsysControllerCallback::DhcpResult &dhcpResult) = 0;
|
/foundation/communication/netmanager_base/services/netmanagernative/src/ |
H A D | notify_callback_stub.cpp | 171 static sptr<DhcpResultParcel> dhcpResult = DhcpResultParcel::Unmarshalling(data); in CmdDhcpSuccess() local 172 OnDhcpSuccess(dhcpResult); in CmdDhcpSuccess()
|
/foundation/communication/dhcp/frameworks/native/include/ |
H A D | dhcp_event.h | 46 void ResultInfoCopy(DhcpResult &dhcpResult, OHOS::DHCP::DhcpResult& result);
|
/foundation/communication/netmanager_base/services/netsyscontroller/src/ |
H A D | netsys_native_client.cpp | 160 int32_t NetsysNativeClient::NativeNotifyCallback::OnDhcpSuccess(sptr<OHOS::NetsysNative::DhcpResultParcel> &dhcpResult) in OnDhcpSuccess() argument 163 netsysNativeClient_.ProcessDhcpResult(dhcpResult); in OnDhcpSuccess() 1137 void NetsysNativeClient::ProcessDhcpResult(sptr<OHOS::NetsysNative::DhcpResultParcel> &dhcpResult) in ProcessDhcpResult() argument 1146 result.iface_ = dhcpResult->iface_; in ProcessDhcpResult() 1147 result.ipAddr_ = dhcpResult->ipAddr_; in ProcessDhcpResult() 1148 result.gateWay_ = dhcpResult->gateWay_; in ProcessDhcpResult() 1149 result.subNet_ = dhcpResult->subNet_; in ProcessDhcpResult() 1150 result.route1_ = dhcpResult->route1_; in ProcessDhcpResult() 1151 result.route2_ = dhcpResult->route2_; in ProcessDhcpResult() 1152 result.dns1_ = dhcpResult in ProcessDhcpResult() [all...] |
/foundation/communication/netmanager_base/frameworks/native/netmanagernative/ |
H A D | notify_callback_proxy.cpp | 281 int32_t NotifyCallbackProxy::OnDhcpSuccess(sptr<DhcpResultParcel> &dhcpResult) in OnDhcpSuccess() argument 289 dhcpResult->Marshalling(data); in OnDhcpSuccess()
|