blob: 8754b9365405ff984748f433c171de6dcae996fe [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
Jan Engelhardt997045f2007-10-04 16:29:21 +000014static void eui64_help(void)
András Kis-Szabó81adae92001-04-12 15:35:32 +000015{
16 printf(
Jan Engelhardt8b7c64d2008-04-15 11:48:25 +020017"eui64 match options:\n"
András Kis-Szabó81adae92001-04-12 15:35:32 +000018" This module hasn't got any option\n"
Jan Engelhardt8b7c64d2008-04-15 11:48:25 +020019" This module checks for EUI64 IPv6 addresses\n");
András Kis-Szabó81adae92001-04-12 15:35:32 +000020}
21
Jan Engelhardt997045f2007-10-04 16:29:21 +000022static int eui64_parse(int c, char **argv, int invert, unsigned int *flags,
23 const void *entry, struct xt_entry_match **match)
András Kis-Szabó81adae92001-04-12 15:35:32 +000024{
25 return 0;
26}
27
Jan Engelhardt8b7c64d2008-04-15 11:48:25 +020028static struct xtables_match eui64_mt6_reg = {
Harald Welte02aa7332005-02-01 15:38:20 +000029 .name = "eui64",
Jan Engelhardt8b7c64d2008-04-15 11:48:25 +020030 .version = XTABLES_VERSION,
31 .family = PF_INET6,
32 .size = XT_ALIGN(sizeof(int)),
33 .userspacesize = XT_ALIGN(sizeof(int)),
Jan Engelhardt997045f2007-10-04 16:29:21 +000034 .help = eui64_help,
35 .parse = eui64_parse,
András Kis-Szabó81adae92001-04-12 15:35:32 +000036};
37
38void _init(void)
39{
Jan Engelhardt8b7c64d2008-04-15 11:48:25 +020040 xtables_register_match(&eui64_mt6_reg);
András Kis-Szabó81adae92001-04-12 15:35:32 +000041}