fwknop/server/fw_util.h
Michael Rash 464dbe95d0 Update to print all firewall commands in --verbose mode
This commit makes it easier to determine exactly which commands fwknopd
runs in --verbose mode when interacting with the underlying firewall.
This commit also adds --verbose --verbose mode to the test suite.
2011-10-27 21:51:55 -04:00

71 lines
2.1 KiB
C

/*
*****************************************************************************
*
* File: fw_util.h
*
* Author: Damien Stuart (dstuart@dstuart.org)
*
* Purpose: Header file for fw_util.c.
*
* Copyright 2010 Damien Stuart (dstuart@dstuart.org)
*
* License (GNU Public License):
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
*****************************************************************************
*/
#ifndef FW_UTIL_H
#define FW_UTIL_H
#define CMD_BUFSIZE 256
#define MAX_FW_COMMAND_ARGS_LEN 256
#define STANDARD_CMD_OUT_BUFSIZE 4096
#define EXPIRE_COMMENT_PREFIX "_exp_"
#if FIREWALL_IPTABLES
#include "fw_util_iptables.h"
#elif FIREWALL_IPFW
#include "fw_util_ipfw.h"
#elif FIREWALL_PF
#include "fw_util_pf.h"
#elif FIREWALL_IPF
#include "fw_util_ipf.h"
#endif
#if HAVE_TIME_H
#include <time.h>
#endif
/* Function prototypes.
*
* Note: These are the public functions for managing firewall rules.
* They should be implemented in each of the corresponding
* fw_util_<fw-type>.c files.
*/
void fw_config_init(fko_srv_options_t *opts);
void fw_initialize(const fko_srv_options_t *opts);
int fw_cleanup(const fko_srv_options_t *opts);
void check_firewall_rules(const fko_srv_options_t *opts);
int fw_dump_rules(const fko_srv_options_t *opts);
int process_spa_request(const fko_srv_options_t *opts, spa_data_t *spdat);
#endif /* FW_UTIL_H */
/***EOF***/