libip6t_eui64.c revision 03d99486d8283552705b58dc55b6085dffc38792
1/* Shared library add-on to ip6tables to add EUI64 address checking support. */
2#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
14static void eui64_help(void)
15{
16	printf(
17"eui64 match options:\n"
18" This module hasn't got any option\n"
19" This module checks for EUI64 IPv6 addresses\n");
20}
21
22static int eui64_parse(int c, char **argv, int invert, unsigned int *flags,
23                       const void *entry, struct xt_entry_match **match)
24{
25	return 0;
26}
27
28static struct xtables_match eui64_mt6_reg = {
29	.name 		= "eui64",
30	.version	= XTABLES_VERSION,
31	.family		= NFPROTO_IPV6,
32	.size		= XT_ALIGN(sizeof(int)),
33	.userspacesize	= XT_ALIGN(sizeof(int)),
34	.help		= eui64_help,
35	.parse		= eui64_parse,
36};
37
38void _init(void)
39{
40	xtables_register_match(&eui64_mt6_reg);
41}
42