Home
last modified time | relevance | path

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

123456

/ohos5.0/foundation/communication/wifi/wifi/test/wifi_standard/wifi_framework/wifi_manage/wifi_ap/Mock/
H A Dmock_network_interface.cpp21 bool IsValidInterfaceName(const std::string &interfaceName) in IsValidInterfaceName() argument
23 return MockNetworkInterface::GetInstance().IsValidInterfaceName(interfaceName); in IsValidInterfaceName()
26 bool IsInterfaceUp(const std::string &interfaceName) in IsInterfaceUp() argument
28 return MockNetworkInterface::GetInstance().IsInterfaceUp(interfaceName); in IsInterfaceUp()
31 void Dump(const std::string &interfaceName) in Dump() argument
33 MockNetworkInterface::GetInstance().Dump(interfaceName); in Dump()
42 bool GetIpv4Address(const std::string &interfaceName, Ipv4Address &IPv4) in GetIpv4Address() argument
57 bool AddIpAddress(const std::string &interfaceName, const BaseAddress &IpAddress) in AddIpAddress() argument
62 bool DelIpAddress(const std::string &interfaceName, const BaseAddress &IpAddress) in DelIpAddress() argument
67 bool ClearAllIpAddress(const std::string &interfaceName) in ClearAllIpAddress() argument
[all …]
H A Dmock_network_interface.h31 MOCK_METHOD1(IsValidInterfaceName, bool(const std::string &interfaceName));
32 MOCK_METHOD1(IsInterfaceUp, bool(const std::string &interfaceName));
33 MOCK_METHOD1(Dump, void(const std::string &interfaceName));
36 …bool(const std::string &interfaceName, MacAddress &Mac, Ipv4Address &IPv4, std::vector<Ipv6Address…
37 MOCK_METHOD2(GetIpv4Address, bool(const std::string &interfaceName, Ipv4Address &IPv4));
38 …MOCK_METHOD2(GetAllIpv6Address, bool(const std::string &interfaceName, std::vector<Ipv6Address> &v…
39 …MOCK_METHOD2(IsExistAddressForInterface, bool(const std::string &interfaceName, const BaseAddress …
40 … MOCK_METHOD2(AddIpAddress, bool(const std::string &interfaceName, const BaseAddress &IpAddress));
41 … MOCK_METHOD2(DelIpAddress, bool(const std::string &interfaceName, const BaseAddress &IpAddress));
42 MOCK_METHOD1(ClearAllIpAddress, bool(const std::string &interfaceName));
[all …]
/ohos5.0/foundation/communication/wifi/wifi/services/wifi_standard/wifi_framework/wifi_toolkit/net_helper/
H A Dnetwork_interface.cpp39 size_t len = interfaceName.length(); in IsValidInterfaceName()
44 if (!isalnum(interfaceName[0])) { in IsValidInterfaceName()
49 char ch = interfaceName[i]; in IsValidInterfaceName()
85 if (!FetchIpAddress(interfaceName, vecIPv4, vecIPv6)) { in FetchInterfaceConfig()
150 interfaceName.c_str(), in AddIpAddress()
157 interfaceName.c_str(), in AddIpAddress()
173 interfaceName.c_str(), in DelIpAddress()
179 interfaceName.c_str(), in DelIpAddress()
195 ret &= DelIpAddress(interfaceName, ip4); in ClearAllIpAddress()
198 ret &= DelIpAddress(interfaceName, ip6); in ClearAllIpAddress()
[all …]
H A Dnetwork_interface.h36 bool IsValidInterfaceName(const std::string &interfaceName);
44 void Dump(const std::string &interfaceName);
55 …const std::string &interfaceName, std::vector<Ipv4Address> &vecIPv4, std::vector<Ipv6Address> &vec…
66 bool GetIpv4Address(const std::string &interfaceName, std::vector<Ipv4Address> &ipv4);
76 bool GetAllIpv6Address(const std::string &interfaceName, std::vector<Ipv6Address> &vecIPv6);
85 bool IsExistAddressForInterface(const std::string &interfaceName, const BaseAddress &address);
94 bool AddIpAddress(const std::string &interfaceName, const BaseAddress &ipAddress);
104 bool DelIpAddress(const std::string &interfaceName, const BaseAddress &ipAddress);
113 bool ClearAllIpAddress(const std::string &interfaceName);
124 …const std::string &interfaceName, std::vector<Ipv4Address> &vecipv4, std::vector<Ipv6Address> &vec…
[all …]
/ohos5.0/foundation/communication/netmanager_base/test/netmanagernative/unittest/netsys_manager_test/
H A Dphysical_network_test.cpp92 std::string interfaceName = "test"; variable
95 interfaceName = "wlan0";
98 interfaceName = "wlan1";
111 std::string interfaceName = "wlan0"; variable
120 std::string interfaceName = "wlan0"; variable
128 std::string interfaceName = "test"; variable
131 interfaceName = "wlan0";
134 interfaceName = "wlan1";
142 std::string interfaceName = "wlan0"; variable
152 std::string interfaceName = "wlan0"; variable
[all …]
H A Dinterface_manager_test.cpp53 std::string interfaceName = "IfaceNameIsExtMax16"; variable
54 ret = InterfaceManager::GetMtu(interfaceName.data());
61 std::string interfaceName; variable
69 std::string interfaceName = "eth0"; variable
76 std::string interfaceName = "eth0"; variable
102 std::string interfaceName = "eth0"; variable
124 std::string interfaceName = "eth0"; variable
138 std::string interfaceName = "eth"; variable
147 std::string interfaceName = "eth"; variable
155 std::string interfaceName = "eth0"; variable
[all …]
H A Dlocal_network_test.cpp51 std::string interfaceName = "waln0"; variable
52 int32_t ret = localNetwork.AddInterface(interfaceName);
54 localNetwork.interfaces_.insert(interfaceName);
55 ret = localNetwork.AddInterface(interfaceName);
57 ret = localNetwork.RemoveInterface(interfaceName);
60 ret = localNetwork.RemoveInterface(interfaceName);
/ohos5.0/foundation/communication/netmanager_base/services/netmanagernative/include/manager/
H A Droute_manager.h91 static int32_t RemoveRoute(TableType tableType, const std::string &interfaceName,
103 static int32_t UpdateRoute(TableType tableType, const std::string &interfaceName,
182 static int32_t AddUsersToVirtualNetwork(int32_t netId, const std::string &interfaceName,
195 static int32_t AddInterfaceToLocalNetwork(uint16_t netId, const std::string &interfaceName);
261 static int32_t RemoveClatTunInterface(const std::string &interfaceName);
289 static int32_t ClearRoutes(const std::string &interfaceName, int32_t netId = 0);
293 static int32_t UpdateVirtualNetwork(int32_t netId, const std::string &interfaceName,
298 static int32_t UpdateIncomingPacketMark(uint16_t netId, const std::string &interfaceName,
305 static int32_t UpdateVpnOutputToLocalRule(const std::string &interfaceName, bool add);
324 static int32_t SetRouteInfo(TableType tableType, const std::string &interfaceName,
[all …]
H A Dinterface_manager.h40 static int SetMtu(const char *interfaceName, const char *mtuValue);
48 static int GetMtu(const char *interfaceName);
58 static int AddAddress(const char *interfaceName, const char *addr, int prefixLen);
68 static int DelAddress(const char *interfaceName, const char *addr, int prefixLen);
79 static int DelAddress(const char *interfaceName, const char *addr, int prefixLen,
127 …static int ModifyAddress(uint32_t action, const char *interfaceName, const char *addr, int prefixL…
/ohos5.0/foundation/communication/netmanager_base/services/netmanagernative/src/netsys/
H A Dlocal_network.cpp27 int32_t LocalNetwork::AddInterface(std::string &interfaceName) in AddInterface() argument
29 NETNATIVE_LOGI("Entry LocalNetwork::AddInterface %{public}s", interfaceName.c_str()); in AddInterface()
30 if (ExistInterface(interfaceName)) { in AddInterface()
34 if (RouteManager::AddInterfaceToLocalNetwork(netId_, interfaceName) != 0) { in AddInterface()
35 …NETNATIVE_LOGE("Failed to add interface %{public}s to netId_ %{public}u", interfaceName.c_str(), n… in AddInterface()
39 interfaces_.insert(interfaceName); in AddInterface()
43 int32_t LocalNetwork::RemoveInterface(std::string &interfaceName) in RemoveInterface() argument
45 NETNATIVE_LOGI("Entry LocalNetwork::RemoveInterface %{public}s", interfaceName.c_str()); in RemoveInterface()
46 if (!ExistInterface(interfaceName)) { in RemoveInterface()
50 if (RouteManager::RemoveInterfaceFromLocalNetwork(netId_, interfaceName) != 0) { in RemoveInterface()
[all …]
H A Dphysical_network.cpp51 int32_t PhysicalNetwork::AddInterface(std::string &interfaceName) in AddInterface() argument
53 NETNATIVE_LOGI("AddInterface %{public}s", interfaceName.c_str()); in AddInterface()
54 if (ExistInterface(interfaceName)) { in AddInterface()
58 if (RouteManager::AddInterfaceToPhysicalNetwork(netId_, interfaceName, permission_) != 0) { in AddInterface()
64 RouteManager::AddInterfaceToDefaultNetwork(interfaceName, permission_); in AddInterface()
67 interfaces_.insert(interfaceName); in AddInterface()
72 int32_t PhysicalNetwork::RemoveInterface(std::string &interfaceName) in RemoveInterface() argument
74 NETNATIVE_LOGI("RemoveInterface %{public}s", interfaceName.c_str()); in RemoveInterface()
75 if (!ExistInterface(interfaceName)) { in RemoveInterface()
80 RouteManager::RemoveInterfaceFromDefaultNetwork(interfaceName, permission_); in RemoveInterface()
[all …]
H A Dvirtual_network.cpp69 int32_t VirtualNetwork::AddInterface(std::string &interfaceName) in AddInterface() argument
71 NETNATIVE_LOGI("Entry VirtualNetwork::AddInterface %{public}s", interfaceName.c_str()); in AddInterface()
72 if (ExistInterface(interfaceName)) { in AddInterface()
73 …NETNATIVE_LOGW("Failed to add interface %{public}s to netId_ %{public}u", interfaceName.c_str(), n… in AddInterface()
82 if (RouteManager::AddInterfaceToVirtualNetwork(netId_, interfaceName)) { in AddInterface()
88 interfaces_.insert(interfaceName); in AddInterface()
92 int32_t VirtualNetwork::RemoveInterface(std::string &interfaceName) in RemoveInterface() argument
94 NETNATIVE_LOGI("Entry VirtualNetwork::RemoveInterface %{public}s", interfaceName.c_str()); in RemoveInterface()
95 if (!ExistInterface(interfaceName)) { in RemoveInterface()
100 if (RouteManager::RemoveInterfaceFromVirtualNetwork(netId_, interfaceName)) { in RemoveInterface()
[all …]
/ohos5.0/foundation/communication/netmanager_base/services/netmanagernative/src/manager/
H A Droute_manager.cpp106 routeInfo.routeInterfaceName = interfaceName; in UpdateVnicRoute()
235 if (int32_t ret = ClearSharingRules(interfaceName)) { in RemoveInterfaceFromPhysicalNetwork()
291 if (interfaceName.find("vpn") == std::string::npos) { in UpdateVpnOutputToLocalRule()
292 ruleInfo.ruleIif = interfaceName; in UpdateVpnOutputToLocalRule()
458 interfaceToTable_.erase(interfaceName); in RemoveInterfaceFromLocalNetwork()
545 if (int32_t ret = ClearRoutes(interfaceName)) { in RemoveClatTunInterface()
633 interfaceToTable_.erase(interfaceName); in ClearRoutes()
761 ruleInfo.ruleOif = interfaceName; in UpdateOutputInterfaceRules()
972 auto iter = interfaceToTable_.find(interfaceName); in FindTableByInterfacename()
983 interfaceToTable_[interfaceName] = table; in FindTableByInterfacename()
[all …]
H A Dconn_manager.cpp98 std::string interfaceName; in CreatePhysicalNetwork() local
101 interfaceName = physicalInterfaceName_[netId]; in CreatePhysicalNetwork()
103 RemoveInterfaceFromNetwork(netId, interfaceName); in CreatePhysicalNetwork()
211 networks_.Iterate([&InterfaceId, &interfaceName, isInternalNetId] in GetNetworkForInterface()
220 if (NetsysNetworkPtr->ExistInterface(interfaceName)) { in GetNetworkForInterface()
234 netId, interfaceName.c_str(), netBearerType); in AddInterfaceToNetwork()
257 interfaceName.c_str()); in AddInterfaceToNetwork()
263 physicalInterfaceName_[netId] = interfaceName; in AddInterfaceToNetwork()
265 return nw->AddInterface(interfaceName); in AddInterfaceToNetwork()
279 int32_t ret = nw->RemoveInterface(interfaceName); in RemoveInterfaceFromNetwork()
[all …]
H A Dinterface_manager.cpp78 int InterfaceManager::GetMtu(const char *interfaceName) in GetMtu() argument
80 if (interfaceName == nullptr) { in GetMtu()
85 if (!CheckIfaceName(interfaceName)) { in GetMtu()
115 int InterfaceManager::SetMtu(const char *interfaceName, const char *mtuValue) in SetMtu() argument
117 if (interfaceName == nullptr || mtuValue == nullptr) { in SetMtu()
122 if (!CheckIfaceName(interfaceName)) { in SetMtu()
136 if (strncpy_s(ifr.ifr_name, IFNAMSIZ, interfaceName, strlen(interfaceName)) != EOK) { in SetMtu()
180 if (interfaceName == nullptr || addr == nullptr) { in ModifyAddress()
183 uint32_t index = if_nametoindex(interfaceName); in ModifyAddress()
226 return ModifyAddress(RTM_NEWADDR, interfaceName, addr, prefixLen); in AddAddress()
[all …]
/ohos5.0/drivers/hdf_core/adapter/uhdf2/hdi/src/
H A Dhdi_support.cpp49 static std::string TransFileName(const std::string &interfaceName) in TransFileName() argument
51 if (interfaceName.empty()) { in TransFileName()
52 return interfaceName; in TransFileName()
56 for (size_t i = 0; i < interfaceName.size(); i++) { in TransFileName()
57 char c = interfaceName[i]; in TransFileName()
111 std::string interfaceName = result[INTERFACE_NAME_INDEX]; in ParseInterface() local
113 interface = interfaceName[0] == 'I' ? interfaceName.substr(1) : interfaceName; in ParseInterface()
138 std::string interfaceName; in LoadHdiImpl() local
157 std::string symName = interfaceName + "ImplGetInstance"; in LoadHdiImpl()
164 std::string desSymName = interfaceName + "ImplRelease"; in LoadHdiImpl()
[all …]
H A Dobject_collector.cpp32 bool ObjectCollector::ConstructorRegister(const std::u16string &interfaceName, const Constructor &c… in ConstructorRegister() argument
34 if (interfaceName.empty()) { in ConstructorRegister()
38 constructorMapper_.emplace(interfaceName, std::move(constructor)); in ConstructorRegister()
42 void ObjectCollector::ConstructorUnRegister(const std::u16string &interfaceName) in ConstructorUnRegister() argument
45 constructorMapper_.erase(interfaceName); in ConstructorUnRegister()
49 const OHOS::sptr<HdiBase> &interface, const std::u16string &interfaceName) in NewObjectLocked() argument
54 auto constructor = constructorMapper_.find(interfaceName); in NewObjectLocked()
63 const OHOS::sptr<HdiBase> &interface, const std::u16string &interfaceName) in NewObject() argument
66 return NewObjectLocked(interface, interfaceName); in NewObject()
70 const OHOS::sptr<HdiBase> &interface, const std::u16string &interfaceName) in GetOrNewObject() argument
[all …]
/ohos5.0/foundation/communication/netmanager_base/frameworks/native/netstatsclient/src/
H A Ddata_flow_statistics.cpp52 int64_t DataFlowStatistics::GetIfaceRxBytes(const std::string &interfaceName) in GetIfaceRxBytes() argument
54 return NetsysController::GetInstance().GetIfaceRxBytes(interfaceName); in GetIfaceRxBytes()
57 int64_t DataFlowStatistics::GetIfaceTxBytes(const std::string &interfaceName) in GetIfaceTxBytes() argument
59 return NetsysController::GetInstance().GetIfaceTxBytes(interfaceName); in GetIfaceTxBytes()
62 int64_t DataFlowStatistics::GetIfaceRxPackets(const std::string &interfaceName) in GetIfaceRxPackets() argument
64 return NetsysController::GetInstance().GetIfaceRxPackets(interfaceName); in GetIfaceRxPackets()
67 int64_t DataFlowStatistics::GetIfaceTxPackets(const std::string &interfaceName) in GetIfaceTxPackets() argument
69 return NetsysController::GetInstance().GetIfaceTxPackets(interfaceName); in GetIfaceTxPackets()
/ohos5.0/foundation/communication/netmanager_base/services/netsyscontroller/src/
H A Dmock_netsys_native_client.cpp360 static int64_t GetUidOnIfaceBytes(uint32_t uid, const std::string &interfaceName) in GetUidOnIfaceBytes() argument
370 "iface name is [%{public}s]", uid, interfaceName.c_str()); in GetUidOnIfaceRxBytes()
371 return GetUidOnIfaceBytes(uid, interfaceName); in GetUidOnIfaceRxBytes()
377 "iface name is [%{public}s]", uid, interfaceName.c_str()); in GetUidOnIfaceTxBytes()
378 return GetUidOnIfaceBytes(uid, interfaceName); in GetUidOnIfaceTxBytes()
389 if (interfaceName == *iter) { in GetIfaceBytes()
398 int64_t MockNetsysNativeClient::GetIfaceRxBytes(const std::string &interfaceName) in GetIfaceRxBytes() argument
404 return GetIfaceBytes(interfaceName, NET_STATS_FILE_RX_BYTES.c_str()); in GetIfaceRxBytes()
413 return GetIfaceBytes(interfaceName, NET_STATS_FILE_TX_BYTES.c_str()); in GetIfaceTxBytes()
422 return GetIfaceBytes(interfaceName, NET_STATS_FILE_RX_PACKETS.c_str()); in GetIfaceRxPackets()
[all …]
H A Dnetsys_controller_service_impl.cpp348 return netsysClient_.GetUidOnIfaceRxBytes(uid, interfaceName); in GetUidOnIfaceRxBytes()
357 return netsysClient_.GetUidOnIfaceTxBytes(uid, interfaceName); in GetUidOnIfaceTxBytes()
364 return mockNetsysClient_.GetIfaceRxBytes(interfaceName); in GetIfaceRxBytes()
366 return netsysClient_.GetIfaceRxBytes(interfaceName); in GetIfaceRxBytes()
373 return mockNetsysClient_.GetIfaceTxBytes(interfaceName); in GetIfaceTxBytes()
375 return netsysClient_.GetIfaceTxBytes(interfaceName); in GetIfaceTxBytes()
400 return mockNetsysClient_.GetIfaceRxPackets(interfaceName); in GetIfaceRxPackets()
402 return netsysClient_.GetIfaceRxPackets(interfaceName); in GetIfaceRxPackets()
411 return netsysClient_.GetIfaceTxPackets(interfaceName); in GetIfaceTxPackets()
856 return netsysClient_.SetEnableIpv6(interfaceName, on); in SetEnableIpv6()
[all …]
/ohos5.0/foundation/graphic/graphic_2d/rosen/test/render_service/render_service_base/unittest/memory/
H A Drs_interface_code_access_verifier_base_test.cpp121 CodeUnderlyingType interfaceName = 1.0; variable
123 auto permissions = verifier->GetPermissions(interfaceName);
138 CodeUnderlyingType interfaceName = 1.0; variable
140 auto permissions = verifier->GetPermissions(interfaceName);
182 CodeUnderlyingType interfaceName = 1.0; variable
185 ASSERT_EQ(verifier->AddPermission(interfaceName, newPermission), true);
196 CodeUnderlyingType interfaceName = 1.0; variable
199 auto ret = verifier->GetPermissions(interfaceName);
201 verifier->AddPermission(interfaceName, newPermission);
202 ret = verifier->GetPermissions(interfaceName);
/ohos5.0/foundation/graphic/graphic_2d/rosen/modules/render_service/core/transaction/
H A Drs_irender_service_ipc_interface_code_access_verifier.cpp46 CodeEnumType interfaceName = mapping.first; in AddRSIRenderServiceInterfaceCodePermission() local
52 CodeUnderlyingType code = static_cast<CodeUnderlyingType>(interfaceName); in AddRSIRenderServiceInterfaceCodePermission()
60 auto interfaceName = static_cast<CodeEnumType>(code); in IsAccessTimesVerificationPassed() local
61 if (accessRSIRenderServiceInterfaceTimesRestrictions_.count(interfaceName) == 0) { in IsAccessTimesVerificationPassed()
64 uint32_t restrictedTimes = accessRSIRenderServiceInterfaceTimesRestrictions_.at(interfaceName); in IsAccessTimesVerificationPassed()
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/animation/
H A Danimation_pub.cpp28 const char* GetAnimationInterfaceName(AnimationInterface interfaceName) in GetAnimationInterfaceName() argument
30 if (interfaceName < AnimationInterface::ANIMATION in GetAnimationInterfaceName()
31 || interfaceName > AnimationInterface::KEYFRAME_ANIMATE_TO) { in GetAnimationInterfaceName()
34 return g_animationInterfaceNames[static_cast<int32_t>(interfaceName)]; in GetAnimationInterfaceName()
/ohos5.0/foundation/deviceprofile/device_info_manager/services/core/src/permissionmanager/
H A Dpermission_manager.cpp134 bool PermissionManager::CheckInterfacePermission(const std::string& interfaceName) in CheckInterfacePermission() argument
140 permittedProcNames = permissionMap_[interfaceName]; in CheckInterfacePermission()
143 …HILOGI("success interface %{public}s callProc %{public}s!", interfaceName.c_str(), callProcName.c_… in CheckInterfacePermission()
147 bool PermissionManager::IsCallerTrust(const std::string& interfaceName) in IsCallerTrust() argument
163 if (!CheckInterfacePermission(interfaceName)) { in IsCallerTrust()
164 …HILOGE("This caller cannot call this interface, interfaceName: %{public}s", interfaceName.c_str()); in IsCallerTrust()
242 …ssionManager::SetPermissionMap(const cJSON* const permissionJson, const std::string& interfaceName) in SetPermissionMap() argument
244 cJSON* item = cJSON_GetObjectItem(permissionJson, interfaceName.c_str()); in SetPermissionMap()
247 HILOGE("PermissionJson not contains the key, %{public}s!", interfaceName.c_str()); in SetPermissionMap()
260 permissionMap_[interfaceName] = interfaceNameSets; in SetPermissionMap()
/ohos5.0/foundation/communication/netmanager_base/services/netsyscontroller/include/
H A Dmock_netsys_native_client.h298 int64_t GetUidOnIfaceRxBytes(uint32_t uid, const std::string &interfaceName);
307 int64_t GetUidOnIfaceTxBytes(uint32_t uid, const std::string &interfaceName);
315 int64_t GetIfaceRxBytes(const std::string &interfaceName);
323 int64_t GetIfaceTxBytes(const std::string &interfaceName);
345 int64_t GetIfaceRxPackets(const std::string &interfaceName);
353 int64_t GetIfaceTxPackets(const std::string &interfaceName);
471 int32_t SetIpv6PrivacyExtensions(const std::string &interfaceName, const uint32_t on);
472 int32_t SetEnableIpv6(const std::string &interfaceName, const uint32_t on);
474 int64_t GetIfaceBytes(const std::string &interfaceName, const std::string &filename);

123456