]>
Commit | Line | Data |
---|---|---|
a4437962 | 1 | diff -urN iptables-1.2.11/extensions/libipt_stealth.c iptables-1.2.11/extensions/libipt_stealth.c |
2 | --- iptables-1.2.11/extensions/libipt_stealth.c 1969-12-31 19:00:00 -0500 | |
3 | +++ iptables-1.2.11/extensions/libipt_stealth.c 2004-07-13 21:14:15 -0400 | |
4 | @@ -0,0 +1,62 @@ | |
5 | +/* Shared library add-on to iptables to add stealth support. | |
6 | + * Copyright (C) 2002 Brad Spengler <spender@grsecurity.net> | |
7 | + * This netfilter module is licensed under the GNU GPL. | |
8 | + */ | |
9 | + | |
10 | +#include <stdio.h> | |
11 | +#include <netdb.h> | |
12 | +#include <stdlib.h> | |
13 | +#include <getopt.h> | |
14 | +#include <iptables.h> | |
15 | + | |
16 | +/* Function which prints out usage message. */ | |
17 | +static void | |
18 | +help(void) | |
19 | +{ | |
20 | + printf("stealth v%s takes no options\n\n", XTABLES_VERSION); | |
21 | +} | |
22 | + | |
23 | +static struct option opts[] = { | |
24 | + {0} | |
25 | +}; | |
26 | + | |
27 | +/* Initialize the match. */ | |
28 | +static void | |
29 | +init(struct ipt_entry_match *m, unsigned int *nfcache) | |
30 | +{ | |
31 | + *nfcache |= NFC_UNKNOWN; | |
32 | +} | |
33 | + | |
34 | +static int | |
35 | +parse(int c, char **argv, int invert, unsigned int *flags, | |
36 | + const void *entry, struct xt_entry_match **match) | |
37 | +{ | |
38 | + return 0; | |
39 | +} | |
40 | + | |
41 | +static void | |
42 | +final_check(unsigned int flags) | |
43 | +{ | |
44 | + return; | |
45 | +} | |
46 | + | |
47 | +static | |
48 | +struct xtables_match stealth = { | |
49 | + .next = NULL, | |
50 | + .name = "stealth", | |
51 | + .version = XTABLES_VERSION, | |
52 | + .size = IPT_ALIGN(0), | |
53 | + .userspacesize = IPT_ALIGN(0), | |
54 | + .help = &help, | |
55 | + .init = &init, | |
56 | + .parse = &parse, | |
57 | + .final_check = &final_check, | |
58 | + .print = NULL, | |
59 | + .save = NULL, | |
60 | + .extra_opts = opts | |
61 | +}; | |
62 | + | |
63 | +void _init(void) | |
64 | +{ | |
65 | + xtables_register_match(&stealth); | |
66 | +} |