diff options
author | Rusty Russell <rusty@linuxcare.com.au> | 2001-01-07 06:49:25 +0000 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2001-01-07 06:49:25 +0000 |
commit | 55bfdee763153a9d35efb95c689e9383cab44808 (patch) | |
tree | 0b2320726ea9562056301af1c3fef95088afea27 /extensions/libipt_record_rpc.c | |
parent | 1cef74d943055668b5e356eebea877fdaa1ce3e0 (diff) |
Forgot to add this before, I think.
Diffstat (limited to 'extensions/libipt_record_rpc.c')
-rw-r--r-- | extensions/libipt_record_rpc.c | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/extensions/libipt_record_rpc.c b/extensions/libipt_record_rpc.c new file mode 100644 index 00000000..f0c86bae --- /dev/null +++ b/extensions/libipt_record_rpc.c @@ -0,0 +1,73 @@ +/* Shared library add-on to iptables for rpc match */ +#include <stdio.h> +#include <getopt.h> +#include <iptables.h> + +/* Function which prints out usage message. */ +static void +help(void) +{ + printf( +"record_rpc v%s takes no options\n" +"\n", NETFILTER_VERSION); +} + +static struct option opts[] = { + {0} +}; + +static void +init(struct ipt_entry_match *m, unsigned int *nfcache) +{ + /* Can't cache this. */ + *nfcache |= NFC_UNKNOWN; +} + + +/* Function which parses command options; returns true if it + ate an option */ +static int +parse(int c, char **argv, int invert, unsigned int *flags, + const struct ipt_entry *entry, + unsigned int *nfcache, + struct ipt_entry_match **match) +{ + return 0; +} + +/* Final check; must have specified --mac. */ +static void final_check(unsigned int flags) +{ +} + +/* Prints out the union ipt_matchinfo. */ +static void +print(const struct ipt_ip *ip, + const struct ipt_entry_match *match, + int numeric) +{ +} + +static void save(const struct ipt_ip *ip, const struct ipt_entry_match *match) +{ +} + +struct iptables_match record_rpc += { NULL, + "record_rpc", + NETFILTER_VERSION, + IPT_ALIGN(0), + IPT_ALIGN(0), + &help, + &init, + &parse, + &final_check, + &print, + &save, + opts +}; + +void _init(void) +{ + register_match(&record_rpc); +} |