KOVACS Krisztian | 430bbc7 | 2008-10-15 11:50:34 +0200 | [diff] [blame] | 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 | |
| 10 | static void socket_mt_help(void) |
| 11 | { |
| 12 | printf("socket v%s has no options\n\n", XTABLES_VERSION); |
| 13 | } |
| 14 | |
| 15 | static 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 | |
| 21 | static void socket_mt_check(unsigned int flags) |
| 22 | { |
| 23 | } |
| 24 | |
| 25 | static struct xtables_match socket_mt_reg = { |
| 26 | .name = "socket", |
| 27 | .version = XTABLES_VERSION, |
Jan Engelhardt | 03d9948 | 2008-11-18 12:27:54 +0100 | [diff] [blame] | 28 | .family = NFPROTO_IPV4, |
KOVACS Krisztian | 430bbc7 | 2008-10-15 11:50:34 +0200 | [diff] [blame] | 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 | |
| 36 | void _init(void) |
| 37 | { |
| 38 | xtables_register_match(&socket_mt_reg); |
| 39 | } |