extensions: use simpler header guards

This commit is contained in:
Jan Engelhardt
2021-07-17 11:24:47 +02:00
parent 87189b0051
commit 1f308c7262
25 changed files with 25 additions and 117 deletions

View File

@@ -7,10 +7,7 @@
* version 2.1 as published by the Free Software Foundation; *
* *
***************************************************************************/
#ifndef _xt_ACCOUNT_cl_H
#define _xt_ACCOUNT_cl_H
#pragma once
#include <xt_ACCOUNT.h>
#define LIBXT_ACCOUNT_VERSION "1.3"
@@ -55,6 +52,3 @@ const char *ipt_ACCOUNT_get_next_name(struct ipt_ACCOUNT_context *ctx);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -7,9 +7,7 @@
* version 2 as published by the Free Software Foundation; *
* *
***************************************************************************/
#ifndef _IPT_ACCOUNT_H
#define _IPT_ACCOUNT_H
#pragma once
/*
* Socket option interface shared between kernel (xt_ACCOUNT) and userspace
@@ -64,5 +62,3 @@ struct ipt_acc_handle_ip {
uint64_t dst_packets;
uint64_t dst_bytes;
};
#endif /* _IPT_ACCOUNT_H */

View File

@@ -1,6 +1,4 @@
#ifndef COMPAT_SKBUFF_H
#define COMPAT_SKBUFF_H 1
#pragma once
struct tcphdr;
struct udphdr;
@@ -12,5 +10,3 @@ struct udphdr;
#else
# define skb_secmark(skb) 0
#endif
#endif /* COMPAT_SKBUFF_H */

View File

@@ -1,12 +1,8 @@
/*
* Userspace-level compat hacks
*/
#ifndef _XTABLES_COMPAT_USER_H
#define _XTABLES_COMPAT_USER_H 1
#pragma once
/* linux-glibc-devel 2.6.34 header screwup */
#ifndef ALIGN
# define ALIGN(s, n) (((s) + ((n) - 1)) & ~((n) - 1))
#endif
#endif /* _XTABLES_COMPAT_USER_H */

View File

@@ -1,6 +1,4 @@
#ifndef _XTABLES_COMPAT_H
#define _XTABLES_COMPAT_H 1
#pragma once
#include <linux/kernel.h>
#include <linux/version.h>
#include "compat_skbuff.h"
@@ -47,5 +45,3 @@ static inline struct net *par_net(const struct xt_action_param *par)
# define proc_lseek llseek
# define proc_release release
#endif
#endif /* _XTABLES_COMPAT_H */

View File

@@ -1,6 +1,4 @@
#ifndef _COMPAT_XTNU_H
#define _COMPAT_XTNU_H 1
#pragma once
#include <linux/netfilter/x_tables.h>
struct module;
@@ -63,5 +61,3 @@ extern int xtnu_register_targets(struct xtnu_target *, unsigned int);
extern void xtnu_unregister_targets(struct xtnu_target *, unsigned int);
extern void *HX_memmem(const void *, size_t, const void *, size_t);
#endif /* _COMPAT_XTNU_H */

View File

@@ -8,9 +8,7 @@
*
* This program is released under the terms of GNU GPL version 2.
*/
#ifndef _XT_PKNOCK_H
#define _XT_PKNOCK_H
#pragma once
#define PKNOCK "xt_pknock: "
enum {
@@ -47,5 +45,3 @@ struct xt_pknock_nl_msg {
char rule_name[XT_PKNOCK_MAX_BUF_LEN+1];
__be32 peer_ip;
};
#endif /* _XT_PKNOCK_H */

View File

@@ -1,6 +1,4 @@
#ifndef _LINUX_NETFILTER_XT_CHAOS_H
#define _LINUX_NETFILTER_XT_CHAOS_H 1
#pragma once
enum xt_chaos_target_variant {
XTCHAOS_NORMAL,
XTCHAOS_TARPIT,
@@ -10,5 +8,3 @@ enum xt_chaos_target_variant {
struct xt_chaos_tginfo {
uint8_t variant;
};
#endif /* _LINUX_NETFILTER_XT_CHAOS_H */

View File

@@ -1,6 +1,4 @@
#ifndef _LINUX_NETFILTER_XT_DHCPMAC_H
#define _LINUX_NETFILTER_XT_DHCPMAC_H 1
#pragma once
#define DH_MAC_FMT "%02X:%02X:%02X:%02X:%02X:%02X"
#define DH_MAC_HEX(z) z[0], z[1], z[2], z[3], z[4], z[5]
@@ -8,5 +6,3 @@ struct dhcpmac_info {
unsigned char addr[ETH_ALEN];
uint8_t mask, invert;
};
#endif /* _LINUX_NETFILTER_XT_DHCPMAC_H */

View File

@@ -1,6 +1,4 @@
#ifndef _LINUX_NETFILTER_XT_DNETMAP_H
#define _LINUX_NETFILTER_XT_DNETMAP_H 1
#pragma once
#define DNETMAP_VERSION 2
enum {
@@ -17,5 +15,3 @@ struct xt_DNETMAP_tginfo {
__u8 flags;
__s32 ttl;
};
#endif

View File

@@ -1,5 +1,4 @@
#ifndef _LINUX_NETFILTER_XT_IPMARK_H
#define _LINUX_NETFILTER_XT_IPMARK_H 1
#pragma once
enum {
XT_IPMARK_SRC,
@@ -12,5 +11,3 @@ struct xt_ipmark_tginfo {
__u8 selector;
__u8 shift;
};
#endif /* _LINUX_NETFILTER_XT_IPMARK_H */

View File

@@ -1,9 +1,5 @@
#ifndef _LINUX_NETFILTER_XT_LOGMARK_TARGET_H
#define _LINUX_NETFILTER_XT_LOGMARK_TARGET_H 1
#pragma once
struct xt_logmark_tginfo {
char prefix[14];
u_int8_t level;
};
#endif /* _LINUX_NETFILTER_XT_LOGMARK_TARGET_H */

View File

@@ -1,9 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
/* Protocol modification module for IP tables */
#ifndef _XT_PROTO_H
#define _XT_PROTO_H
#pragma once
#include <linux/types.h>
enum {
@@ -16,5 +13,3 @@ struct xt_PROTO_info {
__u8 mode;
__u8 proto;
};
#endif

View File

@@ -1,5 +1,4 @@
#ifndef _LINUX_NETFILTER_XT_TARPIT_H
#define _LINUX_NETFILTER_XT_TARPIT_H 1
#pragma once
enum xt_tarpit_target_variant {
XTTARPIT_TARPIT,
@@ -10,5 +9,3 @@ enum xt_tarpit_target_variant {
struct xt_tarpit_tginfo {
uint8_t variant;
};
#endif /* _LINUX_NETFILTER_XT_TARPIT_H */

View File

@@ -1,5 +1,4 @@
#ifndef _XT_CONDITION_H
#define _XT_CONDITION_H
#pragma once
enum {
CONDITION_NAME_LEN = 31,
@@ -12,5 +11,3 @@ struct xt_condition_mtinfo {
/* Used internally by the kernel */
void *condvar __attribute__((aligned(8)));
};
#endif /* _XT_CONDITION_H */

View File

@@ -1,5 +1,4 @@
#ifndef _LINUX_NETFILTER_XT_FUZZY_H
#define _LINUX_NETFILTER_XT_FUZZY_H 1
#pragma once
enum {
FUZZY_MIN_RATE = 3,
@@ -16,5 +15,3 @@ struct xt_fuzzy_mtinfo {
uint32_t mean_rate;
uint8_t acceptance_rate;
};
#endif /* _LINUX_NETFILTER_XT_FUZZY_H */

View File

@@ -10,8 +10,7 @@
* Samuel Jean
* Nicolas Bouliane
*/
#ifndef _LINUX_NETFILTER_XT_GEOIP_H
#define _LINUX_NETFILTER_XT_GEOIP_H 1
#pragma once
enum {
XT_GEOIP_SRC = 1 << 0, /* Perform check on Source IP */
@@ -54,5 +53,3 @@ struct xt_geoip_match_info {
};
#define COUNTRY(cc) ((cc) >> 8), ((cc) & 0x00FF)
#endif /* _LINUX_NETFILTER_XT_GEOIP_H */

View File

@@ -1,9 +1,5 @@
#ifndef _XT_GRADM_H
#define _XT_GRADM_H
#pragma once
struct xt_gradm_mtinfo {
__u16 flags;
__u16 invflags;
};
#endif

View File

@@ -1,5 +1,4 @@
#ifndef _LINUX_NETFILTER_XT_IFACE_H
#define _LINUX_NETFILTER_XT_IFACE_H 1
#pragma once
enum {
XT_IFACE_UP = 1 << 0,
@@ -22,5 +21,3 @@ struct xt_iface_mtinfo {
__u16 flags;
__u16 invflags;
};
#endif

View File

@@ -1,5 +1,4 @@
#ifndef __IPT_IPP2P_H
#define __IPT_IPP2P_H
#pragma once
#define IPP2P_VERSION "0.10"
enum {
@@ -42,5 +41,3 @@ struct ipt_p2p_info {
int cmd;
int debug;
};
#endif //__IPT_IPP2P_H

View File

@@ -1,5 +1,4 @@
#ifndef _LINUX_NETFILTER_XT_IPV4OPTIONS_H
#define _LINUX_NETFILTER_XT_IPV4OPTIONS_H 1
#pragma once
/* IPv4 allows for a 5-bit option number - 32 options */
@@ -22,5 +21,3 @@ struct xt_ipv4options_mtinfo1 {
__u32 invert;
__u8 flags;
};
#endif /* _LINUX_NETFILTER_XT_IPV4OPTIONS_H */

View File

@@ -1,5 +1,4 @@
#ifndef _LINUX_NETFILTER_XT_LENGTH2_H
#define _LINUX_NETFILTER_XT_LENGTH2_H
#pragma once
enum {
XT_LENGTH_INVERT = 1 << 0,
@@ -18,5 +17,3 @@ struct xt_length_mtinfo2 {
u_int32_t min, max;
u_int16_t flags;
};
#endif /* _LINUX_NETFILTER_XT_LENGTH2_H */

View File

@@ -1,5 +1,4 @@
#ifndef _LINUX_NETFILTER_XT_LSCAN_H
#define _LINUX_NETFILTER_XT_LSCAN_H 1
#pragma once
enum {
LSCAN_FL1_STEALTH = 1 << 0,
@@ -12,5 +11,3 @@ enum {
struct xt_lscan_mtinfo {
uint8_t match_fl1, match_fl2, match_fl3, match_fl4;
};
#endif /* _LINUX_NETFILTER_XT_LSCAN_H */

View File

@@ -1,6 +1,4 @@
#ifndef _LINUX_NETFILTER_XT_PSD_H
#define _LINUX_NETFILTER_XT_PSD_H 1
#pragma once
#include <linux/param.h>
#include <linux/types.h>
@@ -26,5 +24,3 @@ struct xt_psd_info {
__u16 lo_ports_weight;
__u16 hi_ports_weight;
};
#endif /*_LINUX_NETFILTER_XT_PSD_H*/

View File

@@ -1,5 +1,4 @@
#ifndef _XT_QUOTA_H
#define _XT_QUOTA_H
#pragma once
enum xt_quota_flags {
XT_QUOTA_INVERT = 1 << 0,
@@ -21,5 +20,3 @@ struct xt_quota_mtinfo2 {
/* Used internally by the kernel */
struct xt_quota_counter *master __attribute__((aligned(8)));
};
#endif /* _XT_QUOTA_H */