1 /*
2 * Copyright (c) 2023 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16 #include "extended_vpn_ctl.h"
17
18 #include <regex>
19 #include <string>
20
21 #include <fcntl.h>
22
23 #include "net_manager_constants.h"
24 #include "net_manager_ext_constants.h"
25 #include "netmgr_ext_log_wrapper.h"
26 #include "netsys_controller.h"
27
28 namespace OHOS {
29 namespace NetManagerStandard {
30
ExtendedVpnCtl(sptr<VpnConfig> config,const std::string & pkg,int32_t userId,std::vector<int32_t> & activeUserIds)31 ExtendedVpnCtl::ExtendedVpnCtl(sptr<VpnConfig> config, const std::string &pkg, int32_t userId, std::vector<int32_t> &activeUserIds)
32 : NetVpnImpl(config, pkg, userId, activeUserIds)
33 {
34 }
35
IsInternalVpn()36 bool ExtendedVpnCtl::IsInternalVpn()
37 {
38 return false;
39 }
40
SetUp()41 int32_t ExtendedVpnCtl::SetUp()
42 {
43 NETMGR_EXT_LOG_I("SetUp virtual network");
44 return NetVpnImpl::SetUp();
45 }
46
Destroy()47 int32_t ExtendedVpnCtl::Destroy()
48 {
49 NETMGR_EXT_LOG_I("Destroy virtual network");
50 return NetVpnImpl::Destroy();
51 }
52
53 } // namespace NetManagerStandard
54 } // namespace OHOS
55