Lines Matching refs:replace

966 	struct ipt_replace replace;  member
1020 struct arpt_replace replace; member
1050 strcpy(table->replace.name, table->name); in checkpoint_iptables()
1064 if (table->info.size > sizeof(table->replace.entrytable)) in checkpoint_iptables()
1077 table->replace.valid_hooks = table->info.valid_hooks; in checkpoint_iptables()
1078 table->replace.num_entries = table->info.num_entries; in checkpoint_iptables()
1079 table->replace.size = table->info.size; in checkpoint_iptables()
1080 memcpy(table->replace.hook_entry, table->info.hook_entry, sizeof(table->replace.hook_entry)); in checkpoint_iptables()
1081 memcpy(table->replace.underflow, table->info.underflow, sizeof(table->replace.underflow)); in checkpoint_iptables()
1082 memcpy(table->replace.entrytable, entries.entrytable, table->info.size); in checkpoint_iptables()
1120 if (memcmp(table->replace.entrytable, entries.entrytable, table->info.size) == 0) in reset_iptables()
1124 table->replace.num_counters = info.num_entries; in reset_iptables()
1125 table->replace.counters = counters; in reset_iptables()
1126 optlen = sizeof(table->replace) - sizeof(table->replace.entrytable) + table->replace.size; in reset_iptables()
1127 if (setsockopt(fd, level, IPT_SO_SET_REPLACE, &table->replace, optlen)) in reset_iptables()
1152 strcpy(table->replace.name, table->name); in checkpoint_arptables()
1165 if (table->info.size > sizeof(table->replace.entrytable)) in checkpoint_arptables()
1177 table->replace.valid_hooks = table->info.valid_hooks; in checkpoint_arptables()
1178 table->replace.num_entries = table->info.num_entries; in checkpoint_arptables()
1179 table->replace.size = table->info.size; in checkpoint_arptables()
1180 memcpy(table->replace.hook_entry, table->info.hook_entry, sizeof(table->replace.hook_entry)); in checkpoint_arptables()
1181 memcpy(table->replace.underflow, table->info.underflow, sizeof(table->replace.underflow)); in checkpoint_arptables()
1182 memcpy(table->replace.entrytable, entries.entrytable, table->info.size); in checkpoint_arptables()
1221 if (memcmp(table->replace.entrytable, entries.entrytable, table->info.size) == 0) in reset_arptables()
1228 table->replace.num_counters = info.num_entries; in reset_arptables()
1229 table->replace.counters = counters; in reset_arptables()
1230 optlen = sizeof(table->replace) - sizeof(table->replace.entrytable) + table->replace.size; in reset_arptables()
1231 if (setsockopt(fd, SOL_IP, ARPT_SO_SET_REPLACE, &table->replace, optlen)) in reset_arptables()
1242 struct ebt_replace replace; member
1269 strcpy(table->replace.name, table->name); in checkpoint_ebtables()
1270 optlen = sizeof(table->replace); in checkpoint_ebtables()
1271 if (getsockopt(fd, SOL_IP, EBT_SO_GET_INIT_INFO, &table->replace, &optlen)) { in checkpoint_ebtables()
1281 table->name, table->replace.nentries, table->replace.valid_hooks, in checkpoint_ebtables()
1282 table->replace.entries_size); in checkpoint_ebtables()
1283 if (table->replace.entries_size > sizeof(table->entrytable)) in checkpoint_ebtables()
1285 table->name, table->replace.entries_size); in checkpoint_ebtables()
1286 table->replace.num_counters = 0; in checkpoint_ebtables()
1287 table->replace.entries = table->entrytable; in checkpoint_ebtables()
1288 optlen = sizeof(table->replace) + table->replace.entries_size; in checkpoint_ebtables()
1289 if (getsockopt(fd, SOL_IP, EBT_SO_GET_INIT_ENTRIES, &table->replace, &optlen)) in checkpoint_ebtables()
1297 struct ebt_replace replace; in reset_ebtables() local
1314 if (table->replace.valid_hooks == 0) in reset_ebtables()
1316 memset(&replace, 0, sizeof(replace)); in reset_ebtables()
1317 strcpy(replace.name, table->name); in reset_ebtables()
1318 optlen = sizeof(replace); in reset_ebtables()
1319 if (getsockopt(fd, SOL_IP, EBT_SO_GET_INFO, &replace, &optlen)) in reset_ebtables()
1321 replace.num_counters = 0; in reset_ebtables()
1322 table->replace.entries = 0; in reset_ebtables()
1324 table->replace.hook_entry[h] = 0; in reset_ebtables()
1325 if (memcmp(&table->replace, &replace, sizeof(table->replace)) == 0) { in reset_ebtables()
1327 replace.entries = entrytable; in reset_ebtables()
1328 optlen = sizeof(replace) + replace.entries_size; in reset_ebtables()
1329 if (getsockopt(fd, SOL_IP, EBT_SO_GET_ENTRIES, &replace, &optlen)) in reset_ebtables()
1331 if (memcmp(table->entrytable, entrytable, replace.entries_size) == 0) in reset_ebtables()
1337 if (table->replace.valid_hooks & (1 << h)) { in reset_ebtables()
1338 table->replace.hook_entry[h] = (struct ebt_entries*)table->entrytable + j; in reset_ebtables()
1342 table->replace.entries = table->entrytable; in reset_ebtables()
1343 optlen = sizeof(table->replace) + table->replace.entries_size; in reset_ebtables()
1344 if (setsockopt(fd, SOL_IP, EBT_SO_SET_ENTRIES, &table->replace, optlen)) in reset_ebtables()