libxt_socket.c revision 03d99486d8283552705b58dc55b6085dffc38792
1/* 2 * Shared library add-on to iptables to add early socket matching support. 3 * 4 * Copyright (C) 2007 BalaBit IT Ltd. 5 */ 6#include <stdio.h> 7#include <getopt.h> 8#include <xtables.h> 9 10static void socket_mt_help(void) 11{ 12 printf("socket v%s has no options\n\n", XTABLES_VERSION); 13} 14 15static int socket_mt_parse(int c, char **argv, int invert, unsigned int *flags, 16 const void *entry, struct xt_entry_match **match) 17{ 18 return 0; 19} 20 21static void socket_mt_check(unsigned int flags) 22{ 23} 24 25static struct xtables_match socket_mt_reg = { 26 .name = "socket", 27 .version = XTABLES_VERSION, 28 .family = NFPROTO_IPV4, 29 .size = XT_ALIGN(0), 30 .userspacesize = XT_ALIGN(0), 31 .parse = socket_mt_parse, 32 .final_check = socket_mt_check, 33 .help = socket_mt_help, 34}; 35 36void _init(void) 37{ 38 xtables_register_match(&socket_mt_reg); 39} 40