blob: eebc7c55b49edecd1498d8d4b81dcb9dc1432530 [file] [log] [blame]
KOVACS Krisztian430bbc72008-10-15 11:50:34 +02001/*
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,
Jan Engelhardt03d99482008-11-18 12:27:54 +010028 .family = NFPROTO_IPV4,
KOVACS Krisztian430bbc72008-10-15 11:50:34 +020029 .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}