* src/conf/nwfilter_conf.h: Indent cpp directives.
* src/conf/nwfilter_params.h: Likewise.
* src/datatypes.h: Likewise.
* src/nwfilter/nwfilter_driver.h: Likewise.
* src/nwfilter/nwfilter_ebiptables_driver.h: Likewise.
* src/nwfilter/nwfilter_gentech_driver.h: Likewise.
* Author: Stefan Berger <stefanb@us.ibm.com>
*/
#ifndef NWFILTER_CONF_H
-#define NWFILTER_CONF_H
+# define NWFILTER_CONF_H
-#include <stdint.h>
-#include <stddef.h>
+# include <stdint.h>
+# include <stddef.h>
-#include "internal.h"
-#include "util.h"
-#include "hash.h"
-#include "xml.h"
+# include "internal.h"
+# include "util.h"
+# include "hash.h"
+# include "xml.h"
/**
* Chain suffix size is:
* terminating '0' =
* 32-3-15-1-1 = 12
*/
-#define MAX_CHAIN_SUFFIX_SIZE 12
+# define MAX_CHAIN_SUFFIX_SIZE 12
enum virNWFilterEntryItemFlags {
};
-#define HAS_ENTRY_ITEM(data) \
+# define HAS_ENTRY_ITEM(data) \
(((data)->flags) & NWFILTER_ENTRY_ITEM_FLAG_EXISTS)
-#define ENTRY_GET_NEG_SIGN(data) \
+# define ENTRY_GET_NEG_SIGN(data) \
((((data)->flags) & NWFILTER_ENTRY_ITEM_FLAG_IS_NEG) ? "!" : "")
// datatypes appearing in rule attributes
};
-#define MAX_RULE_PRIORITY 1000
+# define MAX_RULE_PRIORITY 1000
typedef struct _virNWFilterRuleDef virNWFilterRuleDef;
int virNWFilterParamConfLayerInit(void);
void virNWFilterParamConfLayerShutdown(void);
-#define virNWFilterReportError(conn, code, fmt...) \
+# define virNWFilterReportError(conn, code, fmt...) \
virReportErrorHelper(conn, VIR_FROM_NWFILTER, code, __FILE__, \
__FUNCTION__, __LINE__, fmt)
* Author: Stefan Berger <stefanb@us.ibm.com>
*/
#ifndef NWFILTER_PARAMS_H
-#define NWFILTER_PARAMS_H
+# define NWFILTER_PARAMS_H
-#include "hash.h"
+# include "hash.h"
typedef struct _virNWFilterHashTable virNWFilterHashTable;
typedef virNWFilterHashTable *virNWFilterHashTablePtr;
* magic value used to protect the API when pointers to network filter
* pool structures are passed down by the users.
*/
-#define VIR_NWFILTER_MAGIC 0xDEAD7777
-#define VIR_IS_NWFILTER(obj) ((obj) && (obj)->magic==VIR_NWFILTER_MAGIC)
-#define VIR_IS_CONNECTED_NWFILTER(obj) (VIR_IS_NWFILTER(obj) && VIR_IS_CONNECT((obj)->conn))
+# define VIR_NWFILTER_MAGIC 0xDEAD7777
+# define VIR_IS_NWFILTER(obj) ((obj) && (obj)->magic==VIR_NWFILTER_MAGIC)
+# define VIR_IS_CONNECTED_NWFILTER(obj) (VIR_IS_NWFILTER(obj) && VIR_IS_CONNECT((obj)->conn))
/**
*/
#ifndef __VIR_NWFILTER_DRIVER_H__
-#define __VIR_NWFILTER_DRIVER_H__
+# define __VIR_NWFILTER_DRIVER_H__
-#include "nwfilter_params.h"
-#include "nwfilter_conf.h"
+# include "nwfilter_params.h"
+# include "nwfilter_conf.h"
int nwfilterRegister(void);
* Author: Stefan Berger <stefanb@us.ibm.com>
*/
#ifndef VIR_NWFILTER_EBTABLES_DRIVER_H__
-#define VIR_NWFILTER_EBTABLES_DRIVER_H__
+# define VIR_NWFILTER_EBTABLES_DRIVER_H__
-#define MAX_CHAINNAME_LENGTH 32 /* see linux/netfilter_bridge/ebtables.h */
+# define MAX_CHAINNAME_LENGTH 32 /* see linux/netfilter_bridge/ebtables.h */
enum RuleType {
RT_EBTABLES,
extern virNWFilterTechDriver ebiptables_driver;
-#define EBIPTABLES_DRIVER_ID "ebiptables"
+# define EBIPTABLES_DRIVER_ID "ebiptables"
#endif
* Author: Stefan Berger <stefanb@us.ibm.com>
*/
#ifndef __NWFILTER_GENTECH_DRIVER_H
-#define __NWFILTER_GENTECH_DRIVER_H
+# define __NWFILTER_GENTECH_DRIVER_H
virNWFilterTechDriverPtr virNWFilterTechDriverForName(const char *name);