1c462177bd58e3bf0ac4f618934dae060569e3e0bRobert Greenwalt/*
2c462177bd58e3bf0ac4f618934dae060569e3e0bRobert Greenwalt * Copyright (C) 2012 The Android Open Source Project
3c462177bd58e3bf0ac4f618934dae060569e3e0bRobert Greenwalt *
4c462177bd58e3bf0ac4f618934dae060569e3e0bRobert Greenwalt * Licensed under the Apache License, Version 2.0 (the "License");
5c462177bd58e3bf0ac4f618934dae060569e3e0bRobert Greenwalt * you may not use this file except in compliance with the License.
6c462177bd58e3bf0ac4f618934dae060569e3e0bRobert Greenwalt * You may obtain a copy of the License at
7c462177bd58e3bf0ac4f618934dae060569e3e0bRobert Greenwalt *
8c462177bd58e3bf0ac4f618934dae060569e3e0bRobert Greenwalt *      http://www.apache.org/licenses/LICENSE-2.0
9c462177bd58e3bf0ac4f618934dae060569e3e0bRobert Greenwalt *
10c462177bd58e3bf0ac4f618934dae060569e3e0bRobert Greenwalt * Unless required by applicable law or agreed to in writing, software
11c462177bd58e3bf0ac4f618934dae060569e3e0bRobert Greenwalt * distributed under the License is distributed on an "AS IS" BASIS,
12c462177bd58e3bf0ac4f618934dae060569e3e0bRobert Greenwalt * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13c462177bd58e3bf0ac4f618934dae060569e3e0bRobert Greenwalt * See the License for the specific language governing permissions and
14c462177bd58e3bf0ac4f618934dae060569e3e0bRobert Greenwalt * limitations under the License.
15c462177bd58e3bf0ac4f618934dae060569e3e0bRobert Greenwalt */
16c462177bd58e3bf0ac4f618934dae060569e3e0bRobert Greenwalt
17c462177bd58e3bf0ac4f618934dae060569e3e0bRobert Greenwalt#ifndef _NETD_CONSTANTS_H
18c462177bd58e3bf0ac4f618934dae060569e3e0bRobert Greenwalt#define _NETD_CONSTANTS_H
19c462177bd58e3bf0ac4f618934dae060569e3e0bRobert Greenwalt
208e188ed5c989ddcc07f0f5e9839493c22d17e7b6Jeff Sharkey#include <string>
218e188ed5c989ddcc07f0f5e9839493c22d17e7b6Jeff Sharkey#include <list>
228e188ed5c989ddcc07f0f5e9839493c22d17e7b6Jeff Sharkey#include <stdarg.h>
23c462177bd58e3bf0ac4f618934dae060569e3e0bRobert Greenwalt
24c462177bd58e3bf0ac4f618934dae060569e3e0bRobert Greenwaltextern const char * const IPTABLES_PATH;
250031cead820149e2fe3ccb3cc2fe05758a3cb5c2JP Abgrallextern const char * const IP6TABLES_PATH;
26c462177bd58e3bf0ac4f618934dae060569e3e0bRobert Greenwaltextern const char * const IP_PATH;
27c462177bd58e3bf0ac4f618934dae060569e3e0bRobert Greenwaltextern const char * const TC_PATH;
28c462177bd58e3bf0ac4f618934dae060569e3e0bRobert Greenwaltextern const char * const OEM_SCRIPT_PATH;
29c462177bd58e3bf0ac4f618934dae060569e3e0bRobert Greenwaltextern const char * const ADD;
30c462177bd58e3bf0ac4f618934dae060569e3e0bRobert Greenwaltextern const char * const DEL;
31c462177bd58e3bf0ac4f618934dae060569e3e0bRobert Greenwalt
328e188ed5c989ddcc07f0f5e9839493c22d17e7b6Jeff Sharkeyextern "C" int fork_and_execve(const char*, const char*[]);
338e188ed5c989ddcc07f0f5e9839493c22d17e7b6Jeff Sharkey
348e188ed5c989ddcc07f0f5e9839493c22d17e7b6Jeff Sharkeyenum IptablesTarget { V4, V6, V4V6 };
358e188ed5c989ddcc07f0f5e9839493c22d17e7b6Jeff Sharkey
368e188ed5c989ddcc07f0f5e9839493c22d17e7b6Jeff Sharkeyint execIptables(IptablesTarget target, ...);
378e188ed5c989ddcc07f0f5e9839493c22d17e7b6Jeff Sharkeyint execIptablesSilently(IptablesTarget target, ...);
388e188ed5c989ddcc07f0f5e9839493c22d17e7b6Jeff Sharkey
39c462177bd58e3bf0ac4f618934dae060569e3e0bRobert Greenwalt#endif
40