1 /* Shared library add-on to ip6tables to add EUI64 address checking support. */
7 #if defined(__GLIBC__) && __GLIBC__ == 2
8 #include <net/ethernet.h>
10 #include <linux/if_ether.h>
12 #include <ip6tables.h>
14 /* Function which prints out usage message. */
19 "eui64 v%s options:\n"
20 " This module hasn't got any option\n"
21 " This module checks for EUI64 IPv6 addresses\n"
22 "\n", IPTABLES_VERSION
);
25 static struct option opts
[] = {
29 /* Function which parses command options; returns true if it
32 parse(int c
, char **argv
, int invert
, unsigned int *flags
,
33 const struct ip6t_entry
*entry
,
34 unsigned int *nfcache
,
35 struct ip6t_entry_match
**match
)
41 static void final_check(unsigned int flags
)
45 /* Prints out the matchinfo. */
47 print(const struct ip6t_ip6
*ip
,
48 const struct ip6t_entry_match
*match
,
54 /* Saves the union ip6t_matchinfo in parsable form to stdout. */
55 static void save(const struct ip6t_ip6
*ip
, const struct ip6t_entry_match
*match
)
60 static struct ip6tables_match eui64
= {
62 .version
= IPTABLES_VERSION
,
63 .size
= IP6T_ALIGN(sizeof(int)),
64 .userspacesize
= IP6T_ALIGN(sizeof(int)),
67 .final_check
= &final_check
,
75 register_match6(&eui64
);