libipt_MIRROR.c revision ddac6c5bc636003d664d25c08ea3fe176565096c
1/* Shared library add-on to iptables to add MIRROR target support. */ 2#include <stdio.h> 3#include <string.h> 4#include <stdlib.h> 5#include <getopt.h> 6 7#include <iptables.h> 8#include <linux/netfilter_ipv4/ip_tables.h> 9 10static void MIRROR_help(void) 11{ 12 printf("MIRROR target takes no options\n"); 13} 14 15static int MIRROR_parse(int c, char **argv, int invert, unsigned int *flags, 16 const void *entry, struct xt_entry_target **target) 17{ 18 return 0; 19} 20 21static struct xtables_target mirror_tg_reg = { 22 .name = "MIRROR", 23 .version = XTABLES_VERSION, 24 .family = PF_INET, 25 .size = XT_ALIGN(0), 26 .userspacesize = XT_ALIGN(0), 27 .help = MIRROR_help, 28 .parse = MIRROR_parse, 29 .print = NULL, 30 .save = NULL, 31}; 32 33void _init(void) 34{ 35 xtables_register_target(&mirror_tg_reg); 36} 37