Lines Matching refs:repl
1119 static inline int iptcc_compile_rule (struct xtc_handle *h, STRUCT_REPLACE *repl, struct rule_head *r)
1138 memcpy((char *)repl->entries+r->offset, r->entry, r->size);
1144 static int iptcc_compile_chain(struct xtc_handle *h, STRUCT_REPLACE *repl, struct chain_head *c)
1154 head = (void *)repl->entries + c->head_offset;
1162 repl->hook_entry[c->hooknum-1] = c->head_offset;
1163 repl->underflow[c->hooknum-1] = c->foot_offset;
1168 ret = iptcc_compile_rule(h, repl, r);
1174 foot = (void *)repl->entries + c->foot_offset;
1250 static int iptcc_compile_table(struct xtc_handle *h, STRUCT_REPLACE *repl)
1257 int ret = iptcc_compile_chain(h, repl, c);
1263 error = (void *)repl->entries + repl->size - IPTCB_CHAIN_ERROR_SIZE;
2474 STRUCT_REPLACE *repl, unsigned int idx,
2484 newcounters->counters[idx] = repl->counters[mappos];
2489 STRUCT_REPLACE *repl, unsigned int idx,
2500 &repl->counters[mappos],
2521 STRUCT_REPLACE *repl;
2542 repl = malloc(sizeof(*repl) + new_size);
2543 if (!repl) {
2547 memset(repl, 0, sizeof(*repl) + new_size);
2557 repl->counters = malloc(sizeof(STRUCT_COUNTERS)
2559 if (!repl->counters) {
2571 strcpy(repl->name, handle->info.name);
2572 repl->num_entries = new_number;
2573 repl->size = new_size;
2575 repl->num_counters = handle->info.num_entries;
2576 repl->valid_hooks = handle->info.valid_hooks;
2579 repl->num_entries, repl->size, repl->num_counters);
2581 ret = iptcc_compile_table(handle, repl);
2593 write(fd, repl, sizeof(*repl) + repl->size);
2599 ret = setsockopt(handle->sockfd, TC_IPPROTO, SO_SET_REPLACE, repl,
2600 sizeof(*repl) + repl->size);
2619 counters_normal_map(newcounters, repl,
2624 counters_map_zeroed(newcounters, repl,
2644 repl,
2650 counters_map_zeroed(newcounters, repl,
2680 free(repl->counters);
2681 free(repl);
2690 free(repl->counters);
2692 free(repl);