2010-03-25 17:46:09 +00:00
|
|
|
/*
|
|
|
|
* nwfilter_ebiptables_driver.h: ebtables/iptables driver support
|
|
|
|
*
|
|
|
|
* Copyright (C) 2010 IBM Corporation
|
|
|
|
* Copyright (C) 2010 Stefan Berger
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library 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
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*
|
|
|
|
* Author: Stefan Berger <stefanb@us.ibm.com>
|
|
|
|
*/
|
|
|
|
#ifndef VIR_NWFILTER_EBTABLES_DRIVER_H__
|
2010-03-26 18:29:54 +00:00
|
|
|
# define VIR_NWFILTER_EBTABLES_DRIVER_H__
|
2010-03-25 17:46:09 +00:00
|
|
|
|
2010-03-26 18:29:54 +00:00
|
|
|
# define MAX_CHAINNAME_LENGTH 32 /* see linux/netfilter_bridge/ebtables.h */
|
2010-03-25 17:46:09 +00:00
|
|
|
|
2010-03-25 17:46:12 +00:00
|
|
|
enum RuleType {
|
|
|
|
RT_EBTABLES,
|
|
|
|
RT_IPTABLES,
|
2010-03-30 14:36:35 +00:00
|
|
|
RT_IP6TABLES,
|
2010-03-25 17:46:12 +00:00
|
|
|
};
|
|
|
|
|
2010-03-25 17:46:09 +00:00
|
|
|
typedef struct _ebiptablesRuleInst ebiptablesRuleInst;
|
|
|
|
typedef ebiptablesRuleInst *ebiptablesRuleInstPtr;
|
|
|
|
struct _ebiptablesRuleInst {
|
|
|
|
char *commandTemplate;
|
2011-11-18 16:58:17 +00:00
|
|
|
const char *neededProtocolChain;
|
2011-11-18 16:58:17 +00:00
|
|
|
virNWFilterChainPriority chainPriority;
|
2011-01-28 21:38:06 +00:00
|
|
|
char chainprefix; /* I for incoming, O for outgoing */
|
2011-11-18 16:58:18 +00:00
|
|
|
virNWFilterRulePriority priority;
|
2010-03-25 17:46:12 +00:00
|
|
|
enum RuleType ruleType;
|
2010-03-25 17:46:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
extern virNWFilterTechDriver ebiptables_driver;
|
|
|
|
|
2010-03-26 18:29:54 +00:00
|
|
|
# define EBIPTABLES_DRIVER_ID "ebiptables"
|
2010-03-25 17:46:09 +00:00
|
|
|
|
2010-09-30 19:56:09 +00:00
|
|
|
# define IPTABLES_MAX_COMMENT_LENGTH 256
|
|
|
|
|
2010-03-25 17:46:09 +00:00
|
|
|
#endif
|