2 *****************************************************************************
6 * Author: Damien Stuart (dstuart@dstuart.org)
8 * Purpose: Header file for fw_util.c.
10 * Copyright 2010 Damien Stuart (dstuart@dstuart.org)
12 * License (GNU Public License):
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License
16 * as published by the Free Software Foundation; either version 2
17 * of the License, or (at your option) any later version.
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, write to the Free Software
26 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
29 *****************************************************************************
34 #define CMD_BUFSIZE 256
35 #define MAX_FW_COMMAND_ARGS_LEN 256
37 #define STANDARD_CMD_OUT_BUFSIZE 4096
39 #define EXPIRE_COMMENT_PREFIX "_exp_"
42 #include "fw_util_iptables.h"
44 #include "fw_util_ipfw.h"
46 #include "fw_util_pf.h"
48 #include "fw_util_ipf.h"
55 /* Function prototypes.
57 * Note: These are the public functions for managing firewall rules.
58 * They should be implemented in each of the corresponding
59 * fw_util_<fw-type>.c files.
61 void fw_config_init(fko_srv_options_t *opts);
62 void fw_initialize(const fko_srv_options_t *opts);
63 int fw_cleanup(const fko_srv_options_t *opts);
64 void check_firewall_rules(const fko_srv_options_t *opts);
65 int fw_dump_rules(const fko_srv_options_t *opts);
66 int process_spa_request(const fko_srv_options_t *opts, const acc_stanza_t *acc, spa_data_t *spdat);
68 #endif /* FW_UTIL_H */