/ohos5.0/foundation/communication/dhcp/test/unittest/services/dhcp_server/unittest/ |
H A D | address_utils_test.cpp | 155 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 D | dhcp_s_server_test.cpp | 77 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 D | dhcp_address_pool_test.cpp | 55 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 D | netfirewall_default_rule_parser.cpp | 187 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 D | netfirewall_db_helper.cpp | 914 memcpy_s(&dbip.ipv4.endIp, sizeof(uint32_t), ¶m.ipv4.endIp, sizeof(uint32_t)); in FirewallIpToDbIp() 917 memcpy_s(&dbip.ipv6.endIp, sizeof(in6_addr), ¶m.ipv6.endIp, sizeof(in6_addr)); in FirewallIpToDbIp() 932 memcpy_s(&dbip.ipv4.endIp, sizeof(uint32_t), ¶m.ipv4.endIp, sizeof(uint32_t)); in DbIpToFirewallIp() 935 memcpy_s(&dbip.ipv6.endIp, sizeof(in6_addr), ¶m.ipv6.endIp, sizeof(in6_addr)); in DbIpToFirewallIp()
|
/ohos5.0/foundation/communication/netmanager_ext/frameworks/js/napi/netfirewall/src/context/ |
H A D | net_firewall_rule_parse.cpp | 49 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(), ¶m.ipv4.endIp); in ParseIpList() 69 inet_pton(AF_INET6, endIp.c_str(), ¶m.ipv6.endIp); in ParseIpList()
|
H A D | net_firewall_param_check.cpp | 163 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 D | netfirewall_parcel.cpp | 36 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 D | address_utils.cpp | 104 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 D | dhcp_address_pool.cpp | 139 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 D | networkshare_sub_statemachine.cpp | 717 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 D | net-netfirewall.md | 94 endIp: "10.20.1.10" 106 endIp: "20.20.1.10"
|
/ohos5.0/foundation/communication/netmanager_ext/services/netfirewallmanager/include/ |
H A D | netfirewall_db_helper.h | 79 in_addr endIp; member 83 in6_addr endIp; member
|
/ohos5.0/foundation/communication/dhcp/services/dhcp_server/include/ |
H A D | address_utils.h | 35 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 D | netfirewall_parcel.h | 129 in_addr endIp; member 133 in6_addr endIp; member
|
/ohos5.0/foundation/communication/dhcp/test/fuzztest/addressutils_fuzzer/ |
H A D | addressutils_fuzzer.cpp | 83 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 D | js-apis-net-netfirewall-sys.md | 186 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 D | net_firewall_param_check.h | 80 …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 D | bitmap_manager.cpp | 191 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 D | dhcpd.conf.sample | 31 # Address Range: {beginIp},{endIp}
|
/ohos5.0/foundation/communication/netmanager_ext/services/networksharemanager/include/ |
H A D | networkshare_sub_statemachine.h | 122 bool CheckConfig(std::string &endIp, std::string &mask);
|
/ohos5.0/docs/en/application-dev/network/ |
H A D | net-netfirewall.md | 94 endIp: "10.20.1.10" 106 endIp: "20.20.1.10"
|
/ohos5.0/docs/en/application-dev/reference/apis-network-kit/ |
H A D | js-apis-net-netfirewall-sys.md | 186 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 D | netfirewall_client_test.cpp | 92 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 D | bitmap_manager.h | 226 static int32_t GetMask(uint32_t startIp, uint32_t endIp);
|