libipt_MIRROR.c revision 8b7c64d6ba156a99008fcd810cba874c73294333
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 10/* Function which prints out usage message. */ 11static void MIRROR_help(void) 12{ 13 printf("MIRROR target takes no options\n"); 14} 15 16/* Function which parses command options; returns true if it 17 ate an option */ 18static int MIRROR_parse(int c, char **argv, int invert, unsigned int *flags, 19 const void *entry, struct xt_entry_target **target) 20{ 21 return 0; 22} 23 24static struct xtables_target mirror_tg_reg = { 25 .name = "MIRROR", 26 .version = XTABLES_VERSION, 27 .family = PF_INET, 28 .size = XT_ALIGN(0), 29 .userspacesize = XT_ALIGN(0), 30 .help = MIRROR_help, 31 .parse = MIRROR_parse, 32 .print = NULL, 33 .save = NULL, 34}; 35 36void _init(void) 37{ 38 xtables_register_target(&mirror_tg_reg); 39} 40