xref: /netbsd-src/dist/pf/usr.sbin/ftp-proxy/ipf.h (revision bdc22b2e01993381dcefeff2bc9b56ca75a4235c)
1 /*	$NetBSD: ipf.h,v 1.2 2008/06/18 09:06:26 yamt Exp $ */
2 /*	$OpenBSD: filter.h,v 1.4 2007/08/01 09:31:41 henning Exp $ */
3 
4 /*
5  * Copyright (c) 2004, 2005 Camiel Dobbelaar, <cd@sentia.nl>
6  *
7  * Permission to use, copy, modify, and distribute this software for any
8  * purpose with or without fee is hereby granted, provided that the above
9  * copyright notice and this permission notice appear in all copies.
10  *
11  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 extern int ipf_enabled;
21 extern const char *netif;
22 
23 int ipf_add_filter(u_int32_t, u_int8_t, struct sockaddr *, struct sockaddr *,
24     u_int16_t);
25 int ipf_add_nat(u_int32_t, struct sockaddr *, struct sockaddr *, u_int16_t,
26     struct sockaddr *, u_int16_t, u_int16_t);
27 int ipf_add_rdr(u_int32_t, struct sockaddr *, struct sockaddr *, u_int16_t,
28     struct sockaddr *, u_int16_t);
29 int ipf_do_commit(void);
30 int ipf_do_rollback(void);
31 void ipf_init_filter(char *, char *, int);
32 int ipf_prepare_commit(u_int32_t);
33 int ipf_server_lookup(struct sockaddr *, struct sockaddr *, struct sockaddr *);
34