Dmitry Shmidt | 2eab1f7 | 2012-07-26 16:08:02 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2012 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 | * |
Sasha Levitskiy | 329c3b4 | 2012-07-30 16:11:23 -0700 | [diff] [blame] | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
Dmitry Shmidt | 2eab1f7 | 2012-07-26 16:08:02 -0700 | [diff] [blame] | 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 _INTERFACE_CONTROLLER_H |
| 18 | #define _INTERFACE_CONTROLLER_H |
| 19 | |
Dmitry Shmidt | 2eab1f7 | 2012-07-26 16:08:02 -0700 | [diff] [blame] | 20 | class InterfaceController { |
Sasha Levitskiy | 329c3b4 | 2012-07-30 16:11:23 -0700 | [diff] [blame] | 21 | public: |
| 22 | InterfaceController(); |
| 23 | virtual ~InterfaceController(); |
Lorenzo Colitti | 70afde6 | 2013-03-04 17:58:40 +0900 | [diff] [blame] | 24 | int setEnableIPv6(const char *interface, const int on); |
| 25 | int setIPv6PrivacyExtensions(const char *interface, const int on); |
Lorenzo Colitti | 0ea8ff8 | 2014-10-28 00:15:07 +0900 | [diff] [blame] | 26 | int setIPv6NdOffload(char* interface, const int on); |
Dmitry Shmidt | 6d6c0e6 | 2013-06-11 16:18:06 -0700 | [diff] [blame] | 27 | int setMtu(const char *interface, const char *mtu); |
Dmitry Shmidt | 2eab1f7 | 2012-07-26 16:08:02 -0700 | [diff] [blame] | 28 | |
Sasha Levitskiy | 329c3b4 | 2012-07-30 16:11:23 -0700 | [diff] [blame] | 29 | private: |
Sreeram Ramachandran | 1604e18 | 2014-07-19 23:22:33 -0700 | [diff] [blame] | 30 | int writeIPv6ProcPath(const char *interface, const char *setting, const char *value); |
Sreeram Ramachandran | a481180 | 2014-04-10 12:10:24 -0700 | [diff] [blame] | 31 | int isInterfaceName(const char *name); |
| 32 | void setOnAllInterfaces(const char* filename, const char* value); |
| 33 | void setAcceptRA(const char* value); |
Sreeram Ramachandran | a01d6ef | 2014-04-10 19:37:59 -0700 | [diff] [blame] | 34 | void setAcceptRARouteTable(int tableOrOffset); |
Dmitry Shmidt | 2eab1f7 | 2012-07-26 16:08:02 -0700 | [diff] [blame] | 35 | }; |
| 36 | |
| 37 | #endif |