Home
last modified time | relevance | path

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

/ohos5.0/foundation/communication/dhcp/test/unittest/services/dhcp_server/unittest/
H A Daddress_utils_test.cpp155 uint32_t endIp = LastIpAddress(beginIp, testNetmask); variable
156 ASSERT_TRUE(endIp != 0);
165 EXPECT_FALSE(IpInRange(testIp1, beginIp, endIp, testNetmask));
166 EXPECT_FALSE(IpInRange(testIp2, beginIp, endIp, testNetmask));
167 EXPECT_TRUE(IpInRange(testIp3, beginIp, endIp, testNetmask));
H A Ddhcp_s_server_test.cpp77 uint32_t endIp = ParseIpAddr("192.168.189.200"); in InitServerConfig() local
78 if (serverId == 0 || netmask == 0 || beginIp == 0 || endIp == 0) { in InitServerConfig()
94 config->pool.endAddress = endIp; in InitServerConfig()
H A Ddhcp_address_pool_test.cpp55 uint32_t endIp = ParseIpAddr("192.168.100.150"); in SamplePoolConfig() local
59 if (beginIp != 0 && endIp != 0 && netmask != 0 && gateway != 0) { in SamplePoolConfig()
61 testPool.addressRange.endAddress = endIp; in SamplePoolConfig()
/ohos5.0/foundation/communication/netmanager_ext/services/netfirewallmanager/src/
H A Dnetfirewall_default_rule_parser.cpp187 cJSON *endIp = cJSON_GetObjectItem(mem, NET_FIREWALL_IP_END.c_str()); in ConvertIpParamToConfig() local
188 if (endIp != nullptr && cJSON_IsString(endIp)) { in ConvertIpParamToConfig()
189 tmp = cJSON_GetStringValue(endIp); in ConvertIpParamToConfig()
191 inet_pton(AF_INET, tmp.c_str(), &rule.ipv4.endIp); in ConvertIpParamToConfig()
193 inet_pton(AF_INET6, tmp.c_str(), &rule.ipv6.endIp); in ConvertIpParamToConfig()
H A Dnetfirewall_db_helper.cpp914 memcpy_s(&dbip.ipv4.endIp, sizeof(uint32_t), &param.ipv4.endIp, sizeof(uint32_t)); in FirewallIpToDbIp()
917 memcpy_s(&dbip.ipv6.endIp, sizeof(in6_addr), &param.ipv6.endIp, sizeof(in6_addr)); in FirewallIpToDbIp()
932 memcpy_s(&dbip.ipv4.endIp, sizeof(uint32_t), &param.ipv4.endIp, sizeof(uint32_t)); in DbIpToFirewallIp()
935 memcpy_s(&dbip.ipv6.endIp, sizeof(in6_addr), &param.ipv6.endIp, sizeof(in6_addr)); in DbIpToFirewallIp()
/ohos5.0/foundation/communication/netmanager_ext/frameworks/js/napi/netfirewall/src/context/
H A Dnet_firewall_rule_parse.cpp49 std::string endIp; in ParseIpList() local
59 endIp = NapiUtils::GetStringPropertyUtf8(env, valAttr, NET_FIREWALL_IP_END); in ParseIpList()
64 inet_pton(AF_INET, endIp.c_str(), &param.ipv4.endIp); in ParseIpList()
69 inet_pton(AF_INET6, endIp.c_str(), &param.ipv6.endIp); in ParseIpList()
H A Dnet_firewall_param_check.cpp163 bool NetFirewallParamCheck::CheckIpAddress(const std::string &startIp, const std::string &endIp, co… in CheckIpAddress() argument
172 endRet = inet_pton(AF_INET6, endIp.c_str(), &in6_addr2); in CheckIpAddress()
189 endRet = inet_pton(AF_INET, endIp.c_str(), &inAddr2); in CheckIpAddress()
269 std::string endIp = in CheckMultipleIp() local
271 if (CheckIpAddress(startIp, endIp, family)) { in CheckMultipleIp()
/ohos5.0/foundation/communication/netmanager_base/frameworks/native/netmanagernative/
H A Dnetfirewall_parcel.cpp36 parcel.WriteUint32(ipv4.endIp.s_addr); in Marshalling()
43 parcel.WriteUint8(ipv6.endIp.s6_addr[index]); in Marshalling()
65 parcel.ReadUint32(ptr->ipv4.endIp.s_addr); in Unmarshalling()
72 parcel.ReadUint8(ptr->ipv6.endIp.s6_addr[index]); in Unmarshalling()
118 inet_ntop(AF_INET, &(this->ipv4.endIp), ip, INET_ADDRSTRLEN); in GetEndIp()
120 inet_ntop(AF_INET6, &(this->ipv6.endIp), ip, INET6_ADDRSTRLEN); in GetEndIp()
/ohos5.0/foundation/communication/dhcp/services/dhcp_server/src/
H A Daddress_utils.cpp104 int IpInRange(uint32_t ip, uint32_t beginIp, uint32_t endIp, uint32_t netmask) in IpInRange() argument
108 uint32_t secondNet = NetworkAddress(endIp, netmask); in IpInRange()
112 if (ip >= beginIp && ip <= endIp) { in IpInRange()
H A Ddhcp_address_pool.cpp139 uint32_t endIp = pool->addressRange.endAddress; in CheckRangeAvailability() local
140 if (IpInRange(distIp, beginIp, endIp, pool->netmask)) { in CheckRangeAvailability()
494 uint32_t endIp = pool->addressRange.endAddress; in LoadBindingRecoders() local
506 if (IpInRange(bind.ipAddress, beginIp, endIp, netmask)) { in LoadBindingRecoders()
/ohos5.0/foundation/communication/netmanager_ext/services/networksharemanager/src/
H A Dnetworkshare_sub_statemachine.cpp717 std::string endIp; in StartDhcp() local
719 if (!CheckConfig(endIp, mask)) { in StartDhcp()
735 std::string strEndip = ipHead + "." + endIp; in StartDhcp()
785 bool NetworkShareSubStateMachine::CheckConfig(std::string &endIp, std::string &mask) in CheckConfig() argument
791 endIp = configuration_->GetDhcpEndIP(); in CheckConfig()
792 if (endIp.empty()) { in CheckConfig()
/ohos5.0/docs/zh-cn/application-dev/network/
H A Dnet-netfirewall.md94 endIp: "10.20.1.10"
106 endIp: "20.20.1.10"
/ohos5.0/foundation/communication/netmanager_ext/services/netfirewallmanager/include/
H A Dnetfirewall_db_helper.h79 in_addr endIp; member
83 in6_addr endIp; member
/ohos5.0/foundation/communication/dhcp/services/dhcp_server/include/
H A Daddress_utils.h35 int IpInRange(uint32_t ip, uint32_t beginIp, uint32_t endIp, uint32_t netmask);
/ohos5.0/foundation/communication/netmanager_base/interfaces/innerkits/netmanagernative/include/
H A Dnetfirewall_parcel.h129 in_addr endIp; member
133 in6_addr endIp; member
/ohos5.0/foundation/communication/dhcp/test/fuzztest/addressutils_fuzzer/
H A Daddressutils_fuzzer.cpp83 uint32_t endIp = static_cast<uint32_t>(data[index++]); in IpInRangeTest() local
85 IpInRange(ip, beginIp, endIp, netmask); in IpInRangeTest()
/ohos5.0/docs/zh-cn/application-dev/reference/apis-network-kit/
H A Djs-apis-net-netfirewall-sys.md186 endIp: "10.20.1.10"
198 endIp: "20.20.1.10"
332 endIp: "10.20.1.10"
653 | endIp | string | 否 | 结束IP: 当类型等于2时有效,否则将被忽略。 |
/ohos5.0/foundation/communication/netmanager_ext/frameworks/js/napi/netfirewall/include/context/
H A Dnet_firewall_param_check.h80 …static bool CheckIpAddress(const std::string &startIp, const std::string &endIp, const int32_t fam…
/ohos5.0/foundation/communication/netmanager_base/services/netmanagernative/bpf/src/
H A Dbitmap_manager.cpp191 int32_t ret = IpParamParser::GetIp4AndMask(item.ipv4.startIp, item.ipv4.endIp, ips); in InsertIp4SegBitmap()
216 int32_t ret = IpParamParser::GetIp6AndMask(item.ipv6.startIp, item.ipv6.endIp, ips); in InsertIp6SegBitmap()
414 int32_t IpParamParser::GetMask(uint32_t startIp, uint32_t endIp) in GetMask() argument
418 if (((startIp >> i) & VALUE_ONE) != ((endIp >> i) & VALUE_ONE)) { in GetMask()
/ohos5.0/foundation/communication/dhcp/services/dhcp_server/etc/
H A Ddhcpd.conf.sample31 # Address Range: {beginIp},{endIp}
/ohos5.0/foundation/communication/netmanager_ext/services/networksharemanager/include/
H A Dnetworkshare_sub_statemachine.h122 bool CheckConfig(std::string &endIp, std::string &mask);
/ohos5.0/docs/en/application-dev/network/
H A Dnet-netfirewall.md94 endIp: "10.20.1.10"
106 endIp: "20.20.1.10"
/ohos5.0/docs/en/application-dev/reference/apis-network-kit/
H A Djs-apis-net-netfirewall-sys.md186 endIp: "10.20.1.10"
198 endIp: "20.20.1.10"
332 endIp: "10.20.1.10"
653 | endIp | string | No| End IP address: This parameter is valid only when **type** is set to *…
/ohos5.0/foundation/communication/netmanager_ext/test/netfirewallmanager/unittest/netfirewallmanager_test/
H A Dnetfirewall_client_test.cpp92 inet_pton(AF_INET, ss.str().c_str(), &localParam.ipv4.endIp); in GetIpList()
95 inet_pton(AF_INET6, ss.str().c_str(), &localParam.ipv6.endIp); in GetIpList()
/ohos5.0/foundation/communication/netmanager_base/services/netmanagernative/bpf/include/
H A Dbitmap_manager.h226 static int32_t GetMask(uint32_t startIp, uint32_t endIp);