1/* 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", IPTABLES_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
55static
56struct iptables_match record_rpc
57= { NULL,
58    "record_rpc",
59    IPTABLES_VERSION,
60    IPT_ALIGN(0),
61    IPT_ALIGN(0),
62    &help,
63    &init,
64    &parse,
65    &final_check,
66    &print,
67    &save,
68    opts
69};
70
71void _init(void)
72{
73	register_match(&record_rpc);
74}
75