libipt_MIRROR.c revision 1d5b63d12984d12c8d87242179855e17657be16d
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( 14"MIRROR target v%s takes no options\n", 15IPTABLES_VERSION); 16} 17 18/* Function which parses command options; returns true if it 19 ate an option */ 20static int MIRROR_parse(int c, char **argv, int invert, unsigned int *flags, 21 const void *entry, struct xt_entry_target **target) 22{ 23 return 0; 24} 25 26static struct iptables_target mirror_target = { 27 .name = "MIRROR", 28 .version = IPTABLES_VERSION, 29 .size = IPT_ALIGN(0), 30 .userspacesize = IPT_ALIGN(0), 31 .help = MIRROR_help, 32 .parse = MIRROR_parse, 33 .print = NULL, 34 .save = NULL, 35}; 36 37void _init(void) 38{ 39 register_target(&mirror_target); 40} 41