Home
last modified time | relevance | path

Searched refs:strIp (Results 1 - 17 of 17) sorted by relevance

/foundation/communication/dhcp/services/dhcp_server/src/
H A Ddhcp_function.cpp36 bool DhcpFunction::Ip4StrConToInt(const std::string& strIp, uint32_t& uIp, bool bHost) in Ip4StrConToInt() argument
38 if (strIp.empty()) { in Ip4StrConToInt()
39 DHCP_LOGE("Ip4StrConToInt error, strIp is empty()!"); in Ip4StrConToInt()
44 int nRet = inet_pton(AF_INET, strIp.c_str(), &addr4); in Ip4StrConToInt()
46 DHCP_LOGE("Ip4StrConToInt strIp:%{private}s failed, nRet:%{public}d!", strIp.c_str(), nRet); in Ip4StrConToInt()
48 DHCP_LOGE("Ip4StrConToInt strIp:%{private}s not in presentation format!", strIp.c_str()); in Ip4StrConToInt()
50 DHCP_LOGE("Ip4StrConToInt strIp:%{private}s inet_pton not contain a valid address!", strIp in Ip4StrConToInt()
74 std::string strIp = ""; Ip4IntConvertToStr() local
85 Ip6StrConToChar(const std::string& strIp, uint8_t chIp[], size_t uSize) Ip6StrConToChar() argument
121 std::string strIp = ""; Ip6CharConToStr() local
137 CheckIpStr(const std::string& strIp) CheckIpStr() argument
176 GetLocalIp(const std::string strInf, std::string& strIp, std::string& strMask) GetLocalIp() argument
278 std::string strIp, strMask; CheckRangeNetwork() local
[all...]
H A Daddress_utils.cpp164 uint32_t ParseIpAddr(const char *strIp) in ParseIpAddr() argument
168 int ret = inet_aton(strIp, &inAddr); in ParseIpAddr()
178 uint32_t ParseIpHtonl(const char *strIp) in ParseIpHtonl() argument
180 uint32_t ip = ParseIpAddr(strIp); in ParseIpHtonl()
/foundation/communication/dhcp/services/dhcp_client/src/
H A Ddhcp_function.cpp38 bool Ip4StrConToInt(const char *strIp, uint32_t *uIp, bool bHost) in Ip4StrConToInt() argument
40 if ((strIp == NULL) || (strlen(strIp) == 0)) { in Ip4StrConToInt()
41 DHCP_LOGE("Ip4StrConToInt failed, strIp == NULL or \"\"!"); in Ip4StrConToInt()
46 int nRet = inet_pton(AF_INET, strIp, &addr4); in Ip4StrConToInt()
48 DHCP_LOGE("Ip4StrConToInt strIp:%{private}s failed, inet_pton nRet:%{public}d!", strIp, nRet); in Ip4StrConToInt()
50 DHCP_LOGE("Ip4StrConToInt strIp:%{private}s not in presentation format!", strIp); in Ip4StrConToInt()
52 DHCP_LOGE("Ip4StrConToInt strIp in Ip4StrConToInt()
76 std::string strIp = ""; Ip4IntConvertToStr() local
87 Ip6StrConToChar(const char *strIp, uint8_t chIp[], size_t chlen) Ip6StrConToChar() argument
213 char strIp[NI_MAXHOST]; GetLocalIp() local
[all...]
/foundation/communication/dhcp/test/unittest/services/dhcp_server/unittest/
H A Ddhcp_function_test.cpp44 std::string strIp = "192.77.1.232"; in HWTEST_F() local
46 EXPECT_EQ(true, DhcpFunction::Ip4StrConToInt(strIp, uSerIp)); in HWTEST_F()
47 printf("DhcpFunctionTest Ip4StrConToInt_SUCCESS strIp:%s -> uSerIp:%u.\n", strIp.c_str(), uSerIp); in HWTEST_F()
52 std::string strIp = "test4"; in HWTEST_F() local
54 EXPECT_EQ(false, DhcpFunction::Ip4StrConToInt(strIp, uSerIp)); in HWTEST_F()
56 strIp.clear(); in HWTEST_F()
58 EXPECT_EQ(false, DhcpFunction::Ip4StrConToInt(strIp, uSerIp)); in HWTEST_F()
64 std::string strIp = DhcpFunction::Ip4IntConvertToStr(uSerIp); in HWTEST_F() local
65 EXPECT_STRNE(strIp in HWTEST_F()
72 std::string strIp = DhcpFunction::Ip4IntConvertToStr(uSerIp); HWTEST_F() local
78 std::string strIp = "fe80::20c:29ff:fed7:fac8"; HWTEST_F() local
85 std::string strIp = "test6"; HWTEST_F() local
[all...]
/foundation/communication/dhcp/services/utils/src/
H A Ddhcp_common_utils.cpp62 char *strIp = static_cast<char *>(malloc(INET_ADDRSTRLEN)); in UintIp4ToStr() local
63 if (strIp == nullptr) { in UintIp4ToStr()
64 DHCP_LOGE("UintIp4ToStr strIp malloc failed!"); in UintIp4ToStr()
67 if (strncpy_s(strIp, INET_ADDRSTRLEN, bufIp4, strlen(bufIp4)) != EOK) { in UintIp4ToStr()
68 DHCP_LOGE("UintIp4ToStr strIp strncpy_s failed!"); in UintIp4ToStr()
69 free(strIp); in UintIp4ToStr()
70 strIp = nullptr; in UintIp4ToStr()
73 return strIp; in UintIp4ToStr()
/foundation/communication/dhcp/services/dhcp_server/include/
H A Ddhcp_function.h36 static bool Ip4StrConToInt(const std::string& strIp, uint32_t& uIp, bool bHost = true);
38 static bool Ip6StrConToChar(const std::string& strIp, uint8_t chIp[], size_t uSize);
40 static bool CheckIpStr(const std::string& strIp);
41 static int GetLocalIp(const std::string strInf, std::string& strIp, std::string& strMask);
H A Daddress_utils.h37 uint32_t ParseIpAddr(const char *strIp);
38 uint32_t ParseIpHtonl(const char *strIp);
/foundation/communication/dhcp/services/dhcp_client/include/
H A Ddhcp_function.h26 bool Ip4StrConToInt(const char *strIp, uint32_t *uIp, bool bHost);
28 bool Ip6StrConToChar(const char *strIp, uint8_t chIp[], size_t chlen);
/foundation/communication/wifi/wifi/services/wifi_standard/wifi_framework/wifi_toolkit/net_helper/
H A Dhttp_request.cpp30 : mISocketFd(INVALID_SOCKET), iPort(0), strHost(""), strIp(""), strRes(""), strParam(""), httpHead("") in HttpRequest()
100 LOGI("iPort= [%{public}d],strIP= [%s]\n", iPort, strIp.c_str()); in HttpRequestExec()
122 if (inet_pton(AF_INET, strIp.c_str(), &servaddr.sin_addr) <= 0) { in HttpConnect()
321 pThreadData->strIp = ip; in GetHostThread()
326 pThreadData->strIp = ip; in GetHostThread()
330 LOGE("GetHostThread ipaddr is %{public}s.", pThreadData->strIp.c_str()); in GetHostThread()
390 strIp = pData->strIp; in GetIPFromUrl()
400 strIp = strIpOrDomain; in GetIPFromUrl()
H A Dhttp_request.h151 std::string strIp; member in OHOS::Wifi::HttpRequest
158 std::string strIp; member
/foundation/communication/dhcp/test/fuzztest/dhcpfunction_fuzzer/
H A Ddhcpfunction_fuzzer.cpp35 std::string strIp = std::string(reinterpret_cast<const char*>(data), size); in Ip4StrConToIntTest() local
37 pDhcpFunction->Ip4StrConToInt(strIp, uIp, bHost); in Ip4StrConToIntTest()
50 std::string strIp = std::string(reinterpret_cast<const char*>(data), size); in Ip6StrConToCharTest() local
52 pDhcpFunction->Ip6StrConToChar(strIp, chIp, sizeof(struct in6_addr)); in Ip6StrConToCharTest()
57 std::string strIp = std::string(reinterpret_cast<const char*>(data), size); in CheckIpStrTest() local
58 pDhcpFunction->CheckIpStr(strIp); in CheckIpStrTest()
/foundation/communication/wifi/wifi/test/wifi_utils/unittest/
H A Dwifi_common_util_test.cpp63 std::string strIp = "00:55:DD:ff:MM"; in HWTEST_F() local
64 Ip2Number(strIp); in HWTEST_F()
95 std::string strIp = "00:55:DD"; in HWTEST_F() local
96 EXPECT_NE(SsidAnonymize(strIp), ""); in HWTEST_F()
/foundation/communication/dhcp/test/fuzztest/addressutils_fuzzer/
H A Daddressutils_fuzzer.cpp100 const char *strIp = "TEXT"; in ParseIpAddrTest() local
101 (void)ParseIpAddr(strIp); in ParseIpAddrTest()
106 const char *strIp = "TEXT"; in ParseIpHtonlTest() local
107 (void)ParseIpHtonl(strIp); in ParseIpHtonlTest()
/foundation/CastEngine/castengine_cast_plus_stream/src/utils/src/
H A Dutils.cpp150 std::string strIp = Utils::ConvertIpv4Address(ipInfo.ipAddress); in GetWifiIp() local
151 return strIp; in GetWifiIp()
/foundation/CastEngine/castengine_cast_framework/service/src/session/src/utils/src/
H A Dutils.cpp150 std::string strIp = Utils::ConvertIpv4Address(ipInfo.ipAddress); in GetWifiIp() local
151 return strIp; in GetWifiIp()
/foundation/communication/wifi/wifi/utils/inc/
H A Dwifi_common_util.h158 * @param strIp - Input string IP address
161 unsigned int Ip2Number(const std::string& strIp);
/foundation/communication/wifi/wifi/utils/src/
H A Dwifi_common_util.cpp220 unsigned int Ip2Number(const std::string& strIp) in Ip2Number() argument
228 std::string ip(strIp + '.'); in Ip2Number()

Completed in 16 milliseconds