Lines Matching refs:ebt_replace
50 static struct ebt_replace *translate_user2kernel(struct ebt_u_replace *u_repl)
52 struct ebt_replace *new;
61 new = (struct ebt_replace *)malloc(sizeof(struct ebt_replace));
186 static void store_table_in_file(char *filename, struct ebt_replace *repl)
198 size = sizeof(struct ebt_replace) + repl->entries_size +
203 memcpy(data, repl, sizeof(struct ebt_replace));
204 memcpy(data + sizeof(struct ebt_replace), (char *)repl->entries,
207 memset(data + sizeof(struct ebt_replace) + repl->entries_size,
219 struct ebt_replace *repl;
221 /* Translate the struct ebt_u_replace to a struct ebt_replace */
228 optlen = sizeof(struct ebt_replace) + repl->entries_size;
255 struct ebt_replace hlp;
267 fseek(file, entries_size + sizeof(struct ebt_replace), SEEK_SET)) {
288 struct ebt_replace repl;
379 sizeof(struct ebt_replace);
380 /* Now put the stuff in the kernel's struct ebt_replace */
576 static int retrieve_from_file(char *filename, struct ebt_replace *repl,
595 if (fread(repl, sizeof(char), sizeof(struct ebt_replace), file)
596 != sizeof(struct ebt_replace)) {
613 size = sizeof(struct ebt_replace) +
634 if (fseek(file, sizeof(struct ebt_replace), SEEK_SET) ||
637 fseek(file, sizeof(struct ebt_replace) + repl->entries_size,
653 static int retrieve_from_kernel(struct ebt_replace *repl, char command,
660 optlen = sizeof(struct ebt_replace);
702 struct ebt_replace repl;
717 /* Translate the struct ebt_replace to a struct ebt_u_replace */