Lines Matching refs:gCtls
205 gCtls->tcpSocketMonitor.dump(dw); in dump()
212 gCtls->trafficCtrl.dump(dw, true); in dump()
219 gCtls->netCtrl.dump(dw); in dump()
222 gCtls->trafficCtrl.dump(dw, false); in dump()
225 gCtls->xfrmCtrl.dump(dw); in dump()
228 gCtls->clatdCtrl.dump(dw); in dump()
231 gCtls->tetherCtrl.dump(dw); in dump()
274 NETD_LOCKING_RPC(gCtls->firewallCtrl.lock, PERM_NETWORK_STACK, PERM_MAINLINE_NETWORK_STACK); in firewallReplaceUidChain()
275 int err = gCtls->firewallCtrl.replaceUidChain(chainName, isAllowlist, uids); in firewallReplaceUidChain()
281 NETD_LOCKING_RPC(gCtls->bandwidthCtrl.lock, PERM_NETWORK_STACK, PERM_MAINLINE_NETWORK_STACK); in bandwidthEnableDataSaver()
282 int err = gCtls->bandwidthCtrl.enableDataSaver(enable); in bandwidthEnableDataSaver()
289 NETD_LOCKING_RPC(gCtls->bandwidthCtrl.lock, PERM_NETWORK_STACK, PERM_MAINLINE_NETWORK_STACK); in bandwidthSetInterfaceQuota()
290 int res = gCtls->bandwidthCtrl.setInterfaceQuota(ifName, bytes); in bandwidthSetInterfaceQuota()
295 NETD_LOCKING_RPC(gCtls->bandwidthCtrl.lock, PERM_NETWORK_STACK, PERM_MAINLINE_NETWORK_STACK); in bandwidthRemoveInterfaceQuota()
296 int res = gCtls->bandwidthCtrl.removeInterfaceQuota(ifName); in bandwidthRemoveInterfaceQuota()
302 NETD_LOCKING_RPC(gCtls->bandwidthCtrl.lock, PERM_NETWORK_STACK, PERM_MAINLINE_NETWORK_STACK); in bandwidthSetInterfaceAlert()
303 int res = gCtls->bandwidthCtrl.setInterfaceAlert(ifName, bytes); in bandwidthSetInterfaceAlert()
308 NETD_LOCKING_RPC(gCtls->bandwidthCtrl.lock, PERM_NETWORK_STACK, PERM_MAINLINE_NETWORK_STACK); in bandwidthRemoveInterfaceAlert()
309 int res = gCtls->bandwidthCtrl.removeInterfaceAlert(ifName); in bandwidthRemoveInterfaceAlert()
314 NETD_LOCKING_RPC(gCtls->bandwidthCtrl.lock, PERM_NETWORK_STACK, PERM_MAINLINE_NETWORK_STACK); in bandwidthSetGlobalAlert()
315 int res = gCtls->bandwidthCtrl.setGlobalAlert(bytes); in bandwidthSetGlobalAlert()
320 NETD_LOCKING_RPC(gCtls->bandwidthCtrl.lock, PERM_NETWORK_STACK, PERM_MAINLINE_NETWORK_STACK); in bandwidthAddNaughtyApp()
322 int res = gCtls->bandwidthCtrl.addNaughtyApps(appStrUids); in bandwidthAddNaughtyApp()
327 NETD_LOCKING_RPC(gCtls->bandwidthCtrl.lock, PERM_NETWORK_STACK, PERM_MAINLINE_NETWORK_STACK); in bandwidthRemoveNaughtyApp()
329 int res = gCtls->bandwidthCtrl.removeNaughtyApps(appStrUids); in bandwidthRemoveNaughtyApp()
334 NETD_LOCKING_RPC(gCtls->bandwidthCtrl.lock, PERM_NETWORK_STACK, PERM_MAINLINE_NETWORK_STACK); in bandwidthAddNiceApp()
336 int res = gCtls->bandwidthCtrl.addNiceApps(appStrUids); in bandwidthAddNiceApp()
341 NETD_LOCKING_RPC(gCtls->bandwidthCtrl.lock, PERM_NETWORK_STACK, PERM_MAINLINE_NETWORK_STACK); in bandwidthRemoveNiceApp()
343 int res = gCtls->bandwidthCtrl.removeNiceApps(appStrUids); in bandwidthRemoveNiceApp()
349 int ret = gCtls->netCtrl.createPhysicalNetwork(netId, convertPermission(permission)); in networkCreatePhysical()
355 int ret = gCtls->netCtrl.createVirtualNetwork(netId, secure); in networkCreateVpn()
362 const int ret = gCtls->netCtrl.destroyNetwork(netId); in networkDestroy()
368 int ret = gCtls->netCtrl.addInterfaceToNetwork(netId, iface.c_str()); in networkAddInterface()
374 int ret = gCtls->netCtrl.removeInterfaceFromNetwork(netId, iface.c_str()); in networkRemoveInterface()
382 int ret = gCtls->netCtrl.addUsersToNetwork(netId, UidRanges(uidRangeArray)); in networkAddUidRanges()
390 int ret = gCtls->netCtrl.removeUsersFromNetwork(netId, UidRanges(uidRangeArray)); in networkRemoveUidRanges()
434 NETD_LOCKING_RPC(gCtls->tetherCtrl.lock, PERM_NETWORK_STACK, PERM_MAINLINE_NETWORK_STACK); in tetherApplyDnsInterfaces()
435 *ret = gCtls->tetherCtrl.applyDnsInterfaces(); in tetherApplyDnsInterfaces()
495 NETD_LOCKING_RPC(gCtls->tetherCtrl.lock, PERM_NETWORK_STACK, PERM_MAINLINE_NETWORK_STACK); in tetherGetStats()
496 const auto& statsList = gCtls->tetherCtrl.getTetherStats(); in tetherGetStats()
603 gCtls->xfrmCtrl.ipSecSetEncapSocketOwner(socket.get(), newUid, callerUid)); in ipSecSetEncapSocketOwner()
614 return asBinderStatus(gCtls->xfrmCtrl.ipSecAllocateSpi( in ipSecAllocateSpi()
632 return asBinderStatus(gCtls->xfrmCtrl.ipSecAddSecurityAssociation( in ipSecAddSecurityAssociation()
645 return asBinderStatus(gCtls->xfrmCtrl.ipSecDeleteSecurityAssociation( in ipSecDeleteSecurityAssociation()
654 return asBinderStatus(gCtls->xfrmCtrl.ipSecApplyTransportModeTransform( in ipSecApplyTransportModeTransform()
662 return asBinderStatus(gCtls->xfrmCtrl.ipSecRemoveTransportModeTransform(socket.get())); in ipSecRemoveTransportModeTransform()
673 return asBinderStatus(gCtls->xfrmCtrl.ipSecAddSecurityPolicy( in ipSecAddSecurityPolicy()
684 return asBinderStatus(gCtls->xfrmCtrl.ipSecUpdateSecurityPolicy( in ipSecUpdateSecurityPolicy()
695 return asBinderStatus(gCtls->xfrmCtrl.ipSecDeleteSecurityPolicy( in ipSecDeleteSecurityPolicy()
706 netdutils::Status result = gCtls->xfrmCtrl.ipSecAddTunnelInterface( in ipSecAddTunnelInterface()
718 netdutils::Status result = gCtls->xfrmCtrl.ipSecAddTunnelInterface( in ipSecUpdateTunnelInterface()
726 netdutils::Status result = gCtls->xfrmCtrl.ipSecRemoveTunnelInterface(deviceName); in ipSecRemoveTunnelInterface()
740 return asBinderStatus(gCtls->wakeupCtrl.addInterface(ifName, prefix, mark, mask)); in wakeupAddInterface()
747 return asBinderStatus(gCtls->wakeupCtrl.delInterface(ifName, prefix, mark, mask)); in wakeupDelInterface()
752 return asBinderStatus(gCtls->trafficCtrl.swapActiveStatsMap()); in trafficSwapActiveStatsMap()
757 NETD_LOCKING_RPC(gCtls->idletimerCtrl.lock, PERM_NETWORK_STACK, PERM_MAINLINE_NETWORK_STACK); in idletimerAddInterface()
759 gCtls->idletimerCtrl.addInterfaceIdletimer(ifName.c_str(), timeout, classLabel.c_str()); in idletimerAddInterface()
766 NETD_LOCKING_RPC(gCtls->idletimerCtrl.lock, PERM_NETWORK_STACK, PERM_MAINLINE_NETWORK_STACK); in idletimerRemoveInterface()
767 int res = gCtls->idletimerCtrl.removeInterfaceIdletimer(ifName.c_str(), timeout, in idletimerRemoveInterface()
773 NETD_LOCKING_RPC(gCtls->strictCtrl.lock, PERM_NETWORK_STACK, PERM_MAINLINE_NETWORK_STACK); in strictUidCleartextPenalty()
789 int res = gCtls->strictCtrl.setUidCleartextPenalty((uid_t) uid, penalty); in strictUidCleartextPenalty()
796 int res = gCtls->clatdCtrl.startClatd(ifName.c_str(), nat64Prefix, v6Addr); in clatdStart()
802 int res = gCtls->clatdCtrl.stopClatd(ifName.c_str()); in clatdStop()
807 NETD_LOCKING_RPC(gCtls->tetherCtrl.lock, PERM_NETWORK_STACK, PERM_MAINLINE_NETWORK_STACK); in ipfwdEnabled()
808 *status = (gCtls->tetherCtrl.getIpfwdRequesterList().size() > 0) ? true : false; in ipfwdEnabled()
813 NETD_LOCKING_RPC(gCtls->tetherCtrl.lock, PERM_NETWORK_STACK, PERM_MAINLINE_NETWORK_STACK); in ipfwdGetRequesterList()
814 for (const auto& requester : gCtls->tetherCtrl.getIpfwdRequesterList()) { in ipfwdGetRequesterList()
821 NETD_LOCKING_RPC(gCtls->tetherCtrl.lock, PERM_NETWORK_STACK, PERM_MAINLINE_NETWORK_STACK); in ipfwdEnableForwarding()
822 int res = (gCtls->tetherCtrl.enableForwarding(requester.c_str())) ? 0 : -EREMOTEIO; in ipfwdEnableForwarding()
827 NETD_LOCKING_RPC(gCtls->tetherCtrl.lock, PERM_NETWORK_STACK, PERM_MAINLINE_NETWORK_STACK); in ipfwdDisableForwarding()
828 int res = (gCtls->tetherCtrl.disableForwarding(requester.c_str())) ? 0 : -EREMOTEIO; in ipfwdDisableForwarding()
934 NETD_LOCKING_RPC(gCtls->tetherCtrl.lock, PERM_NETWORK_STACK, PERM_MAINLINE_NETWORK_STACK); in tetherStartWithConfiguration()
939 int res = gCtls->tetherCtrl.startTethering(config.usingLegacyDnsProxy, config.dhcpRanges); in tetherStartWithConfiguration()
944 NETD_LOCKING_RPC(gCtls->tetherCtrl.lock, PERM_NETWORK_STACK, PERM_MAINLINE_NETWORK_STACK); in tetherStop()
945 int res = gCtls->tetherCtrl.stopTethering(); in tetherStop()
950 NETD_LOCKING_RPC(gCtls->tetherCtrl.lock, PERM_NETWORK_STACK, PERM_MAINLINE_NETWORK_STACK); in tetherIsEnabled()
951 *enabled = gCtls->tetherCtrl.isTetheringStarted(); in tetherIsEnabled()
956 NETD_LOCKING_RPC(gCtls->tetherCtrl.lock, PERM_NETWORK_STACK, PERM_MAINLINE_NETWORK_STACK); in tetherInterfaceAdd()
957 int res = gCtls->tetherCtrl.tetherInterface(ifName.c_str()); in tetherInterfaceAdd()
962 NETD_LOCKING_RPC(gCtls->tetherCtrl.lock, PERM_NETWORK_STACK, PERM_MAINLINE_NETWORK_STACK); in tetherInterfaceRemove()
963 int res = gCtls->tetherCtrl.untetherInterface(ifName.c_str()); in tetherInterfaceRemove()
968 NETD_LOCKING_RPC(gCtls->tetherCtrl.lock, PERM_NETWORK_STACK, PERM_MAINLINE_NETWORK_STACK); in tetherInterfaceList()
969 for (const auto& ifname : gCtls->tetherCtrl.getTetheredInterfaceList()) { in tetherInterfaceList()
977 NETD_LOCKING_RPC(gCtls->tetherCtrl.lock, PERM_NETWORK_STACK, PERM_MAINLINE_NETWORK_STACK); in tetherDnsSet()
978 int res = gCtls->tetherCtrl.setDnsForwarders(netId, dnsAddrs); in tetherDnsSet()
983 NETD_LOCKING_RPC(gCtls->tetherCtrl.lock, PERM_NETWORK_STACK, PERM_MAINLINE_NETWORK_STACK); in tetherDnsList()
984 for (const auto& fwdr : gCtls->tetherCtrl.getDnsForwarders()) { in tetherDnsList()
998 int res = gCtls->netCtrl.addRoute(netId, route.ifName.c_str(), route.destination.c_str(), in networkAddRouteParcel()
1012 int res = gCtls->netCtrl.updateRoute(netId, route.ifName.c_str(), route.destination.c_str(), in networkUpdateRouteParcel()
1030 int res = gCtls->netCtrl.addRoute(netId, ifName.c_str(), destination.c_str(), in networkAddRoute()
1041 int res = gCtls->netCtrl.removeRoute(netId, ifName.c_str(), destination.c_str(), in networkRemoveRoute()
1051 int res = gCtls->netCtrl.addRoute(netId, ifName.c_str(), destination.c_str(), in networkAddLegacyRoute()
1063 int res = gCtls->netCtrl.removeRoute(netId, ifName.c_str(), destination.c_str(), in networkRemoveLegacyRoute()
1071 *netId = gCtls->netCtrl.getDefaultNetwork(); in networkGetDefault()
1077 int res = gCtls->netCtrl.setDefaultNetwork(netId); in networkSetDefault()
1084 int res = gCtls->netCtrl.setDefaultNetwork(netId); in networkClearDefault()
1107 int res = gCtls->netCtrl.setPermissionForNetworks(convertPermission(permission), netIds); in networkSetPermissionForNetwork()
1114 gCtls->netCtrl.setPermissionForUsers(convertPermission(permission), intsToUids(uids)); in networkSetPermissionForUser()
1121 gCtls->netCtrl.setPermissionForUsers(permission, intsToUids(uids)); in networkClearPermissionForUser()
1128 gCtls->netCtrl.allowProtect(uids); in networkSetProtectAllow()
1135 gCtls->netCtrl.denyProtect(uids); in networkSetProtectDeny()
1141 *ret = gCtls->netCtrl.canProtect((uid_t) uid); in networkCanProtect()
1148 gCtls->trafficCtrl.setPermissionForUids(permission, intsToUids(uids)); in trafficSetNetPermForUids()
1153 NETD_LOCKING_RPC(gCtls->firewallCtrl.lock, PERM_NETWORK_STACK, PERM_MAINLINE_NETWORK_STACK); in firewallSetFirewallType()
1156 int res = gCtls->firewallCtrl.setFirewallType(type); in firewallSetFirewallType()
1162 NETD_LOCKING_RPC(gCtls->firewallCtrl.lock, PERM_NETWORK_STACK, PERM_MAINLINE_NETWORK_STACK); in firewallSetInterfaceRule()
1165 int res = gCtls->firewallCtrl.setInterfaceRule(ifName.c_str(), rule); in firewallSetInterfaceRule()
1171 NETD_LOCKING_RPC(gCtls->firewallCtrl.lock, PERM_NETWORK_STACK, PERM_MAINLINE_NETWORK_STACK); in firewallSetUidRule()
1175 int res = gCtls->firewallCtrl.setUidRule(chain, uid, rule); in firewallSetUidRule()
1180 NETD_LOCKING_RPC(gCtls->firewallCtrl.lock, PERM_NETWORK_STACK, PERM_MAINLINE_NETWORK_STACK); in firewallEnableChildChain()
1183 int res = gCtls->firewallCtrl.enableChildChains(chain, enable); in firewallEnableChildChain()
1191 return asBinderStatus(gCtls->trafficCtrl.addUidInterfaceRules( in firewallAddUidInterfaceRules()
1199 return asBinderStatus(gCtls->trafficCtrl.removeUidInterfaceRules(uids)); in firewallRemoveUidInterfaceRules()
1204 NETD_LOCKING_RPC(gCtls->tetherCtrl.lock, PERM_NETWORK_STACK, PERM_MAINLINE_NETWORK_STACK); in tetherAddForward()
1206 int res = gCtls->tetherCtrl.enableNat(intIface.c_str(), extIface.c_str()); in tetherAddForward()
1212 NETD_LOCKING_RPC(gCtls->tetherCtrl.lock, PERM_NETWORK_STACK, PERM_MAINLINE_NETWORK_STACK); in tetherRemoveForward()
1213 int res = gCtls->tetherCtrl.disableNat(intIface.c_str(), extIface.c_str()); in tetherRemoveForward()
1235 gCtls->eventReporter.registerUnsolEventListener(listener); in registerUnsolicitedEventListener()
1259 return asBinderStatus(gCtls->tetherCtrl.addOffloadRule(rule)); in tetherOffloadRuleAdd()
1265 return asBinderStatus(gCtls->tetherCtrl.removeOffloadRule(rule)); in tetherOffloadRuleRemove()
1287 NETD_LOCKING_RPC(gCtls->tetherCtrl.lock, PERM_NETWORK_STACK, PERM_MAINLINE_NETWORK_STACK); in tetherOffloadGetStats()
1290 const auto& statsList = gCtls->tetherCtrl.getTetherOffloadStats(); in tetherOffloadGetStats()
1301 NETD_LOCKING_RPC(gCtls->tetherCtrl.lock, PERM_NETWORK_STACK, PERM_MAINLINE_NETWORK_STACK); in tetherOffloadSetInterfaceQuota()
1302 int res = gCtls->tetherCtrl.setTetherOffloadInterfaceQuota(ifIndex, quotaBytes); in tetherOffloadSetInterfaceQuota()
1308 NETD_LOCKING_RPC(gCtls->tetherCtrl.lock, PERM_NETWORK_STACK, PERM_MAINLINE_NETWORK_STACK); in tetherOffloadGetAndClearStats()
1309 const auto& stats = gCtls->tetherCtrl.getAndClearTetherOffloadStats(ifIndex); in tetherOffloadGetAndClearStats()