Busybox: Upgrade to 1.21.1 (stable). lsof active.
[tomato.git] / release / src / router / iptables / extensions / libipt_record_rpc.c
blob571d286bfe23f377cf9f9de5cbaf77fdbcde6fc4
1 /* Shared library add-on to iptables for rpc match */
2 #include <stdio.h>
3 #include <getopt.h>
4 #include <iptables.h>
6 /* Function which prints out usage message. */
7 static void
8 help(void)
10 printf(
11 "record_rpc v%s takes no options\n"
12 "\n", IPTABLES_VERSION);
15 static struct option opts[] = {
16 {0}
19 /* Function which parses command options; returns true if it
20 ate an option */
21 static int
22 parse(int c, char **argv, int invert, unsigned int *flags,
23 const struct ipt_entry *entry,
24 unsigned int *nfcache,
25 struct ipt_entry_match **match)
27 return 0;
30 /* Final check; must have specified --mac. */
31 static void final_check(unsigned int flags)
35 /* Prints out the union ipt_matchinfo. */
36 static void
37 print(const struct ipt_ip *ip,
38 const struct ipt_entry_match *match,
39 int numeric)
43 static void save(const struct ipt_ip *ip, const struct ipt_entry_match *match)
47 static
48 struct iptables_match record_rpc = {
49 .next = NULL,
50 .name = "record_rpc",
51 .version = IPTABLES_VERSION,
52 .size = IPT_ALIGN(0),
53 .userspacesize = IPT_ALIGN(0),
54 .help = &help,
55 .parse = &parse,
56 .final_check = &final_check,
57 .print = &print,
58 .save = &save,
59 .extra_opts = opts
62 void _init(void)
64 register_match(&record_rpc);