/system/netd/server/ |
D | NetworkController.cpp | 170 int NetworkController::setDefaultNetwork(unsigned netId) { in setDefaultNetwork() argument 173 if (netId == mDefaultNetId) { in setDefaultNetwork() 177 if (netId != NETID_UNSET) { in setDefaultNetwork() 178 Network* network = getNetworkLocked(netId); in setDefaultNetwork() 180 ALOGE("no such netId %u", netId); in setDefaultNetwork() 184 ALOGE("cannot set default to non-physical network with netId %u", netId); in setDefaultNetwork() 203 mDefaultNetId = netId; in setDefaultNetwork() 207 uint32_t NetworkController::getNetworkForDnsLocked(unsigned* netId, uid_t uid) const { in getNetworkForDnsLocked() argument 220 if (*netId == NETID_UNSET && getVirtualNetworkForUserLocked(uid) == nullptr) { in getNetworkForDnsLocked() 221 *netId = defaultNetId; in getNetworkForDnsLocked() [all …]
|
D | NetdHwService.cpp | 66 unsigned netId; in createOemNetwork() local 69 int ret = gCtls->netCtrl.createPhysicalOemNetwork(permission, &netId); in createOemNetwork() 72 fwmark.netId = netId; in createOemNetwork() 76 _hidl_cb(netIdToNetHandle(netId), fwmark.intValue, toHalStatus(ret)); in createOemNetwork() 82 #define RETURN_IF_NOT_OEM_NETWORK(netId) \ argument 83 if (((netId) < NetworkController::MIN_OEM_ID) || \ 84 ((netId) > NetworkController::MAX_OEM_ID)) { \ 89 unsigned netId = netHandleToNetId(netHandle); in destroyOemNetwork() local 90 RETURN_IF_NOT_OEM_NETWORK(netId); in destroyOemNetwork() 92 return toHalStatus(gCtls->netCtrl.destroyNetwork(netId)); in destroyOemNetwork() [all …]
|
D | NetworkController.h | 100 [[nodiscard]] int setDefaultNetwork(unsigned netId); 104 void getNetworkContext(unsigned netId, uid_t uid, struct android_net_context* netcontext) const; 106 bool isVirtualNetwork(unsigned netId) const; 108 [[nodiscard]] int createPhysicalNetwork(unsigned netId, Permission permission); 109 [[nodiscard]] int createPhysicalOemNetwork(Permission permission, unsigned* netId); 110 [[nodiscard]] int createVirtualNetwork(unsigned netId, bool secure, NativeVpnType vpnType); 111 [[nodiscard]] int destroyNetwork(unsigned netId); 113 [[nodiscard]] int addInterfaceToNetwork(unsigned netId, const char* interface); 114 [[nodiscard]] int removeInterfaceFromNetwork(unsigned netId, const char* interface); 118 int checkUserNetworkAccess(uid_t uid, unsigned netId) const; [all …]
|
D | RouteController.h | 106 [[nodiscard]] static int addInterfaceToLocalNetwork(unsigned netId, const char* interface); 107 [[nodiscard]] static int removeInterfaceFromLocalNetwork(unsigned netId, const char* interface); 109 [[nodiscard]] static int addInterfaceToPhysicalNetwork(unsigned netId, const char* interface, 112 [[nodiscard]] static int removeInterfaceFromPhysicalNetwork(unsigned netId, 117 [[nodiscard]] static int addInterfaceToVirtualNetwork(unsigned netId, const char* interface, 120 [[nodiscard]] static int removeInterfaceFromVirtualNetwork(unsigned netId, 124 [[nodiscard]] static int modifyPhysicalNetworkPermission(unsigned netId, const char* interface, 128 [[nodiscard]] static int addUsersToVirtualNetwork(unsigned netId, const char* interface, 130 [[nodiscard]] static int removeUsersFromVirtualNetwork(unsigned netId, const char* interface, 163 [[nodiscard]] static int addUsersToPhysicalNetwork(unsigned netId, const char* interface, [all …]
|
D | RouteController.cpp | 457 int modifyIncomingPacketMark(unsigned netId, const char* interface, Permission permission, in modifyIncomingPacketMark() argument 461 fwmark.netId = netId; in modifyIncomingPacketMark() 522 [[nodiscard]] static int modifyVpnSystemPermissionRule(unsigned netId, uint32_t table, bool secure, in modifyVpnSystemPermissionRule() argument 527 fwmark.netId = netId; in modifyVpnSystemPermissionRule() 528 mask.netId = FWMARK_NET_ID_MASK; in modifyVpnSystemPermissionRule() 546 [[nodiscard]] static int modifyExplicitNetworkRule(unsigned netId, uint32_t table, in modifyExplicitNetworkRule() argument 552 fwmark.netId = netId; in modifyExplicitNetworkRule() 553 mask.netId = FWMARK_NET_ID_MASK; in modifyExplicitNetworkRule() 600 [[nodiscard]] static int modifyImplicitNetworkRule(unsigned netId, uint32_t table, bool add) { in modifyImplicitNetworkRule() argument 604 fwmark.netId = netId; in modifyImplicitNetworkRule() [all …]
|
D | FwmarkServer.cpp | 134 return mNetworkController->checkUserNetworkAccess(command.uid, command.netId); in processClient() 214 fwmark.netId = mNetworkController->getNetworkForConnect(client->getUid()); in processClient() 215 } else if (!mNetworkController->isVirtualNetwork(fwmark.netId)) { in processClient() 216 fwmark.netId = mNetworkController->getDefaultNetwork(); in processClient() 245 netdEventListener->onConnectEvent(fwmark.netId, connectInfo.error, in processClient() 260 fwmark.netId = command.netId; in processClient() 261 if (command.netId == NETID_UNSET) { in processClient() 267 command.netId)) { in processClient() 286 if (!fwmark.explicitlySelected && mNetworkController->isVirtualNetwork(fwmark.netId)) { in processClient() 287 fwmark.netId = mNetworkController->getDefaultNetwork(); in processClient() [all …]
|
D | NetdNativeService.h | 65 binder::Status networkCreatePhysical(int32_t netId, int32_t permission) override; 66 binder::Status networkCreateVpn(int32_t netId, bool secure) override; 68 binder::Status networkDestroy(int32_t netId) override; 70 binder::Status networkAddInterface(int32_t netId, const std::string& iface) override; 71 binder::Status networkRemoveInterface(int32_t netId, const std::string& iface) override; 73 binder::Status networkAddUidRanges(int32_t netId, 75 binder::Status networkRemoveUidRanges(int32_t netId, 83 binder::Status networkAddRouteParcel(int32_t netId, const RouteInfoParcel& route) override; 84 binder::Status networkUpdateRouteParcel(int32_t netId, const RouteInfoParcel& route) override; 85 binder::Status networkRemoveRouteParcel(int32_t netId, const RouteInfoParcel& route) override; [all …]
|
D | DummyNetwork.cpp | 35 DummyNetwork::DummyNetwork(unsigned netId) : Network(netId) { in DummyNetwork() argument
|
D | NetdNativeService.cpp | 352 binder::Status NetdNativeService::networkCreatePhysical(int32_t netId, int32_t permission) { in networkCreatePhysical() argument 354 int ret = gCtls->netCtrl.createPhysicalNetwork(netId, convertPermission(permission)); in networkCreatePhysical() 360 binder::Status NetdNativeService::networkCreateVpn(int32_t netId, bool secure) { in networkCreateVpn() argument 365 int ret = gCtls->netCtrl.createVirtualNetwork(netId, secure, NativeVpnType::LEGACY); in networkCreateVpn() 373 ret = gCtls->netCtrl.createPhysicalNetwork(config.netId, in networkCreate() 376 ret = gCtls->netCtrl.createVirtualNetwork(config.netId, config.secure, config.vpnType); in networkCreate() 381 binder::Status NetdNativeService::networkDestroy(int32_t netId) { in networkDestroy() argument 384 const int ret = gCtls->netCtrl.destroyNetwork(netId); in networkDestroy() 388 binder::Status NetdNativeService::networkAddInterface(int32_t netId, const std::string& iface) { in networkAddInterface() argument 390 int ret = gCtls->netCtrl.addInterfaceToNetwork(netId, iface.c_str()); in networkAddInterface() [all …]
|
D | PhysicalNetwork.cpp | 30 [[nodiscard]] int addToDefault(unsigned netId, const std::string& interface, Permission permission, in addToDefault() argument 33 ALOGE("failed to add interface %s to default netId %u", interface.c_str(), netId); in addToDefault() 42 [[nodiscard]] int removeFromDefault(unsigned netId, const std::string& interface, in removeFromDefault() argument 46 ALOGE("failed to remove interface %s from default netId %u", interface.c_str(), netId); in removeFromDefault() 59 PhysicalNetwork::PhysicalNetwork(unsigned netId, PhysicalNetwork::Delegate* delegate) : in PhysicalNetwork() argument 60 Network(netId), mDelegate(delegate), mPermission(PERMISSION_NONE), mIsDefault(false) { in PhysicalNetwork()
|
D | LocalNetwork.cpp | 28 LocalNetwork::LocalNetwork(unsigned netId) : Network(netId) { in LocalNetwork() argument
|
/system/netd/include/ |
D | NetdClient.h | 28 int getNetworkForSocket(unsigned* netId, int socketFd); 29 int setNetworkForSocket(unsigned netId, int socketFd); 33 int setNetworkForProcess(unsigned netId); 35 int setNetworkForResolv(unsigned netId); 41 int queryUserAccess(uid_t uid, unsigned netId); 53 int resNetworkQuery(unsigned netId, const char* dname, int ns_class, int ns_type, uint32_t flags); 57 int resNetworkSend(unsigned netId, const uint8_t* msg, size_t msglen, uint32_t flags);
|
/system/netd/client/ |
D | NetdClient.cpp | 195 unsigned netId = netIdForProcess & ~NETID_USE_LOCAL_NAMESERVERS; in netdClientSocket() local 196 if (netId != NETID_UNSET && FwmarkClient::shouldSetFwmark(domain)) { in netdClientSocket() 197 if (int error = setNetworkForSocket(netId, socketFd)) { in netdClientSocket() 246 unsigned getNetworkForResolv(unsigned netId) { in getNetworkForResolv() argument 247 if (netId != NETID_UNSET) { in getNetworkForResolv() 248 return netId; in getNetworkForResolv() 254 netId = netIdForProcess; in getNetworkForResolv() 255 if (netId != NETID_UNSET) { in getNetworkForResolv() 256 return netId; in getNetworkForResolv() 261 int setNetworkForTarget(unsigned netId, std::atomic_uint* target) { in setNetworkForTarget() argument [all …]
|
/system/netd/server/aidl_api/netd_aidl_interface/3/android/net/ |
D | INetd.aidl | 24 void networkCreatePhysical(int netId, int permission); in networkCreatePhysical() argument 25 void networkCreateVpn(int netId, boolean secure); in networkCreateVpn() argument 26 void networkDestroy(int netId); in networkDestroy() argument 27 void networkAddInterface(int netId, in @utf8InCpp String iface); in networkAddInterface() argument 28 void networkRemoveInterface(int netId, in @utf8InCpp String iface); in networkRemoveInterface() argument 29 void networkAddUidRanges(int netId, in android.net.UidRangeParcel[] uidRanges); in networkAddUidRanges() argument 30 void networkRemoveUidRanges(int netId, in android.net.UidRangeParcel[] uidRanges); in networkRemoveUidRanges() argument 80 void tetherDnsSet(int netId, in @utf8InCpp String[] dnsAddrs); in tetherDnsSet() argument 82 …void networkAddRoute(int netId, in @utf8InCpp String ifName, in @utf8InCpp String destination, in … in networkAddRoute() argument 83 …void networkRemoveRoute(int netId, in @utf8InCpp String ifName, in @utf8InCpp String destination, … in networkRemoveRoute() argument [all …]
|
/system/netd/server/binder/android/net/metrics/ |
D | INetdEventListener.aidl | 51 void onDnsEvent(int netId, int eventType, int returnCode, int latencyMs, in onDnsEvent() argument 63 void onPrivateDnsValidationEvent(int netId, String ipAddress, String hostname, in onPrivateDnsValidationEvent() argument 76 void onConnectEvent(int netId, int error, int latencyMs, String ipAddr, int port, int uid); in onConnectEvent() argument 126 void onNat64PrefixEvent(int netId, boolean added, @utf8InCpp String prefixString, in onNat64PrefixEvent() argument
|
/system/netd/server/aidl_api/netd_aidl_interface/4/android/net/ |
D | INetd.aidl | 24 void networkCreatePhysical(int netId, int permission); in networkCreatePhysical() argument 25 void networkCreateVpn(int netId, boolean secure); in networkCreateVpn() argument 26 void networkDestroy(int netId); in networkDestroy() argument 27 void networkAddInterface(int netId, in @utf8InCpp String iface); in networkAddInterface() argument 28 void networkRemoveInterface(int netId, in @utf8InCpp String iface); in networkRemoveInterface() argument 29 void networkAddUidRanges(int netId, in android.net.UidRangeParcel[] uidRanges); in networkAddUidRanges() argument 30 void networkRemoveUidRanges(int netId, in android.net.UidRangeParcel[] uidRanges); in networkRemoveUidRanges() argument 80 void tetherDnsSet(int netId, in @utf8InCpp String[] dnsAddrs); in tetherDnsSet() argument 82 …void networkAddRoute(int netId, in @utf8InCpp String ifName, in @utf8InCpp String destination, in … in networkAddRoute() argument 83 …void networkRemoveRoute(int netId, in @utf8InCpp String ifName, in @utf8InCpp String destination, … in networkRemoveRoute() argument [all …]
|
/system/netd/server/aidl_api/netd_aidl_interface/7/android/net/ |
D | INetd.aidl | 43 void networkCreatePhysical(int netId, int permission); in networkCreatePhysical() argument 47 void networkCreateVpn(int netId, boolean secure); in networkCreateVpn() argument 48 void networkDestroy(int netId); in networkDestroy() argument 49 void networkAddInterface(int netId, in @utf8InCpp String iface); in networkAddInterface() argument 50 void networkRemoveInterface(int netId, in @utf8InCpp String iface); in networkRemoveInterface() argument 51 void networkAddUidRanges(int netId, in android.net.UidRangeParcel[] uidRanges); in networkAddUidRanges() argument 52 void networkRemoveUidRanges(int netId, in android.net.UidRangeParcel[] uidRanges); in networkRemoveUidRanges() argument 102 void tetherDnsSet(int netId, in @utf8InCpp String[] dnsAddrs); in tetherDnsSet() argument 104 …void networkAddRoute(int netId, in @utf8InCpp String ifName, in @utf8InCpp String destination, in … in networkAddRoute() argument 105 …void networkRemoveRoute(int netId, in @utf8InCpp String ifName, in @utf8InCpp String destination, … in networkRemoveRoute() argument [all …]
|
/system/netd/server/aidl_api/netd_aidl_interface/6/android/net/ |
D | INetd.aidl | 43 void networkCreatePhysical(int netId, int permission); in networkCreatePhysical() argument 47 void networkCreateVpn(int netId, boolean secure); in networkCreateVpn() argument 48 void networkDestroy(int netId); in networkDestroy() argument 49 void networkAddInterface(int netId, in @utf8InCpp String iface); in networkAddInterface() argument 50 void networkRemoveInterface(int netId, in @utf8InCpp String iface); in networkRemoveInterface() argument 51 void networkAddUidRanges(int netId, in android.net.UidRangeParcel[] uidRanges); in networkAddUidRanges() argument 52 void networkRemoveUidRanges(int netId, in android.net.UidRangeParcel[] uidRanges); in networkRemoveUidRanges() argument 102 void tetherDnsSet(int netId, in @utf8InCpp String[] dnsAddrs); in tetherDnsSet() argument 104 …void networkAddRoute(int netId, in @utf8InCpp String ifName, in @utf8InCpp String destination, in … in networkAddRoute() argument 105 …void networkRemoveRoute(int netId, in @utf8InCpp String ifName, in @utf8InCpp String destination, … in networkRemoveRoute() argument [all …]
|
/system/netd/server/binder/android/net/ |
D | INetd.aidl | 83 void networkCreatePhysical(int netId, int permission); in networkCreatePhysical() argument 95 void networkCreateVpn(int netId, boolean secure); in networkCreateVpn() argument 106 void networkDestroy(int netId); in networkDestroy() argument 118 void networkAddInterface(int netId, in @utf8InCpp String iface); in networkAddInterface() argument 129 void networkRemoveInterface(int netId, in @utf8InCpp String iface); in networkRemoveInterface() argument 142 void networkAddUidRanges(int netId, in UidRangeParcel[] uidRanges); in networkAddUidRanges() argument 155 void networkRemoveUidRanges(int netId, in UidRangeParcel[] uidRanges); in networkRemoveUidRanges() argument 767 void tetherDnsSet(int netId, in @utf8InCpp String[] dnsAddrs); in tetherDnsSet() argument 814 int netId, in networkAddRoute() argument 832 int netId, in networkRemoveRoute() argument [all …]
|
/system/netd/server/aidl_api/netd_aidl_interface/current/android/net/ |
D | INetd.aidl | 43 void networkCreatePhysical(int netId, int permission); in networkCreatePhysical() argument 47 void networkCreateVpn(int netId, boolean secure); in networkCreateVpn() argument 48 void networkDestroy(int netId); in networkDestroy() argument 49 void networkAddInterface(int netId, in @utf8InCpp String iface); in networkAddInterface() argument 50 void networkRemoveInterface(int netId, in @utf8InCpp String iface); in networkRemoveInterface() argument 51 void networkAddUidRanges(int netId, in android.net.UidRangeParcel[] uidRanges); in networkAddUidRanges() argument 52 void networkRemoveUidRanges(int netId, in android.net.UidRangeParcel[] uidRanges); in networkRemoveUidRanges() argument 102 void tetherDnsSet(int netId, in @utf8InCpp String[] dnsAddrs); in tetherDnsSet() argument 104 …void networkAddRoute(int netId, in @utf8InCpp String ifName, in @utf8InCpp String destination, in … in networkAddRoute() argument 105 …void networkRemoveRoute(int netId, in @utf8InCpp String ifName, in @utf8InCpp String destination, … in networkRemoveRoute() argument [all …]
|
/system/netd/server/aidl_api/netd_aidl_interface/5/android/net/ |
D | INetd.aidl | 24 void networkCreatePhysical(int netId, int permission); in networkCreatePhysical() argument 25 void networkCreateVpn(int netId, boolean secure); in networkCreateVpn() argument 26 void networkDestroy(int netId); in networkDestroy() argument 27 void networkAddInterface(int netId, in @utf8InCpp String iface); in networkAddInterface() argument 28 void networkRemoveInterface(int netId, in @utf8InCpp String iface); in networkRemoveInterface() argument 29 void networkAddUidRanges(int netId, in android.net.UidRangeParcel[] uidRanges); in networkAddUidRanges() argument 30 void networkRemoveUidRanges(int netId, in android.net.UidRangeParcel[] uidRanges); in networkRemoveUidRanges() argument 80 void tetherDnsSet(int netId, in @utf8InCpp String[] dnsAddrs); in tetherDnsSet() argument 82 …void networkAddRoute(int netId, in @utf8InCpp String ifName, in @utf8InCpp String destination, in … in networkAddRoute() argument 83 …void networkRemoveRoute(int netId, in @utf8InCpp String ifName, in @utf8InCpp String destination, … in networkRemoveRoute() argument [all …]
|
/system/netd/server/aidl_api/netd_event_listener_interface/1/android/net/metrics/ |
D | INetdEventListener.aidl | 20 …oneway void onDnsEvent(int netId, int eventType, int returnCode, int latencyMs, @utf8InCpp String … in onDnsEvent() argument 21 …oneway void onPrivateDnsValidationEvent(int netId, String ipAddress, String hostname, boolean vali… in onPrivateDnsValidationEvent() argument 22 oneway void onConnectEvent(int netId, int error, int latencyMs, String ipAddr, int port, int uid); in onConnectEvent() argument 25 …oneway void onNat64PrefixEvent(int netId, boolean added, @utf8InCpp String prefixString, int prefi… in onNat64PrefixEvent() argument
|
/system/netd/server/aidl_api/netd_event_listener_interface/current/android/net/metrics/ |
D | INetdEventListener.aidl | 21 …oneway void onDnsEvent(int netId, int eventType, int returnCode, int latencyMs, @utf8InCpp String … in onDnsEvent() argument 22 …oneway void onPrivateDnsValidationEvent(int netId, String ipAddress, String hostname, boolean vali… in onPrivateDnsValidationEvent() argument 23 oneway void onConnectEvent(int netId, int error, int latencyMs, String ipAddr, int port, int uid); in onConnectEvent() argument 26 …oneway void onNat64PrefixEvent(int netId, boolean added, @utf8InCpp String prefixString, int prefi… in onNat64PrefixEvent() argument
|
/system/netd/server/aidl_api/netd_aidl_interface/1/android/net/ |
D | INetd.aidl | 6 void networkCreatePhysical(int netId, int permission); in networkCreatePhysical() argument 7 void networkCreateVpn(int netId, boolean secure); in networkCreateVpn() argument 8 void networkDestroy(int netId); in networkDestroy() argument 9 void networkAddInterface(int netId, in @utf8InCpp String iface); in networkAddInterface() argument 10 void networkRemoveInterface(int netId, in @utf8InCpp String iface); in networkRemoveInterface() argument 11 void networkAddUidRanges(int netId, in android.net.UidRangeParcel[] uidRanges); in networkAddUidRanges() argument 12 void networkRemoveUidRanges(int netId, in android.net.UidRangeParcel[] uidRanges); in networkRemoveUidRanges() argument 62 void tetherDnsSet(int netId, in @utf8InCpp String[] dnsAddrs); in tetherDnsSet() argument 64 …void networkAddRoute(int netId, in @utf8InCpp String ifName, in @utf8InCpp String destination, in … in networkAddRoute() argument 65 …void networkRemoveRoute(int netId, in @utf8InCpp String ifName, in @utf8InCpp String destination, … in networkRemoveRoute() argument [all …]
|
/system/netd/server/aidl_api/netd_aidl_interface/2/android/net/ |
D | INetd.aidl | 23 void networkCreatePhysical(int netId, int permission); in networkCreatePhysical() argument 24 void networkCreateVpn(int netId, boolean secure); in networkCreateVpn() argument 25 void networkDestroy(int netId); in networkDestroy() argument 26 void networkAddInterface(int netId, in @utf8InCpp String iface); in networkAddInterface() argument 27 void networkRemoveInterface(int netId, in @utf8InCpp String iface); in networkRemoveInterface() argument 28 void networkAddUidRanges(int netId, in android.net.UidRangeParcel[] uidRanges); in networkAddUidRanges() argument 29 void networkRemoveUidRanges(int netId, in android.net.UidRangeParcel[] uidRanges); in networkRemoveUidRanges() argument 79 void tetherDnsSet(int netId, in @utf8InCpp String[] dnsAddrs); in tetherDnsSet() argument 81 …void networkAddRoute(int netId, in @utf8InCpp String ifName, in @utf8InCpp String destination, in … in networkAddRoute() argument 82 …void networkRemoveRoute(int netId, in @utf8InCpp String ifName, in @utf8InCpp String destination, … in networkRemoveRoute() argument [all …]
|