14a5f5ca3c9e07fc3e6feca2afde07f41a8a64f11JP Abgrall/* 24a5f5ca3c9e07fc3e6feca2afde07f41a8a64f11JP Abgrall * Copyright (C) 2011 The Android Open Source Project 34a5f5ca3c9e07fc3e6feca2afde07f41a8a64f11JP Abgrall * 44a5f5ca3c9e07fc3e6feca2afde07f41a8a64f11JP Abgrall * Licensed under the Apache License, Version 2.0 (the "License"); 54a5f5ca3c9e07fc3e6feca2afde07f41a8a64f11JP Abgrall * you may not use this file except in compliance with the License. 64a5f5ca3c9e07fc3e6feca2afde07f41a8a64f11JP Abgrall * You may obtain a copy of the License at 74a5f5ca3c9e07fc3e6feca2afde07f41a8a64f11JP Abgrall * 84a5f5ca3c9e07fc3e6feca2afde07f41a8a64f11JP Abgrall * http://www.apache.org/licenses/LICENSE-2.0 94a5f5ca3c9e07fc3e6feca2afde07f41a8a64f11JP Abgrall * 104a5f5ca3c9e07fc3e6feca2afde07f41a8a64f11JP Abgrall * Unless required by applicable law or agreed to in writing, software 114a5f5ca3c9e07fc3e6feca2afde07f41a8a64f11JP Abgrall * distributed under the License is distributed on an "AS IS" BASIS, 124a5f5ca3c9e07fc3e6feca2afde07f41a8a64f11JP Abgrall * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 134a5f5ca3c9e07fc3e6feca2afde07f41a8a64f11JP Abgrall * See the License for the specific language governing permissions and 144a5f5ca3c9e07fc3e6feca2afde07f41a8a64f11JP Abgrall * limitations under the License. 154a5f5ca3c9e07fc3e6feca2afde07f41a8a64f11JP Abgrall */ 164a5f5ca3c9e07fc3e6feca2afde07f41a8a64f11JP Abgrall#ifndef _BANDWIDTH_CONTROLLER_H 174a5f5ca3c9e07fc3e6feca2afde07f41a8a64f11JP Abgrall#define _BANDWIDTH_CONTROLLER_H 184a5f5ca3c9e07fc3e6feca2afde07f41a8a64f11JP Abgrall 194a5f5ca3c9e07fc3e6feca2afde07f41a8a64f11JP Abgrall#include <list> 204a5f5ca3c9e07fc3e6feca2afde07f41a8a64f11JP Abgrall#include <string> 21fa6f46d3370ae5475fc3bc8273bbe04ee7348d60JP Abgrall#include <utility> // for pair 22db7da58e8d2aa021060098057f944ef754be06e3JP Abgrall 23baeccc455b293c2c83dbe6463f56b741177bd612JP Abgrall#include <sysutils/SocketClient.h> 24baeccc455b293c2c83dbe6463f56b741177bd612JP Abgrall 254a5f5ca3c9e07fc3e6feca2afde07f41a8a64f11JP Abgrallclass BandwidthController { 264a5f5ca3c9e07fc3e6feca2afde07f41a8a64f11JP Abgrallpublic: 27db7da58e8d2aa021060098057f944ef754be06e3JP Abgrall class TetherStats { 28db7da58e8d2aa021060098057f944ef754be06e3JP Abgrall public: 29db7da58e8d2aa021060098057f944ef754be06e3JP Abgrall TetherStats(void) 30db7da58e8d2aa021060098057f944ef754be06e3JP Abgrall : rxBytes(-1), rxPackets(-1), 31db7da58e8d2aa021060098057f944ef754be06e3JP Abgrall txBytes(-1), txPackets(-1) {}; 32baeccc455b293c2c83dbe6463f56b741177bd612JP Abgrall TetherStats(std::string intIfn, std::string extIfn, 33db7da58e8d2aa021060098057f944ef754be06e3JP Abgrall int64_t rxB, int64_t rxP, 34db7da58e8d2aa021060098057f944ef754be06e3JP Abgrall int64_t txB, int64_t txP) 35baeccc455b293c2c83dbe6463f56b741177bd612JP Abgrall : intIface(intIfn), extIface(extIfn), 36db7da58e8d2aa021060098057f944ef754be06e3JP Abgrall rxBytes(rxB), rxPackets(rxP), 37baeccc455b293c2c83dbe6463f56b741177bd612JP Abgrall txBytes(txB), txPackets(txP) {}; 38baeccc455b293c2c83dbe6463f56b741177bd612JP Abgrall /* Internal interface. Same as NatController's notion. */ 39baeccc455b293c2c83dbe6463f56b741177bd612JP Abgrall std::string intIface; 40baeccc455b293c2c83dbe6463f56b741177bd612JP Abgrall /* External interface. Same as NatController's notion. */ 41baeccc455b293c2c83dbe6463f56b741177bd612JP Abgrall std::string extIface; 42db7da58e8d2aa021060098057f944ef754be06e3JP Abgrall int64_t rxBytes, rxPackets; 43db7da58e8d2aa021060098057f944ef754be06e3JP Abgrall int64_t txBytes, txPackets; 44db7da58e8d2aa021060098057f944ef754be06e3JP Abgrall /* 45db7da58e8d2aa021060098057f944ef754be06e3JP Abgrall * Allocates a new string representing this: 46baeccc455b293c2c83dbe6463f56b741177bd612JP Abgrall * intIface extIface rx_bytes rx_packets tx_bytes tx_packets 47db7da58e8d2aa021060098057f944ef754be06e3JP Abgrall * The caller is responsible for free()'ing the returned ptr. 48db7da58e8d2aa021060098057f944ef754be06e3JP Abgrall */ 49baeccc455b293c2c83dbe6463f56b741177bd612JP Abgrall char *getStatsLine(void) const; 50db7da58e8d2aa021060098057f944ef754be06e3JP Abgrall }; 51db7da58e8d2aa021060098057f944ef754be06e3JP Abgrall 52fa6f46d3370ae5475fc3bc8273bbe04ee7348d60JP Abgrall BandwidthController(); 530031cead820149e2fe3ccb3cc2fe05758a3cb5c2JP Abgrall 540031cead820149e2fe3ccb3cc2fe05758a3cb5c2JP Abgrall int setupIptablesHooks(void); 550031cead820149e2fe3ccb3cc2fe05758a3cb5c2JP Abgrall 560031cead820149e2fe3ccb3cc2fe05758a3cb5c2JP Abgrall int enableBandwidthControl(bool force); 57fa6f46d3370ae5475fc3bc8273bbe04ee7348d60JP Abgrall int disableBandwidthControl(void); 58fa6f46d3370ae5475fc3bc8273bbe04ee7348d60JP Abgrall 590dad7c2f1f6994fbe5e85b9e1fc72d29d6453211JP Abgrall int setInterfaceSharedQuota(const char *iface, int64_t bytes); 608a93272255f1b7e3083a97e1e28ddf675c0c7fb0JP Abgrall int getInterfaceSharedQuota(int64_t *bytes); 61fa6f46d3370ae5475fc3bc8273bbe04ee7348d60JP Abgrall int removeInterfaceSharedQuota(const char *iface); 62fa6f46d3370ae5475fc3bc8273bbe04ee7348d60JP Abgrall 630dad7c2f1f6994fbe5e85b9e1fc72d29d6453211JP Abgrall int setInterfaceQuota(const char *iface, int64_t bytes); 648a93272255f1b7e3083a97e1e28ddf675c0c7fb0JP Abgrall int getInterfaceQuota(const char *iface, int64_t *bytes); 650dad7c2f1f6994fbe5e85b9e1fc72d29d6453211JP Abgrall int removeInterfaceQuota(const char *iface); 660dad7c2f1f6994fbe5e85b9e1fc72d29d6453211JP Abgrall 67e478873947f995e44e8c559342462c177a420ae0JP Abgrall int enableHappyBox(void); 68e478873947f995e44e8c559342462c177a420ae0JP Abgrall int disableHappyBox(void); 69fa6f46d3370ae5475fc3bc8273bbe04ee7348d60JP Abgrall int addNaughtyApps(int numUids, char *appUids[]); 70fa6f46d3370ae5475fc3bc8273bbe04ee7348d60JP Abgrall int removeNaughtyApps(int numUids, char *appUids[]); 71e478873947f995e44e8c559342462c177a420ae0JP Abgrall int addNiceApps(int numUids, char *appUids[]); 72e478873947f995e44e8c559342462c177a420ae0JP Abgrall int removeNiceApps(int numUids, char *appUids[]); 734a5f5ca3c9e07fc3e6feca2afde07f41a8a64f11JP Abgrall 748a93272255f1b7e3083a97e1e28ddf675c0c7fb0JP Abgrall int setGlobalAlert(int64_t bytes); 758a93272255f1b7e3083a97e1e28ddf675c0c7fb0JP Abgrall int removeGlobalAlert(void); 76c6c673496184bed6d62cf92a6fc7ed43fd94acd5JP Abgrall int setGlobalAlertInForwardChain(void); 77c6c673496184bed6d62cf92a6fc7ed43fd94acd5JP Abgrall int removeGlobalAlertInForwardChain(void); 788a93272255f1b7e3083a97e1e28ddf675c0c7fb0JP Abgrall 798a93272255f1b7e3083a97e1e28ddf675c0c7fb0JP Abgrall int setSharedAlert(int64_t bytes); 808a93272255f1b7e3083a97e1e28ddf675c0c7fb0JP Abgrall int removeSharedAlert(void); 818a93272255f1b7e3083a97e1e28ddf675c0c7fb0JP Abgrall 828a93272255f1b7e3083a97e1e28ddf675c0c7fb0JP Abgrall int setInterfaceAlert(const char *iface, int64_t bytes); 838a93272255f1b7e3083a97e1e28ddf675c0c7fb0JP Abgrall int removeInterfaceAlert(const char *iface); 840dad7c2f1f6994fbe5e85b9e1fc72d29d6453211JP Abgrall 85db7da58e8d2aa021060098057f944ef754be06e3JP Abgrall /* 86baeccc455b293c2c83dbe6463f56b741177bd612JP Abgrall * For single pair of ifaces, stats should have ifaceIn and ifaceOut initialized. 87baeccc455b293c2c83dbe6463f56b741177bd612JP Abgrall * For all pairs, stats should have ifaceIn=ifaceOut="". 88baeccc455b293c2c83dbe6463f56b741177bd612JP Abgrall * Sends out to the cli the single stat (TetheringStatsReluts) or a list of stats 89baeccc455b293c2c83dbe6463f56b741177bd612JP Abgrall * (TetheringStatsListResult+CommandOkay). 90baeccc455b293c2c83dbe6463f56b741177bd612JP Abgrall * Error is to be handled on the outside 91db7da58e8d2aa021060098057f944ef754be06e3JP Abgrall */ 92baeccc455b293c2c83dbe6463f56b741177bd612JP Abgrall int getTetherStats(SocketClient *cli, TetherStats &stats, std::string &extraProcessingInfo); 93db7da58e8d2aa021060098057f944ef754be06e3JP Abgrall 948e188ed5c989ddcc07f0f5e9839493c22d17e7b6Jeff Sharkey static const char* LOCAL_INPUT; 958e188ed5c989ddcc07f0f5e9839493c22d17e7b6Jeff Sharkey static const char* LOCAL_FORWARD; 968e188ed5c989ddcc07f0f5e9839493c22d17e7b6Jeff Sharkey static const char* LOCAL_OUTPUT; 978e188ed5c989ddcc07f0f5e9839493c22d17e7b6Jeff Sharkey static const char* LOCAL_RAW_PREROUTING; 988e188ed5c989ddcc07f0f5e9839493c22d17e7b6Jeff Sharkey static const char* LOCAL_MANGLE_POSTROUTING; 998e188ed5c989ddcc07f0f5e9839493c22d17e7b6Jeff Sharkey 1004a5f5ca3c9e07fc3e6feca2afde07f41a8a64f11JP Abgrallprotected: 1018a93272255f1b7e3083a97e1e28ddf675c0c7fb0JP Abgrall class QuotaInfo { 1028a93272255f1b7e3083a97e1e28ddf675c0c7fb0JP Abgrall public: 1038a93272255f1b7e3083a97e1e28ddf675c0c7fb0JP Abgrall QuotaInfo(std::string ifn, int64_t q, int64_t a) 1048a93272255f1b7e3083a97e1e28ddf675c0c7fb0JP Abgrall : ifaceName(ifn), quota(q), alert(a) {}; 1058a93272255f1b7e3083a97e1e28ddf675c0c7fb0JP Abgrall std::string ifaceName; 1068a93272255f1b7e3083a97e1e28ddf675c0c7fb0JP Abgrall int64_t quota; 1078a93272255f1b7e3083a97e1e28ddf675c0c7fb0JP Abgrall int64_t alert; 1088a93272255f1b7e3083a97e1e28ddf675c0c7fb0JP Abgrall }; 109db7da58e8d2aa021060098057f944ef754be06e3JP Abgrall 11026e0d49fa743d7881104196a9eda733bd2aac92fJP Abgrall enum IptIpVer { IptIpV4, IptIpV6 }; 111109899bc63139c5260cb9a7dc409f92efaf2c4b7JP Abgrall enum IptOp { IptOpInsert, IptOpReplace, IptOpDelete, IptOpAppend }; 112a9ba4cba3369e07aae05607f82424cc0075c9c34JP Abgrall enum IptJumpOp { IptJumpReject, IptJumpReturn, IptJumpNoAdd }; 113a9ba4cba3369e07aae05607f82424cc0075c9c34JP Abgrall enum SpecialAppOp { SpecialAppOpAdd, SpecialAppOpRemove }; 11426e0d49fa743d7881104196a9eda733bd2aac92fJP Abgrall enum QuotaType { QuotaUnique, QuotaShared }; 11526e0d49fa743d7881104196a9eda733bd2aac92fJP Abgrall enum RunCmdErrHandling { RunCmdFailureBad, RunCmdFailureOk }; 1161fb02dfc26e06b83e756ab3538b7ebc2136f535dJP Abgrall#if LOG_NDEBUG 1171fb02dfc26e06b83e756ab3538b7ebc2136f535dJP Abgrall enum IptFailureLog { IptFailShow, IptFailHide }; 1181fb02dfc26e06b83e756ab3538b7ebc2136f535dJP Abgrall#else 1191fb02dfc26e06b83e756ab3538b7ebc2136f535dJP Abgrall enum IptFailureLog { IptFailShow, IptFailHide = IptFailShow }; 1201fb02dfc26e06b83e756ab3538b7ebc2136f535dJP Abgrall#endif 121a9ba4cba3369e07aae05607f82424cc0075c9c34JP Abgrall 122a9ba4cba3369e07aae05607f82424cc0075c9c34JP Abgrall int manipulateSpecialApps(int numUids, char *appStrUids[], 123a9ba4cba3369e07aae05607f82424cc0075c9c34JP Abgrall const char *chain, 124a9ba4cba3369e07aae05607f82424cc0075c9c34JP Abgrall std::list<int /*appUid*/> &specialAppUids, 125a9ba4cba3369e07aae05607f82424cc0075c9c34JP Abgrall IptJumpOp jumpHandling, SpecialAppOp appOp); 126a9ba4cba3369e07aae05607f82424cc0075c9c34JP Abgrall int manipulateNaughtyApps(int numUids, char *appStrUids[], SpecialAppOp appOp); 127e478873947f995e44e8c559342462c177a420ae0JP Abgrall int manipulateNiceApps(int numUids, char *appStrUids[], SpecialAppOp appOp); 1284a5f5ca3c9e07fc3e6feca2afde07f41a8a64f11JP Abgrall 12926e0d49fa743d7881104196a9eda733bd2aac92fJP Abgrall int prepCostlyIface(const char *ifn, QuotaType quotaType); 13026e0d49fa743d7881104196a9eda733bd2aac92fJP Abgrall int cleanupCostlyIface(const char *ifn, QuotaType quotaType); 1310dad7c2f1f6994fbe5e85b9e1fc72d29d6453211JP Abgrall 132a9ba4cba3369e07aae05607f82424cc0075c9c34JP Abgrall std::string makeIptablesSpecialAppCmd(IptOp op, int uid, const char *chain); 13326e0d49fa743d7881104196a9eda733bd2aac92fJP Abgrall std::string makeIptablesQuotaCmd(IptOp op, const char *costName, int64_t quota); 1340dad7c2f1f6994fbe5e85b9e1fc72d29d6453211JP Abgrall 1358a93272255f1b7e3083a97e1e28ddf675c0c7fb0JP Abgrall int runIptablesAlertCmd(IptOp op, const char *alertName, int64_t bytes); 136c6c673496184bed6d62cf92a6fc7ed43fd94acd5JP Abgrall int runIptablesAlertFwdCmd(IptOp op, const char *alertName, int64_t bytes); 1378a93272255f1b7e3083a97e1e28ddf675c0c7fb0JP Abgrall 1380dad7c2f1f6994fbe5e85b9e1fc72d29d6453211JP Abgrall /* Runs for both ipv4 and ipv6 iptables */ 13926e0d49fa743d7881104196a9eda733bd2aac92fJP Abgrall int runCommands(int numCommands, const char *commands[], RunCmdErrHandling cmdErrHandling); 1400dad7c2f1f6994fbe5e85b9e1fc72d29d6453211JP Abgrall /* Runs for both ipv4 and ipv6 iptables, appends -j REJECT --reject-with ... */ 141a9ba4cba3369e07aae05607f82424cc0075c9c34JP Abgrall static int runIpxtablesCmd(const char *cmd, IptJumpOp jumpHandling, 1421fb02dfc26e06b83e756ab3538b7ebc2136f535dJP Abgrall IptFailureLog failureHandling = IptFailShow); 143a9ba4cba3369e07aae05607f82424cc0075c9c34JP Abgrall static int runIptablesCmd(const char *cmd, IptJumpOp jumpHandling, IptIpVer iptIpVer, 1441fb02dfc26e06b83e756ab3538b7ebc2136f535dJP Abgrall IptFailureLog failureHandling = IptFailShow); 1451fb02dfc26e06b83e756ab3538b7ebc2136f535dJP Abgrall 14626e0d49fa743d7881104196a9eda733bd2aac92fJP Abgrall 14726e0d49fa743d7881104196a9eda733bd2aac92fJP Abgrall // Provides strncpy() + check overflow. 14826e0d49fa743d7881104196a9eda733bd2aac92fJP Abgrall static int StrncpyAndCheck(char *buffer, const char *src, size_t buffSize); 1490dad7c2f1f6994fbe5e85b9e1fc72d29d6453211JP Abgrall 1508a93272255f1b7e3083a97e1e28ddf675c0c7fb0JP Abgrall int updateQuota(const char *alertName, int64_t bytes); 1518a93272255f1b7e3083a97e1e28ddf675c0c7fb0JP Abgrall 1528a93272255f1b7e3083a97e1e28ddf675c0c7fb0JP Abgrall int setCostlyAlert(const char *costName, int64_t bytes, int64_t *alertBytes); 1538a93272255f1b7e3083a97e1e28ddf675c0c7fb0JP Abgrall int removeCostlyAlert(const char *costName, int64_t *alertBytes); 1548a93272255f1b7e3083a97e1e28ddf675c0c7fb0JP Abgrall 15511b4e9b26fe7b878992162afb39f5a8acfd143edJP Abgrall /* 156baeccc455b293c2c83dbe6463f56b741177bd612JP Abgrall * stats should never have only intIface initialized. Other 3 combos are ok. 157baeccc455b293c2c83dbe6463f56b741177bd612JP Abgrall * fp should be a file to the apropriate FORWARD chain of iptables rules. 158a2a64f004f1677daf16b0b03d589d6572ec547c2JP Abgrall * extraProcessingInfo: contains raw parsed data, and error info. 159baeccc455b293c2c83dbe6463f56b741177bd612JP Abgrall * This strongly requires that setup of the rules is in a specific order: 160baeccc455b293c2c83dbe6463f56b741177bd612JP Abgrall * in:intIface out:extIface 161baeccc455b293c2c83dbe6463f56b741177bd612JP Abgrall * in:extIface out:intIface 162baeccc455b293c2c83dbe6463f56b741177bd612JP Abgrall * and the rules are grouped in pairs when more that one tethering was setup. 16311b4e9b26fe7b878992162afb39f5a8acfd143edJP Abgrall */ 164baeccc455b293c2c83dbe6463f56b741177bd612JP Abgrall static int parseForwardChainStats(SocketClient *cli, const TetherStats filter, FILE *fp, 1650031cead820149e2fe3ccb3cc2fe05758a3cb5c2JP Abgrall std::string &extraProcessingInfo); 166db7da58e8d2aa021060098057f944ef754be06e3JP Abgrall 1670e540ec038dfdbcf5cba3d5b9b2765e1dcec062bJP Abgrall /* 1680e540ec038dfdbcf5cba3d5b9b2765e1dcec062bJP Abgrall * Attempt to find the bw_costly_* tables that need flushing, 1690e540ec038dfdbcf5cba3d5b9b2765e1dcec062bJP Abgrall * and flush them. 1700e540ec038dfdbcf5cba3d5b9b2765e1dcec062bJP Abgrall * If doClean then remove the tables also. 1710e540ec038dfdbcf5cba3d5b9b2765e1dcec062bJP Abgrall * Deals with both ip4 and ip6 tables. 1720e540ec038dfdbcf5cba3d5b9b2765e1dcec062bJP Abgrall */ 1730e540ec038dfdbcf5cba3d5b9b2765e1dcec062bJP Abgrall void flushExistingCostlyTables(bool doClean); 1740e540ec038dfdbcf5cba3d5b9b2765e1dcec062bJP Abgrall static void parseAndFlushCostlyTables(FILE *fp, bool doRemove); 1750e540ec038dfdbcf5cba3d5b9b2765e1dcec062bJP Abgrall 1760e540ec038dfdbcf5cba3d5b9b2765e1dcec062bJP Abgrall /* 1770e540ec038dfdbcf5cba3d5b9b2765e1dcec062bJP Abgrall * Attempt to flush our tables. 1780e540ec038dfdbcf5cba3d5b9b2765e1dcec062bJP Abgrall * If doClean then remove them also. 1790e540ec038dfdbcf5cba3d5b9b2765e1dcec062bJP Abgrall * Deals with both ip4 and ip6 tables. 1800e540ec038dfdbcf5cba3d5b9b2765e1dcec062bJP Abgrall */ 1810e540ec038dfdbcf5cba3d5b9b2765e1dcec062bJP Abgrall void flushCleanTables(bool doClean); 1820e540ec038dfdbcf5cba3d5b9b2765e1dcec062bJP Abgrall 183db7da58e8d2aa021060098057f944ef754be06e3JP Abgrall /*------------------*/ 184db7da58e8d2aa021060098057f944ef754be06e3JP Abgrall 185db7da58e8d2aa021060098057f944ef754be06e3JP Abgrall std::list<std::string> sharedQuotaIfaces; 186db7da58e8d2aa021060098057f944ef754be06e3JP Abgrall int64_t sharedQuotaBytes; 187db7da58e8d2aa021060098057f944ef754be06e3JP Abgrall int64_t sharedAlertBytes; 188db7da58e8d2aa021060098057f944ef754be06e3JP Abgrall int64_t globalAlertBytes; 189c6c673496184bed6d62cf92a6fc7ed43fd94acd5JP Abgrall /* 190c6c673496184bed6d62cf92a6fc7ed43fd94acd5JP Abgrall * This tracks the number of tethers setup. 191c6c673496184bed6d62cf92a6fc7ed43fd94acd5JP Abgrall * The FORWARD chain is updated in the following cases: 192c6c673496184bed6d62cf92a6fc7ed43fd94acd5JP Abgrall * - The 1st time a globalAlert is setup and there are tethers setup. 193c6c673496184bed6d62cf92a6fc7ed43fd94acd5JP Abgrall * - Anytime a globalAlert is removed and there are tethers setup. 194c6c673496184bed6d62cf92a6fc7ed43fd94acd5JP Abgrall * - The 1st tether is setup and there is a globalAlert active. 195c6c673496184bed6d62cf92a6fc7ed43fd94acd5JP Abgrall * - The last tether is removed and there is a globalAlert active. 196c6c673496184bed6d62cf92a6fc7ed43fd94acd5JP Abgrall */ 197c6c673496184bed6d62cf92a6fc7ed43fd94acd5JP Abgrall int globalAlertTetherCount; 198c6c673496184bed6d62cf92a6fc7ed43fd94acd5JP Abgrall 199db7da58e8d2aa021060098057f944ef754be06e3JP Abgrall std::list<QuotaInfo> quotaIfaces; 200db7da58e8d2aa021060098057f944ef754be06e3JP Abgrall std::list<int /*appUid*/> naughtyAppUids; 201e478873947f995e44e8c559342462c177a420ae0JP Abgrall std::list<int /*appUid*/> niceAppUids; 2028a93272255f1b7e3083a97e1e28ddf675c0c7fb0JP Abgrall 2034a5f5ca3c9e07fc3e6feca2afde07f41a8a64f11JP Abgrallprivate: 2040031cead820149e2fe3ccb3cc2fe05758a3cb5c2JP Abgrall static const char *IPT_FLUSH_COMMANDS[]; 205db7da58e8d2aa021060098057f944ef754be06e3JP Abgrall static const char *IPT_CLEANUP_COMMANDS[]; 206db7da58e8d2aa021060098057f944ef754be06e3JP Abgrall static const char *IPT_SETUP_COMMANDS[]; 207db7da58e8d2aa021060098057f944ef754be06e3JP Abgrall static const char *IPT_BASIC_ACCOUNTING_COMMANDS[]; 208db7da58e8d2aa021060098057f944ef754be06e3JP Abgrall 209db7da58e8d2aa021060098057f944ef754be06e3JP Abgrall /* Alphabetical */ 210c6c673496184bed6d62cf92a6fc7ed43fd94acd5JP Abgrall static const char ALERT_GLOBAL_NAME[]; 211db7da58e8d2aa021060098057f944ef754be06e3JP Abgrall static const int MAX_CMD_ARGS; 212db7da58e8d2aa021060098057f944ef754be06e3JP Abgrall static const int MAX_CMD_LEN; 213db7da58e8d2aa021060098057f944ef754be06e3JP Abgrall static const int MAX_IFACENAME_LEN; 214db7da58e8d2aa021060098057f944ef754be06e3JP Abgrall static const int MAX_IPT_OUTPUT_LINE_LEN; 2154a5f5ca3c9e07fc3e6feca2afde07f41a8a64f11JP Abgrall}; 2164a5f5ca3c9e07fc3e6feca2afde07f41a8a64f11JP Abgrall 2174a5f5ca3c9e07fc3e6feca2afde07f41a8a64f11JP Abgrall#endif 218