blob: f6e8cbdbc6d45f526bf2b588667009f956aac641 [file] [log] [blame]
Dmitry Shmidt2eab1f72012-07-26 16:08:02 -07001/*
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 Levitskiy329c3b42012-07-30 16:11:23 -07008 * http://www.apache.org/licenses/LICENSE-2.0
Dmitry Shmidt2eab1f72012-07-26 16:08:02 -07009 *
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 Shmidt2eab1f72012-07-26 16:08:02 -070020class InterfaceController {
Sasha Levitskiy329c3b42012-07-30 16:11:23 -070021 public:
22 InterfaceController();
23 virtual ~InterfaceController();
Lorenzo Colitti70afde62013-03-04 17:58:40 +090024 int setEnableIPv6(const char *interface, const int on);
25 int setIPv6PrivacyExtensions(const char *interface, const int on);
Dmitry Shmidt6d6c0e62013-06-11 16:18:06 -070026 int setMtu(const char *interface, const char *mtu);
Dmitry Shmidt2eab1f72012-07-26 16:08:02 -070027
Sasha Levitskiy329c3b42012-07-30 16:11:23 -070028 private:
Sreeram Ramachandran1604e182014-07-19 23:22:33 -070029 int writeIPv6ProcPath(const char *interface, const char *setting, const char *value);
Sreeram Ramachandrana4811802014-04-10 12:10:24 -070030 int isInterfaceName(const char *name);
31 void setOnAllInterfaces(const char* filename, const char* value);
32 void setAcceptRA(const char* value);
Sreeram Ramachandrana01d6ef2014-04-10 19:37:59 -070033 void setAcceptRARouteTable(int tableOrOffset);
Dmitry Shmidt2eab1f72012-07-26 16:08:02 -070034};
35
36#endif