blob: 71e43443172ea683fb23f019c970405c7c384be6 [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);
Lorenzo Colitti0ea8ff82014-10-28 00:15:07 +090026 int setIPv6NdOffload(char* interface, const int on);
Dmitry Shmidt6d6c0e62013-06-11 16:18:06 -070027 int setMtu(const char *interface, const char *mtu);
Dmitry Shmidt2eab1f72012-07-26 16:08:02 -070028
Sasha Levitskiy329c3b42012-07-30 16:11:23 -070029 private:
Sreeram Ramachandran1604e182014-07-19 23:22:33 -070030 int writeIPv6ProcPath(const char *interface, const char *setting, const char *value);
Sreeram Ramachandrana4811802014-04-10 12:10:24 -070031 int isInterfaceName(const char *name);
32 void setOnAllInterfaces(const char* filename, const char* value);
33 void setAcceptRA(const char* value);
Sreeram Ramachandrana01d6ef2014-04-10 19:37:59 -070034 void setAcceptRARouteTable(int tableOrOffset);
Dmitry Shmidt2eab1f72012-07-26 16:08:02 -070035};
36
37#endif