Pierre Imai | 1cfa543 | 2016-02-24 18:00:03 +0900 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2016 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | #ifndef _CONTROLLERS_H__ |
| 18 | #define _CONTROLLERS_H__ |
| 19 | |
| 20 | #include <sysutils/FrameworkListener.h> |
Lorenzo Colitti | ddf2d5b | 2016-02-26 11:30:59 +0900 | [diff] [blame] | 21 | |
Pierre Imai | 1cfa543 | 2016-02-24 18:00:03 +0900 | [diff] [blame] | 22 | #include "BandwidthController.h" |
Nathan Harold | 1a37153 | 2017-01-30 12:30:48 -0800 | [diff] [blame^] | 23 | #include "ClatdController.h" |
| 24 | #include "EventReporter.h" |
| 25 | #include "FirewallController.h" |
Pierre Imai | 1cfa543 | 2016-02-24 18:00:03 +0900 | [diff] [blame] | 26 | #include "IdletimerController.h" |
| 27 | #include "InterfaceController.h" |
Narayan Kamath | a5ace89 | 2017-01-06 15:10:02 +0000 | [diff] [blame] | 28 | #include "IptablesRestoreController.h" |
Nathan Harold | 1a37153 | 2017-01-30 12:30:48 -0800 | [diff] [blame^] | 29 | #include "NatController.h" |
| 30 | #include "NetworkController.h" |
| 31 | #include "PppController.h" |
Pierre Imai | 1cfa543 | 2016-02-24 18:00:03 +0900 | [diff] [blame] | 32 | #include "ResolverController.h" |
Pierre Imai | 1cfa543 | 2016-02-24 18:00:03 +0900 | [diff] [blame] | 33 | #include "StrictController.h" |
Nathan Harold | 1a37153 | 2017-01-30 12:30:48 -0800 | [diff] [blame^] | 34 | #include "TetherController.h" |
| 35 | #include "XfrmController.h" |
Pierre Imai | 1cfa543 | 2016-02-24 18:00:03 +0900 | [diff] [blame] | 36 | |
| 37 | namespace android { |
| 38 | namespace net { |
| 39 | |
Lorenzo Colitti | 1ed96e2 | 2017-02-02 12:21:56 +0900 | [diff] [blame] | 40 | class Controllers { |
| 41 | public: |
Pierre Imai | 1cfa543 | 2016-02-24 18:00:03 +0900 | [diff] [blame] | 42 | Controllers(); |
| 43 | |
| 44 | NetworkController netCtrl; |
| 45 | TetherController tetherCtrl; |
| 46 | NatController natCtrl; |
| 47 | PppController pppCtrl; |
Pierre Imai | 1cfa543 | 2016-02-24 18:00:03 +0900 | [diff] [blame] | 48 | BandwidthController bandwidthCtrl; |
| 49 | IdletimerController idletimerCtrl; |
| 50 | ResolverController resolverCtrl; |
| 51 | FirewallController firewallCtrl; |
Pierre Imai | 1cfa543 | 2016-02-24 18:00:03 +0900 | [diff] [blame] | 52 | ClatdController clatdCtrl; |
| 53 | StrictController strictCtrl; |
Michal Karpinski | d544011 | 2016-10-06 16:56:04 +0100 | [diff] [blame] | 54 | EventReporter eventReporter; |
Narayan Kamath | a5ace89 | 2017-01-06 15:10:02 +0000 | [diff] [blame] | 55 | IptablesRestoreController iptablesRestoreCtrl; |
Nathan Harold | 1a37153 | 2017-01-30 12:30:48 -0800 | [diff] [blame^] | 56 | XfrmController xfrmCtrl; |
Lorenzo Colitti | 1ed96e2 | 2017-02-02 12:21:56 +0900 | [diff] [blame] | 57 | |
| 58 | void init(); |
| 59 | |
| 60 | private: |
| 61 | void initIptablesRules(); |
Pierre Imai | 1cfa543 | 2016-02-24 18:00:03 +0900 | [diff] [blame] | 62 | }; |
| 63 | |
| 64 | extern Controllers* gCtls; |
| 65 | |
| 66 | } // namespace net |
| 67 | } // namespace android |
| 68 | |
| 69 | #endif // _CONTROLLERS_H__ |