blob: f0c86bae903ba316ca984b49d35a611721262353 [file] [log] [blame]
Rusty Russell55bfdee2001-01-07 06:49:25 +00001/* Shared library add-on to iptables for rpc match */
2#include <stdio.h>
3#include <getopt.h>
4#include <iptables.h>
5
6/* Function which prints out usage message. */
7static void
8help(void)
9{
10 printf(
11"record_rpc v%s takes no options\n"
12"\n", NETFILTER_VERSION);
13}
14
15static struct option opts[] = {
16 {0}
17};
18
19static void
20init(struct ipt_entry_match *m, unsigned int *nfcache)
21{
22 /* Can't cache this. */
23 *nfcache |= NFC_UNKNOWN;
24}
25
26
27/* Function which parses command options; returns true if it
28 ate an option */
29static int
30parse(int c, char **argv, int invert, unsigned int *flags,
31 const struct ipt_entry *entry,
32 unsigned int *nfcache,
33 struct ipt_entry_match **match)
34{
35 return 0;
36}
37
38/* Final check; must have specified --mac. */
39static void final_check(unsigned int flags)
40{
41}
42
43/* Prints out the union ipt_matchinfo. */
44static void
45print(const struct ipt_ip *ip,
46 const struct ipt_entry_match *match,
47 int numeric)
48{
49}
50
51static void save(const struct ipt_ip *ip, const struct ipt_entry_match *match)
52{
53}
54
55struct iptables_match record_rpc
56= { NULL,
57 "record_rpc",
58 NETFILTER_VERSION,
59 IPT_ALIGN(0),
60 IPT_ALIGN(0),
61 &help,
62 &init,
63 &parse,
64 &final_check,
65 &print,
66 &save,
67 opts
68};
69
70void _init(void)
71{
72 register_match(&record_rpc);
73}