ip6tables.h revision 0d502bcdbc97ed359e84f6a21dfa0049b3b60a6c
1#ifndef _IP6TABLES_USER_H
2#define _IP6TABLES_USER_H
3
4#include <xtables.h>
5
6#include "iptables_common.h"
7#include "libiptc/libip6tc.h"
8
9#ifndef IP6T_LIB_DIR
10#define IP6T_LIB_DIR "/usr/local/lib/iptables"
11#endif
12
13#ifndef IPPROTO_SCTP
14#define IPPROTO_SCTP 132
15#endif
16#ifndef IPPROTO_DCCP
17#define IPPROTO_DCCP 33
18#endif
19#ifndef IPPROTO_UDPLITE
20#define IPPROTO_UDPLITE 136
21#endif
22
23#ifndef IP6T_SO_GET_REVISION_MATCH /* Old kernel source. */
24#define IP6T_SO_GET_REVISION_MATCH	68
25#define IP6T_SO_GET_REVISION_TARGET	69
26#endif /* IP6T_SO_GET_REVISION_MATCH   Old kernel source */
27
28#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
32
33extern int line;
34
35/* 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
39extern int service_to_port(const char *name, const char *proto);
40extern u_int16_t parse_port(const char *port, const char *proto);
41extern int do_command6(int argc, char *argv[], char **table,
42		       ip6tc_handle_t *handle);
43extern void parse_interface(const char *arg, char *vianame, unsigned char *mask);
44
45extern 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
49#endif /*_IP6TABLES_USER_H*/
50