From ab5f347b7f50e8a47940c53334e2c9bac490309d Mon Sep 17 00:00:00 2001 From: Ken Chen Date: Sun, 4 Apr 2021 11:28:06 +0800 Subject: Add networkCreate API. Deprecate networkCreate[Physical/Vpn] OEMs need VPN type information in Netd for customization. According to stable AIDL rules, Netd can neither extend parameters in the existing networkCreateVpn, nor add a new API with the identical name (function overloading). Thus, add an extensible API which can create physical network, virtual network, and so on. Deprecate networkCreatePhysical and networkCreateVpn. Bug: 171872481 Test: atest Change-Id: I9094593c902d91d90a8210960c608f0a50f163ff --- server/NetworkController.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server/NetworkController.h') diff --git a/server/NetworkController.h b/server/NetworkController.h index 61ae1aad..46302252 100644 --- a/server/NetworkController.h +++ b/server/NetworkController.h @@ -107,7 +107,7 @@ public: [[nodiscard]] int createPhysicalNetwork(unsigned netId, Permission permission); [[nodiscard]] int createPhysicalOemNetwork(Permission permission, unsigned* netId); - [[nodiscard]] int createVirtualNetwork(unsigned netId, bool secure); + [[nodiscard]] int createVirtualNetwork(unsigned netId, bool secure, NativeVpnType vpnType); [[nodiscard]] int destroyNetwork(unsigned netId); [[nodiscard]] int addInterfaceToNetwork(unsigned netId, const char* interface); -- cgit v1.2.3