Home
last modified time | relevance | path

Searched refs:startIp (Results 1 - 23 of 23) sorted by relevance

/foundation/communication/netmanager_ext/services/netfirewallmanager/src/
H A Dnetfirewall_default_rule_parser.cpp164 inet_pton(AF_INET, tmp.c_str(), &rule.ipv4.startIp); in ConvertIpParamToConfig()
166 inet_pton(AF_INET6, tmp.c_str(), &rule.ipv6.startIp); in ConvertIpParamToConfig()
176 cJSON *startIp = cJSON_GetObjectItem(mem, NET_FIREWALL_IP_START.c_str()); in ConvertIpParamToConfig() local
177 if (startIp != nullptr && cJSON_IsString(startIp)) { in ConvertIpParamToConfig()
178 tmp = cJSON_GetStringValue(startIp); in ConvertIpParamToConfig()
180 inet_pton(AF_INET, tmp.c_str(), &rule.ipv4.startIp); in ConvertIpParamToConfig()
182 inet_pton(AF_INET6, tmp.c_str(), &rule.ipv6.startIp); in ConvertIpParamToConfig()
H A Dnetfirewall_db_helper.cpp913 memcpy_s(&dbip.ipv4.startIp, sizeof(uint32_t), &param.ipv4.startIp, sizeof(uint32_t)); in FirewallIpToDbIp()
916 memcpy_s(&dbip.ipv6.startIp, sizeof(in6_addr), &param.ipv6.startIp, sizeof(in6_addr)); in FirewallIpToDbIp()
931 memcpy_s(&dbip.ipv4.startIp, sizeof(uint32_t), &param.ipv4.startIp, sizeof(uint32_t)); in DbIpToFirewallIp()
934 memcpy_s(&dbip.ipv6.startIp, sizeof(in6_addr), &param.ipv6.startIp, sizeof(in6_addr)); in DbIpToFirewallIp()
/foundation/communication/netmanager_ext/frameworks/js/napi/netfirewall/src/context/
H A Dnet_firewall_rule_parse.cpp48 std::string startIp; in ParseIpList() local
52 startIp = NapiUtils::GetStringPropertyUtf8(env, valAttr, NET_FIREWALL_IP_ADDRESS); in ParseIpList()
58 startIp = NapiUtils::GetStringPropertyUtf8(env, valAttr, NET_FIREWALL_IP_START); in ParseIpList()
62 inet_pton(AF_INET, startIp.c_str(), &param.ipv4.startIp); in ParseIpList()
67 inet_pton(AF_INET6, startIp.c_str(), &param.ipv6.startIp); in ParseIpList()
H A Dnet_firewall_param_check.cpp163 bool NetFirewallParamCheck::CheckIpAddress(const std::string &startIp, const std::string &endIp, const int32_t family) in CheckIpAddress() argument
171 ret = inet_pton(AF_INET6, startIp.c_str(), &in6_addr1); in CheckIpAddress()
174 NETMANAGER_EXT_LOGE("CheckIpAddress ipv6: startIp or endIp is invalid"); in CheckIpAddress()
188 ret = inet_pton(AF_INET, startIp.c_str(), &inAddr1); in CheckIpAddress()
191 NETMANAGER_EXT_LOGE("CheckIpAddress ipv4: startIp or endIp is invalid"); in CheckIpAddress()
260 NETMANAGER_EXT_LOGE("params ip type2 but no startIp or endIp"); in CheckMultipleIp()
267 std::string startIp = in CheckMultipleIp() local
271 if (CheckIpAddress(startIp, endIp, family)) { in CheckMultipleIp()
/foundation/communication/netmanager_base/frameworks/native/netmanagernative/
H A Dnetfirewall_parcel.cpp37 parcel.WriteUint32(ipv4.startIp.s_addr); in Marshalling()
44 parcel.WriteUint8(ipv6.startIp.s6_addr[index]); in Marshalling()
66 parcel.ReadUint32(ptr->ipv4.startIp.s_addr); in Unmarshalling()
73 parcel.ReadUint8(ptr->ipv6.startIp.s6_addr[index]); in Unmarshalling()
107 inet_ntop(AF_INET, &(this->ipv4.startIp), ip, INET_ADDRSTRLEN); in GetStartIp()
109 inet_ntop(AF_INET6, &(this->ipv6.startIp), ip, INET6_ADDRSTRLEN); in GetStartIp()
/foundation/communication/netmanager_base/services/netmanagernative/bpf/src/
H A Dbitmap_manager.cpp187 uint32_t ipInt = item.ipv4.startIp.s_addr; in InsertIp4SegBitmap()
193 int32_t ret = IpParamParser::GetIp4AndMask(item.ipv4.startIp, item.ipv4.endIp, ips); in InsertIp4SegBitmap()
212 ip6Map->OrInsert(item.ipv6.startIp, static_cast<uint32_t>(item.mask), bitmap); in InsertIp6SegBitmap()
213 std::string addrStr = IpParamParser::Addr6ToStr(item.ipv6.startIp); in InsertIp6SegBitmap()
218 int32_t ret = IpParamParser::GetIp6AndMask(item.ipv6.startIp, item.ipv6.endIp, ips); in InsertIp6SegBitmap()
416 uint32_t IpParamParser::GetMask(uint32_t startIp, uint32_t endIp) in GetMask() argument
420 if (((startIp >> i) & VALUE_ONE) != ((endIp >> i) & VALUE_ONE)) { in GetMask()
/foundation/communication/netmanager_base/test/netconnmanager/unittest/net_conn_add_test/
H A Dnetfirewall_rule_native_helper_test.cpp71 &param.ipv4.startIp); in HWTEST_F()
H A Dnetfirewall_rule_manager_test.cpp52 inet_pton(AF_INET, "192.168.9.6", &localParam.ipv4.startIp); in GetNetFirewallRuleSptr()
H A Dnetfirewall_service_test.cpp75 inet_pton(AF_INET, (addressStart + std::to_string(i)).c_str(), &localParam.ipv4.startIp); in GetIpList()
H A Dnetfirewall_client_test.cpp81 inet_pton(AF_INET, ss.str().c_str(), &localParam.ipv4.startIp); in GetIpList()
84 inet_pton(AF_INET6, ss.str().c_str(), &localParam.ipv6.startIp); in GetIpList()
H A Dnetfirewall_service_stub_test.cpp54 inet_pton(AF_INET, ss.str().c_str(), &localParam.ipv4.startIp); in GetIpList()
/foundation/communication/netmanager_ext/frameworks/js/napi/netfirewall/include/context/
H A Dnet_firewall_param_check.h75 * @param startIp Starting IP
80 static bool CheckIpAddress(const std::string &startIp, const std::string &endIp, const int32_t family);
/foundation/communication/netmanager_ext/test/netfirewallmanager/unittest/netfirewallmanager_test/
H A Dnetfirewall_rule_native_helper_test.cpp74 &param.ipv4.startIp); in HWTEST_F()
H A Dnetfirewall_service_proxy_test.cpp72 inet_pton(AF_INET, "192.168.10.1", &localParam.ipv4.startIp); in GetNetFirewallRuleSptr()
79 inet_pton(AF_INET6, "fe80::6bec:e9b9:a1df:f69d", &localParam.ipv6.startIp); in GetNetFirewallRuleSptr()
H A Dnetfirewall_rule_manager_test.cpp52 inet_pton(AF_INET, "192.168.9.6", &localParam.ipv4.startIp); in GetNetFirewallRuleSptr()
H A Dnetfirewall_client_test.cpp81 inet_pton(AF_INET, ss.str().c_str(), &localParam.ipv4.startIp); in GetIpList()
84 inet_pton(AF_INET6, ss.str().c_str(), &localParam.ipv6.startIp); in GetIpList()
H A Dnetfirewall_service_stub_test.cpp54 inet_pton(AF_INET, ss.str().c_str(), &localParam.ipv4.startIp); in GetIpList()
H A Dnetfirewall_service_test.cpp79 inet_pton(AF_INET, (addressStart + std::to_string(i)).c_str(), &localParam.ipv4.startIp); in GetIpList()
799 std::string jsonString = "\"family\": 1,\"type\": 1,\"address\": \"192.168.1.2\",\"mask\": 32,\"startIp\": " in HWTEST_F()
/foundation/communication/netmanager_base/interfaces/innerkits/netmanagernative/include/
H A Dnetfirewall_parcel.h67 const std::string NET_FIREWALL_IP_START = "startIp";
128 in_addr startIp; // Store IP for single IP, and store starting IP for IP end member
132 in6_addr startIp; // Store IP for single IP, and store starting IP for IP end member
/foundation/communication/netmanager_ext/services/netfirewallmanager/include/
H A Dnetfirewall_db_helper.h78 in_addr startIp; member
82 in6_addr startIp; member
/foundation/communication/netmanager_base/test/netmanagernative/unittest/netsys_netfirewall_test/
H A Dnetsys_netfirewall_test.cpp52 inet_pton(AF_INET, addr.c_str(), &remoteIpParam.ipv4.startIp); in GeIpFirewallRule()
/foundation/communication/netmanager_ext/services/networksharemanager/src/
H A Dnetworkshare_sub_statemachine.cpp774 std::string startIp = std::to_string(atoi(ipEnd.c_str()) + 1); in StartDhcp() local
776 std::string strStartip = ipHead + "." + startIp; in StartDhcp()
/foundation/communication/netmanager_base/services/netmanagernative/bpf/include/
H A Dbitmap_manager.h217 * get biggest mask from startIp and endIp
219 * @param startIp start ip
224 static uint32_t GetMask(uint32_t startIp, uint32_t endIp);

Completed in 20 milliseconds