Lines Matching defs:tableIndex

65     int tableIndex = findTableNumber(iface);
66 if (tableIndex == -1) {
67 tableIndex = findTableNumber(""); // look for an empty slot
68 if (tableIndex == -1) {
74 strncpy(mInterfaceTable[tableIndex], iface, IFNAMSIZ);
76 mInterfaceTable[tableIndex][IFNAMSIZ] = 0;
79 return modifyRoute(cli, ADD, iface, dest, prefix, gateway, tableIndex);
83 char *dest, int prefix, char *gateway, int tableIndex) {
89 IP_PATH, action, dest, prefix, iface, tableIndex+BASE_TABLE_NUMBER);
92 IP_PATH, action, dest, prefix, gateway, iface, tableIndex+BASE_TABLE_NUMBER);
97 IP_PATH, action, dest, prefix, gateway, iface, tableIndex+BASE_TABLE_NUMBER);
104 mInterfaceRuleCount[tableIndex]++;
106 if (--mInterfaceRuleCount[tableIndex] < 1) {
107 mInterfaceRuleCount[tableIndex] = 0;
108 mInterfaceTable[tableIndex][0] = 0;
111 modifyRuleCount(tableIndex, action);
116 void SecondaryTableController::modifyRuleCount(int tableIndex, const char *action) {
118 mInterfaceRuleCount[tableIndex]++;
120 if (--mInterfaceRuleCount[tableIndex] < 1) {
121 mInterfaceRuleCount[tableIndex] = 0;
122 mInterfaceTable[tableIndex][0] = 0;
127 int SecondaryTableController::verifyTableIndex(int tableIndex) {
128 if ((tableIndex < 0) ||
129 (tableIndex >= INTERFACES_TRACKED) ||
130 (mInterfaceTable[tableIndex][0] == 0)) {
147 int tableIndex = findTableNumber(iface);
148 if (tableIndex == -1) {
155 return modifyRoute(cli, DEL, iface, dest, prefix, gateway, tableIndex);
158 int SecondaryTableController::modifyFromRule(int tableIndex, const char *action,
162 if (verifyTableIndex(tableIndex)) {
166 action, addr, tableIndex + BASE_TABLE_NUMBER);
171 modifyRuleCount(tableIndex, action);
175 int SecondaryTableController::modifyLocalRoute(int tableIndex, const char *action,
179 if (verifyTableIndex(tableIndex)) {
183 modifyRuleCount(tableIndex, action); // some del's will fail as the iface is already gone.
186 tableIndex+BASE_TABLE_NUMBER);