blob: 28f8179cfc1728df1a650182c21babbf0fe5d72e [file] [log] [blame]
Harald Weltee920f292002-03-24 20:57:26 +00001/* Shared library add-on to ip6tables to add EUI64 address checking support. */
András Kis-Szabó81adae92001-04-12 15:35:32 +00002#include <stdio.h>
3#include <netdb.h>
4#include <string.h>
5#include <stdlib.h>
6#include <getopt.h>
7#if defined(__GLIBC__) && __GLIBC__ == 2
8#include <net/ethernet.h>
9#else
10#include <linux/if_ether.h>
11#endif
12#include <ip6tables.h>
13
14/* Function which prints out usage message. */
15static void
16help(void)
17{
18 printf(
Harald Weltee920f292002-03-24 20:57:26 +000019"eui64 v%s options:\n"
András Kis-Szabó81adae92001-04-12 15:35:32 +000020" This module hasn't got any option\n"
Harald Weltee920f292002-03-24 20:57:26 +000021" This module checks for EUI64 IPv6 addresses\n"
Harald Welte80fe35d2002-05-29 13:08:15 +000022"\n", IPTABLES_VERSION);
András Kis-Szabó81adae92001-04-12 15:35:32 +000023}
24
András Kis-Szabó81adae92001-04-12 15:35:32 +000025/* Function which parses command options; returns true if it
26 ate an option */
27static int
28parse(int c, char **argv, int invert, unsigned int *flags,
Yasuyuki KOZAKAIa620c612007-07-24 06:03:45 +000029 const void *entry,
Yasuyuki KOZAKAIb85256b2007-07-24 05:58:56 +000030 struct xt_entry_match **match)
András Kis-Szabó81adae92001-04-12 15:35:32 +000031{
32 return 0;
33}
34
Harald Welte02aa7332005-02-01 15:38:20 +000035static struct ip6tables_match eui64 = {
36 .name = "eui64",
37 .version = IPTABLES_VERSION,
38 .size = IP6T_ALIGN(sizeof(int)),
39 .userspacesize = IP6T_ALIGN(sizeof(int)),
40 .help = &help,
Harald Welte02aa7332005-02-01 15:38:20 +000041 .parse = &parse,
András Kis-Szabó81adae92001-04-12 15:35:32 +000042};
43
44void _init(void)
45{
Harald Weltee920f292002-03-24 20:57:26 +000046 register_match6(&eui64);
András Kis-Szabó81adae92001-04-12 15:35:32 +000047}