Home
last modified time | relevance | path

Searched refs:netAddr (Results 1 – 25 of 32) sorted by relevance

12

/ohos5.0/foundation/communication/netmanager_base/test/netconnmanager/unittest/net_conn_manager_test/
H A Dnative_net_conn_test.cpp69 netAddr->type_ = INetAddr::IPV4; in GetINetAddrSample()
70 netAddr->family_ = 0x10; in GetINetAddrSample()
71 netAddr->prefixlen_ = 0x17; in GetINetAddrSample()
72 netAddr->address_ = "192.168.2.0"; in GetINetAddrSample()
73 netAddr->netMask_ = "192.255.255.255"; in GetINetAddrSample()
74 netAddr->hostName_ = "netAddr"; in GetINetAddrSample()
75 return netAddr; in GetINetAddrSample()
112 sptr<INetAddr> netAddr = GetINetAddrSample(); in GetNetLinkInfoSample() local
113 netLinkInfo->netAddrList_.push_back(*netAddr); in GetNetLinkInfoSample()
136 std::cout << "port: " << netAddr.port << std::endl; in LogINetAddr()
[all …]
H A Dnet_link_info_test.cpp50 sptr<INetAddr> netAddr = (std::make_unique<INetAddr>()).release(); in GetNetLinkInfo() local
51 netAddr->type_ = INetAddr::IPV4; in GetNetLinkInfo()
52 netAddr->family_ = 0x10; in GetNetLinkInfo()
53 netAddr->prefixlen_ = 0x17; in GetNetLinkInfo()
54 netAddr->address_ = "0.0.0.0"; in GetNetLinkInfo()
55 netAddr->netMask_ = "0.0.0.0"; in GetNetLinkInfo()
56 netAddr->hostName_ = "netAddr"; in GetNetLinkInfo()
57 netLinkInfo->netAddrList_.push_back(*netAddr); in GetNetLinkInfo()
H A Dnet_conn_hievent_test.cpp70 sptr<INetAddr> netAddr = (std::make_unique<INetAddr>()).release(); in GetNetLinkInfo() local
71 netAddr->type_ = INetAddr::IPV4; in GetNetLinkInfo()
72 netAddr->family_ = 0x10; in GetNetLinkInfo()
73 netAddr->prefixlen_ = 0x17; in GetNetLinkInfo()
74 netAddr->address_ = "192.168.2.0"; in GetNetLinkInfo()
75 netAddr->netMask_ = "192.255.255.255"; in GetNetLinkInfo()
76 netAddr->hostName_ = "netAddr"; in GetNetLinkInfo()
77 netLinkInfo->netAddrList_.push_back(*netAddr); in GetNetLinkInfo()
H A Dnet_conn_manager_test.cpp85 sptr<INetAddr> netAddr = (std::make_unique<INetAddr>()).release(); in GetUpdateLinkInfoSample() local
86 netAddr->type_ = INetAddr::IPV4; in GetUpdateLinkInfoSample()
87 netAddr->family_ = 0x10; in GetUpdateLinkInfoSample()
88 netAddr->prefixlen_ = 0x17; in GetUpdateLinkInfoSample()
89 netAddr->address_ = "192.168.2.0"; in GetUpdateLinkInfoSample()
90 netAddr->netMask_ = "192.255.255.255"; in GetUpdateLinkInfoSample()
91 netAddr->hostName_ = "netAddr"; in GetUpdateLinkInfoSample()
92 netLinkInfo->netAddrList_.push_back(*netAddr); in GetUpdateLinkInfoSample()
H A Dnet_conn_service_test.cpp84 INetAddr netAddr; in GetAddressesByName() local
85 netAddr.type_ = INetAddr::IPV4; in GetAddressesByName()
86 addrInfo.push_back(netAddr); in GetAddressesByName()
261 INetAddr netAddr; variable
262 netAddr.type_ = INetAddr::IPV4;
263 netAddr.hostName_ = "testHost";
264 netLinkInfo->netAddrList_.push_back(netAddr);
272 ret = NetConnService::GetInstance()->IsAddrInOtherNetwork("rmnet0", 1, netAddr);
274 ret = NetConnService::GetInstance()->IsAddrInOtherNetwork("rmnet0", 100, netAddr);
/ohos5.0/foundation/communication/netmanager_ext/frameworks/native/ethernetclient/src/
H A Dstatic_configuration.cpp50 auto netAddr = netAddrList[index]; in MarshallingNetAddressList() local
51 if (!netAddr.Marshalling(parcel)) { in MarshallingNetAddressList()
87 auto netAddr = INetAddr::Unmarshalling(parcel); in UnmarshallingNetAddressList() local
88 if (netAddr == nullptr) { in UnmarshallingNetAddressList()
91 netAddrList.push_back(*netAddr); in UnmarshallingNetAddressList()
99 for (const auto &netAddr : CommonUtils::Split(input, SEPARATOR)) { in ExtractNetAddrBySeparator() local
101 addr.address_ = netAddr; in ExtractNetAddrBySeparator()
/ohos5.0/foundation/communication/netmanager_ext/test/vpnmanager/fuzztest/vpnclient_fuzzer/
H A Dvpnclient_fuzzer.cpp75 INetAddr netAddr; in GetAddressData() local
76 netAddr.type_ = GetData<uint8_t>(); in GetAddressData()
77 netAddr.family_ = GetData<uint8_t>(); in GetAddressData()
78 netAddr.prefixlen_ = GetData<uint8_t>(); in GetAddressData()
79 netAddr.address_ = GetStringData(); in GetAddressData()
80 netAddr.netMask_ = GetStringData(); in GetAddressData()
81 netAddr.hostName_ = GetStringData(); in GetAddressData()
82 netAddr.port_ = GetData<uint8_t>(); in GetAddressData()
83 return netAddr; in GetAddressData()
/ohos5.0/foundation/communication/netmanager_base/frameworks/native/netconnclient/src/
H A Dnet_adj_info.cpp70 sptr<INetAddr> netAddr; in Unmarshalling() local
72 netAddr = INetAddr::Unmarshalling(parcel); in Unmarshalling()
73 if (netAddr == nullptr) { in Unmarshalling()
76 info->netAddrList_.push_back(*netAddr); in Unmarshalling()
H A Dnet_link_info.cpp116 sptr<INetAddr> netAddr; in Unmarshalling() local
118 netAddr = INetAddr::Unmarshalling(parcel); in Unmarshalling()
119 if (netAddr == nullptr) { in Unmarshalling()
123 ptr->netAddrList_.push_back(*netAddr); in Unmarshalling()
130 netAddr = INetAddr::Unmarshalling(parcel); in Unmarshalling()
131 if (netAddr == nullptr) { in Unmarshalling()
135 ptr->dnsList_.push_back(*netAddr); in Unmarshalling()
219 bool NetLinkInfo::HasNetAddr(const INetAddr &netAddr) const in HasNetAddr()
221 return std::find(netAddrList_.begin(), netAddrList_.end(), netAddr) != netAddrList_.end(); in HasNetAddr()
H A Dnet_adj_iface_info.cpp63 sptr<INetAddr> netAddr; in Unmarshalling() local
65 netAddr = INetAddr::Unmarshalling(parcel); in Unmarshalling()
66 if (netAddr == nullptr) { in Unmarshalling()
69 info->netAddrList_.push_back(*netAddr); in Unmarshalling()
/ohos5.0/foundation/communication/netmanager_ext/services/ethernetmanager/src/
H A Ddev_interface_state.cpp177 for (auto &netAddr: newNetLinkinfo->netAddrList_) { in RemoteUpdateNetLinkInfo() local
178 if (netAddr.family_ == AF_INET) { in RemoteUpdateNetLinkInfo()
179 netAddr.family_ = INetAddr::IpType::IPV4; in RemoteUpdateNetLinkInfo()
180 } else if (netAddr.family_ == AF_INET6) { in RemoteUpdateNetLinkInfo()
181 netAddr.family_ = INetAddr::IpType::IPV6; in RemoteUpdateNetLinkInfo()
238 for (const auto &netAddr : ifCfg_->ipStatic_.routeList_) { in UpdateLinkInfo() local
241 route.destination_ = netAddr; in UpdateLinkInfo()
242 … GetTargetNetAddrWithSameFamily(netAddr.address_, ifCfg_->ipStatic_.gatewayList_, route.gateway_); in UpdateLinkInfo()
272 for (const auto &netAddr : ifCfg_->ipStatic_.routeList_) { in UpdateLanLinkInfo() local
275 route.destination_ = netAddr; in UpdateLanLinkInfo()
[all …]
/ohos5.0/foundation/communication/netmanager_ext/services/networksharemanager/src/
H A Dnetworkshare_sub_statemachine.cpp713 if (netAddr == nullptr) { in StartDhcp()
724 std::string ipAddr = netAddr->address_; in StartDhcp()
845 netAddr = std::make_shared<INetAddr>(); in RequestIpv4Address()
846 netAddr->type_ = INetAddr::IPV4; in RequestIpv4Address()
847 netAddr->prefixlen_ = PREFIX_LENGTH_24; in RequestIpv4Address()
848 netAddr->netMask_ = configuration_->GetDefaultMask(); in RequestIpv4Address()
849 if (netAddr->netMask_.empty()) { in RequestIpv4Address()
855 netAddr->address_ = configuration_->GetBtpanIpv4Addr(); in RequestIpv4Address()
860 netAddr->address_ = configuration_->GetWifiHotspotIpv4Addr(); in RequestIpv4Address()
865 netAddr->address_ = configuration_->GetUsbRndisIpv4Addr(); in RequestIpv4Address()
[all …]
/ohos5.0/foundation/communication/netmanager_ext/frameworks/native/netvpnclient/src/
H A Dvpn_data_bean.cpp59 sptr<INetAddr> netAddr = new (std::nothrow) INetAddr(); in ConvertVpnBeanToIpsecVpnConfig() local
60 netAddr->address_ = vpnBean->vpnAddress_; in ConvertVpnBeanToIpsecVpnConfig()
61 ipsecVpnConfig->addresses_.push_back(*netAddr); in ConvertVpnBeanToIpsecVpnConfig()
103 sptr<INetAddr> netAddr = new (std::nothrow) INetAddr(); in ConvertVpnBeanToL2tpVpnConfig() local
104 netAddr->address_ = vpnBean->vpnAddress_; in ConvertVpnBeanToL2tpVpnConfig()
105 l2tpVpnConfig->addresses_.push_back(*netAddr); in ConvertVpnBeanToL2tpVpnConfig()
/ohos5.0/foundation/communication/netmanager_base/frameworks/js/napi/connection/connection_exec/src/
H A Dconnection_exec.cpp778 napi_value netAddr = NapiUtils::CreateObject(env); in FillLinkAddress() local
779 NapiUtils::SetStringPropertyUtf8(env, netAddr, KEY_ADDRESS, it->address_); in FillLinkAddress()
780 NapiUtils::SetUint32Property(env, netAddr, KEY_FAMILY, it->family_); in FillLinkAddress()
781 NapiUtils::SetUint32Property(env, netAddr, KEY_PORT, it->port_); in FillLinkAddress()
784 NapiUtils::SetNamedProperty(env, linkAddr, KEY_ADDRESS, netAddr); in FillLinkAddress()
802 napi_value netAddr = NapiUtils::CreateObject(env); in FillRouoteList() local
806 NapiUtils::SetNamedProperty(env, dest, KEY_ADDRESS, netAddr); in FillRouoteList()
830 napi_value netAddr = NapiUtils::CreateObject(env); in FillDns() local
832 NapiUtils::SetUint32Property(env, netAddr, KEY_FAMILY, it->family_); in FillDns()
833 NapiUtils::SetUint32Property(env, netAddr, KEY_PORT, it->port_); in FillDns()
[all …]
/ohos5.0/foundation/communication/netmanager_base/interfaces/kits/c/netconnclient/src/
H A Dnet_connection_adapter.cpp81 static int32_t Conv2INetAddr(const INetAddr &netAddrObj, NetConn_NetAddr *netAddr) in Conv2INetAddr() argument
83 netAddr->family = netAddrObj.family_; in Conv2INetAddr()
84 netAddr->prefixlen = netAddrObj.prefixlen_; in Conv2INetAddr()
85 netAddr->port = netAddrObj.port_; in Conv2INetAddr()
87 int32_t ret = Conv2Ch(netAddrObj.address_, netAddr->address); in Conv2INetAddr()
172 for (const auto &netAddr : infoObj.netAddrList_) { in Conv2NetLinkInfo() local
177 ret = Conv2INetAddr(netAddr, &(prop->netAddrList[i++])); in Conv2NetLinkInfo()
/ohos5.0/base/telephony/cellular_data/services/src/state_machine/
H A Dcellular_data_state_machine.cpp376 INetAddr netAddr; in ResolveIp() local
377 netAddr.address_ = ipInfo.ip; in ResolveIp()
378 netAddr.family_ = ipInfo.type; in ResolveIp()
379 netAddr.type_ = ipInfo.type; in ResolveIp()
380 netAddr.hostName_ = DEFAULT_HOSTNAME; in ResolveIp()
381 netAddr.netMask_ = ipInfo.netMask.length() > 0 ? ipInfo.netMask : DEFAULT_MASK; in ResolveIp()
382 netAddr.prefixlen_ = ipInfo.prefixLen; in ResolveIp()
383 netLinkInfo_->netAddrList_.push_back(netAddr); in ResolveIp()
/ohos5.0/foundation/communication/wifi/wifi/services/wifi_standard/wifi_framework/wifi_manage/wifi_common/
H A Dwifi_net_agent.cpp287 …sptr<NetManagerStandard::INetAddr> netAddr = (std::make_unique<NetManagerStandard::INetAddr>()).re… local
288 netAddr->type_ = NetManagerStandard::INetAddr::IPV4;
289 netAddr->family_ = NetManagerStandard::INetAddr::IPV4;
290 netAddr->address_ = IpTools::ConvertIpv4Address(wifiIpInfo.ipAddress);
291 netAddr->netMask_ = IpTools::ConvertIpv4Address(wifiIpInfo.netmask);
292 netAddr->prefixlen_ = prefixLength;
293 netLinkInfo->netAddrList_.push_back(*netAddr);
/ohos5.0/foundation/communication/netmanager_base/services/netconnmanager/src/
H A Dnet_conn_service_iface.cpp79 …ceIface::IsAddrInOtherNetwork(const std::string &ifaceName, int32_t netId, const INetAddr &netAddr) in IsAddrInOtherNetwork() argument
81 return NetConnService::GetInstance()->IsAddrInOtherNetwork(ifaceName, netId, netAddr); in IsAddrInOtherNetwork()
/ohos5.0/foundation/communication/netmanager_ext/services/networksharemanager/include/
H A Dnetworkshare_sub_statemachine.h107 bool RequestIpv4Address(std::shared_ptr<INetAddr> &netAddr);
108 bool StartDhcp(const std::shared_ptr<INetAddr> &netAddr);
/ohos5.0/foundation/communication/netmanager_ext/test/networksharemanager/unittest/networkshare_manager_test/
H A Dnetworkshare_sub_statemachine_test.cpp479 std::shared_ptr<INetAddr> netAddr = nullptr; variable
480 result = networkShareWifiSubStateMachine->StartDhcp(netAddr);
516 std::shared_ptr<INetAddr> netAddr = nullptr; variable
517 result = networkShareWifiSubStateMachine->RequestIpv4Address(netAddr);
/ohos5.0/foundation/communication/netmanager_ext/services/vpnmanager/src/
H A Dnetworkvpn_service.cpp436 void NetworkVpnService::ConvertNetAddrToJson(const INetAddr& netAddr, cJSON* jInetAddr) in ConvertNetAddrToJson() argument
438 cJSON_AddItemToObject(jInetAddr, "type", cJSON_CreateNumber(netAddr.type_)); in ConvertNetAddrToJson()
439 cJSON_AddItemToObject(jInetAddr, "family", cJSON_CreateNumber(netAddr.family_)); in ConvertNetAddrToJson()
440 cJSON_AddItemToObject(jInetAddr, "prefixlen", cJSON_CreateNumber(netAddr.prefixlen_)); in ConvertNetAddrToJson()
441 cJSON_AddItemToObject(jInetAddr, "address", cJSON_CreateString(netAddr.address_.c_str())); in ConvertNetAddrToJson()
442 cJSON_AddItemToObject(jInetAddr, "netMask", cJSON_CreateString(netAddr.netMask_.c_str())); in ConvertNetAddrToJson()
443 cJSON_AddItemToObject(jInetAddr, "hostName", cJSON_CreateString(netAddr.hostName_.c_str())); in ConvertNetAddrToJson()
444 cJSON_AddItemToObject(jInetAddr, "port", cJSON_CreateNumber(netAddr.port_)); in ConvertNetAddrToJson()
/ohos5.0/foundation/communication/netmanager_base/interfaces/innerkits/netconnclient/include/
H A Dnet_link_info.h48 bool HasNetAddr(const INetAddr &netAddr) const;
/ohos5.0/foundation/communication/netmanager_base/services/netconnmanager/include/
H A Dnet_conn_service_iface.h42 bool IsAddrInOtherNetwork(const std::string &ifaceName, int32_t netId, const INetAddr &netAddr);
/ohos5.0/foundation/communication/netmanager_base/frameworks/cj/connection/src/
H A Dnet_connection_callback.cpp129 …CNetAddress netAddr{.address = MallocCString(it->address_), .family = it->family_, .port = it->por… in SetConnectionProp() local
130 … props.linkAddresses[i] = CLinkAddress{.address = netAddr, .prefixLength = it->prefixlen_}; in SetConnectionProp()
/ohos5.0/foundation/communication/dhcp/services/dhcp_client/src/
H A Ddhcp_function.cpp263 int SetIpOrMask(const char *ifname, int fd, uint32_t netAddr, unsigned long cmd) in SetIpOrMask() argument
282 sin.sin_addr.s_addr = netAddr; in SetIpOrMask()

12