1 /* $NetBSD: filter.h,v 1.4 2011/02/10 14:04:30 rmind Exp $ */ 2 3 /* 4 * Copyright (c) 2004, 2005 Camiel Dobbelaar, <cd@sentia.nl> 5 * 6 * Permission to use, copy, modify, and distribute this software for any 7 * purpose with or without fee is hereby granted, provided that the above 8 * copyright notice and this permission notice appear in all copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 */ 18 19 #ifndef _FTP_PROXY_FILTER_H_ 20 #define _FTP_PROXY_FILTER_H_ 21 22 typedef struct { 23 void (*init_filter)(char *, char *, int); 24 int (*add_filter)(uint32_t, uint8_t, struct sockaddr *, 25 struct sockaddr *, uint16_t); 26 int (*add_nat)(uint32_t, struct sockaddr *, struct sockaddr *, 27 uint16_t, struct sockaddr *, u_int16_t, u_int16_t); 28 int (*add_rdr)(uint32_t, struct sockaddr *, struct sockaddr *, 29 uint16_t, struct sockaddr *, uint16_t); 30 int (*server_lookup)(struct sockaddr *, struct sockaddr *, 31 struct sockaddr *); 32 int (*prepare_commit)(u_int32_t); 33 int (*do_commit)(void); 34 int (*do_rollback)(void); 35 } ftp_proxy_ops_t; 36 37 extern const ftp_proxy_ops_t pf_fprx_ops; 38 39 #if defined(__NetBSD__) 40 41 extern const char * netif; 42 43 #if defined(WITH_NPF) 44 extern const ftp_proxy_ops_t npf_fprx_ops; 45 extern char * npfopts; 46 #endif 47 48 #if defined(WITH_IPF) 49 extern const ftp_proxy_ops_t ipf_fprx_ops; 50 #endif 51 52 #endif 53 54 #endif 55