blob: b9e364e9ae46eb9830775dfedcab75732e250a2d [file] [log] [blame]
Rusty Russell79dee072000-05-02 16:45:16 +00001#ifndef _IP6TABLES_USER_H
2#define _IP6TABLES_USER_H
3
Yasuyuki KOZAKAI0d502bc2007-07-24 05:52:07 +00004#include <xtables.h>
5
Rusty Russell79dee072000-05-02 16:45:16 +00006#include "iptables_common.h"
7#include "libiptc/libip6tc.h"
8
Martin Josefsson357d59d2004-12-27 19:49:28 +00009#ifndef IP6T_LIB_DIR
10#define IP6T_LIB_DIR "/usr/local/lib/iptables"
11#endif
12
Patrick McHardy2452baf2006-04-28 08:10:08 +000013#ifndef IPPROTO_SCTP
14#define IPPROTO_SCTP 132
15#endif
16#ifndef IPPROTO_DCCP
17#define IPPROTO_DCCP 33
18#endif
Patrick McHardy95616062007-01-11 09:08:22 +000019#ifndef IPPROTO_UDPLITE
20#define IPPROTO_UDPLITE 136
21#endif
Patrick McHardy2452baf2006-04-28 08:10:08 +000022
Rémi Denis-Courmont06652172006-10-20 12:24:34 +000023#ifndef IP6T_SO_GET_REVISION_MATCH /* Old kernel source. */
Yasuyuki KOZAKAI4ebfad02006-11-13 04:03:26 +000024#define IP6T_SO_GET_REVISION_MATCH 68
25#define IP6T_SO_GET_REVISION_TARGET 69
Rémi Denis-Courmont06652172006-10-20 12:24:34 +000026#endif /* IP6T_SO_GET_REVISION_MATCH Old kernel source */
27
Yasuyuki KOZAKAI0d502bc2007-07-24 05:52:07 +000028#define ip6tables_rule_match xtables_rule_match
29#define ip6tables_match xtables_match
30#define ip6tables_target xtables_target
31#define ip6t_tryload xt_tryload
Rusty Russell79dee072000-05-02 16:45:16 +000032
Harald Weltea8658ca2003-03-05 07:46:15 +000033extern int line;
34
Rusty Russell79dee072000-05-02 16:45:16 +000035/* Your shared library should call one of these. */
36extern void register_match6(struct ip6tables_match *me);
37extern void register_target6(struct ip6tables_target *me);
38
Phil Oester58179b12006-07-20 17:00:19 +000039extern int service_to_port(const char *name, const char *proto);
Phil Oesterdbac8ad2006-07-20 17:01:54 +000040extern u_int16_t parse_port(const char *port, const char *proto);
Rusty Russell79dee072000-05-02 16:45:16 +000041extern int do_command6(int argc, char *argv[], char **table,
42 ip6tc_handle_t *handle);
Yasuyuki KOZAKAI9867e812005-06-22 12:24:21 +000043extern void parse_interface(const char *arg, char *vianame, unsigned char *mask);
44
András Kis-Szabó764316a2001-02-26 17:31:20 +000045extern int for_each_chain(int (*fn)(const ip6t_chainlabel, int, ip6tc_handle_t *), int verbose, int builtinstoo, ip6tc_handle_t *handle);
46extern int flush_entries(const ip6t_chainlabel chain, int verbose, ip6tc_handle_t *handle);
47extern int delete_chain(const ip6t_chainlabel chain, int verbose, ip6tc_handle_t *handle);
48
Rusty Russell79dee072000-05-02 16:45:16 +000049#endif /*_IP6TABLES_USER_H*/