xref: /netbsd-src/dist/pf/libexec/tftp-proxy/filter.h (revision fff57c5525bbe431aee7bdb3983954f0627a42cb)
1 /*	$NetBSD: filter.h,v 1.2 2008/06/18 09:06:26 yamt Exp $ */
2 /*	$OpenBSD: filter.h,v 1.1 2005/12/28 19:07:07 jcs 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 #define	FTP_PROXY_ANCHOR "tftp-proxy"
21 
22 int add_filter(u_int32_t, u_int8_t, struct sockaddr *, struct sockaddr *,
23     u_int16_t, u_int8_t);
24 int add_nat(u_int32_t, struct sockaddr *, struct sockaddr *, u_int16_t,
25     struct sockaddr *, u_int16_t, u_int16_t, u_int8_t);
26 int add_rdr(u_int32_t, struct sockaddr *, struct sockaddr *, u_int16_t,
27     struct sockaddr *, u_int16_t, u_int8_t);
28 int do_commit(void);
29 int do_rollback(void);
30 void init_filter(char *, int);
31 int prepare_commit(u_int32_t);
32 int server_lookup(struct sockaddr *, struct sockaddr *, struct sockaddr *,
33     u_int8_t);
34