From 55bfdee763153a9d35efb95c689e9383cab44808 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Sun, 7 Jan 2001 06:49:25 +0000 Subject: Forgot to add this before, I think. --- extensions/libipt_record_rpc.c | 73 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 extensions/libipt_record_rpc.c (limited to 'extensions') 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 +#include +#include + +/* 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); +} -- cgit v1.2.3