src/nwfilter: use #pragma once in headers

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Jonathon Jongsma 2019-06-18 11:12:34 -05:00 committed by Ján Tomko
parent b47fccfe70
commit 4273a30ecd
6 changed files with 21 additions and 38 deletions

View File

@ -20,10 +20,9 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBVIRT_NWFILTER_DHCPSNOOP_H #pragma once
# define LIBVIRT_NWFILTER_DHCPSNOOP_H
# include "nwfilter_tech_driver.h" #include "nwfilter_tech_driver.h"
int virNWFilterDHCPSnoopInit(void); int virNWFilterDHCPSnoopInit(void);
void virNWFilterDHCPSnoopShutdown(void); void virNWFilterDHCPSnoopShutdown(void);
@ -31,4 +30,3 @@ int virNWFilterDHCPSnoopReq(virNWFilterTechDriverPtr techdriver,
virNWFilterBindingDefPtr binding, virNWFilterBindingDefPtr binding,
virNWFilterDriverStatePtr driver); virNWFilterDriverStatePtr driver);
void virNWFilterDHCPSnoopEnd(const char *ifname); void virNWFilterDHCPSnoopEnd(const char *ifname);
#endif /* LIBVIRT_NWFILTER_DHCPSNOOP_H */

View File

@ -22,12 +22,9 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBVIRT_NWFILTER_DRIVER_H #pragma once
# define LIBVIRT_NWFILTER_DRIVER_H
# include "nwfilter_params.h" #include "nwfilter_params.h"
# include "nwfilter_conf.h" #include "nwfilter_conf.h"
int nwfilterRegister(void); int nwfilterRegister(void);
#endif /* LIBVIRT_NWFILTER_DRIVER_H */

View File

@ -19,17 +19,14 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBVIRT_NWFILTER_EBIPTABLES_DRIVER_H #pragma once
# define LIBVIRT_NWFILTER_EBIPTABLES_DRIVER_H
# include "nwfilter_tech_driver.h" #include "nwfilter_tech_driver.h"
# define MAX_CHAINNAME_LENGTH 32 /* see linux/netfilter_bridge/ebtables.h */ #define MAX_CHAINNAME_LENGTH 32 /* see linux/netfilter_bridge/ebtables.h */
extern virNWFilterTechDriver ebiptables_driver; extern virNWFilterTechDriver ebiptables_driver;
# define EBIPTABLES_DRIVER_ID "ebiptables" #define EBIPTABLES_DRIVER_ID "ebiptables"
# define IPTABLES_MAX_COMMENT_LENGTH 256 #define IPTABLES_MAX_COMMENT_LENGTH 256
#endif /* LIBVIRT_NWFILTER_EBIPTABLES_DRIVER_H */

View File

@ -20,12 +20,11 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBVIRT_NWFILTER_GENTECH_DRIVER_H #pragma once
# define LIBVIRT_NWFILTER_GENTECH_DRIVER_H
# include "virnwfilterobj.h" #include "virnwfilterobj.h"
# include "virnwfilterbindingdef.h" #include "virnwfilterbindingdef.h"
# include "nwfilter_tech_driver.h" #include "nwfilter_tech_driver.h"
virNWFilterTechDriverPtr virNWFilterTechDriverForName(const char *name); virNWFilterTechDriverPtr virNWFilterTechDriverForName(const char *name);
@ -55,5 +54,3 @@ virHashTablePtr virNWFilterCreateVarHashmap(const char *macaddr,
int virNWFilterBuildAll(virNWFilterDriverStatePtr driver, int virNWFilterBuildAll(virNWFilterDriverStatePtr driver,
bool newFilters); bool newFilters);
#endif /* LIBVIRT_NWFILTER_GENTECH_DRIVER_H */

View File

@ -21,13 +21,12 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBVIRT_NWFILTER_LEARNIPADDR_H #pragma once
# define LIBVIRT_NWFILTER_LEARNIPADDR_H
# include "conf/nwfilter_params.h" #include "conf/nwfilter_params.h"
# include "nwfilter_tech_driver.h" #include "nwfilter_tech_driver.h"
# include "virnwfilterbindingdef.h" #include "virnwfilterbindingdef.h"
# include <net/if.h> #include <net/if.h>
enum howDetect { enum howDetect {
DETECT_DHCP = 1, DETECT_DHCP = 1,
@ -49,5 +48,3 @@ void virNWFilterUnlockIface(const char *ifname);
int virNWFilterLearnInit(void); int virNWFilterLearnInit(void);
void virNWFilterLearnShutdown(void); void virNWFilterLearnShutdown(void);
void virNWFilterLearnThreadsTerminate(bool allowNewThreads); void virNWFilterLearnThreadsTerminate(bool allowNewThreads);
#endif /* LIBVIRT_NWFILTER_LEARNIPADDR_H */

View File

@ -21,10 +21,9 @@
* <http://www.gnu.org/licenses/>. * <http://www.gnu.org/licenses/>.
*/ */
#ifndef LIBVIRT_NWFILTER_TECH_DRIVER_H #pragma once
# define LIBVIRT_NWFILTER_TECH_DRIVER_H
# include "virnwfilterobj.h" #include "virnwfilterobj.h"
typedef struct _virNWFilterTechDriver virNWFilterTechDriver; typedef struct _virNWFilterTechDriver virNWFilterTechDriver;
typedef virNWFilterTechDriver *virNWFilterTechDriverPtr; typedef virNWFilterTechDriver *virNWFilterTechDriverPtr;
@ -90,5 +89,3 @@ struct _virNWFilterTechDriver {
virNWFilterDropAllRules applyDropAllRules; virNWFilterDropAllRules applyDropAllRules;
virNWFilterRemoveBasicRules removeBasicRules; virNWFilterRemoveBasicRules removeBasicRules;
}; };
#endif /* LIBVIRT_NWFILTER_TECH_DRIVER_H */