libxt_TRACE.c revision 8b7c64d6ba156a99008fcd810cba874c73294333
1/* Shared library add-on to iptables to add TRACE target support. */ 2#include <stdio.h> 3#include <string.h> 4#include <stdlib.h> 5#include <getopt.h> 6 7#include <xtables.h> 8#include <linux/netfilter/x_tables.h> 9 10/* Function which prints out usage message. */ 11static void TRACE_help(void) 12{ 13 printf("TRACE target takes no options\n"); 14} 15 16/* Function which parses command options; returns true if it 17 ate an option */ 18static int TRACE_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 trace_target = { 25 .family = AF_UNSPEC, 26 .name = "TRACE", 27 .version = XTABLES_VERSION, 28 .size = XT_ALIGN(0), 29 .userspacesize = XT_ALIGN(0), 30 .help = TRACE_help, 31 .parse = TRACE_parse, 32}; 33 34void _init(void) 35{ 36 xtables_register_target(&trace_target); 37} 38