summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluwenpeng <[email protected]>2023-04-28 17:45:13 +0800
committerluwenpeng <[email protected]>2023-04-28 17:45:13 +0800
commite729c5cee9b2c16cb43c76e623bf108b9aa5fc6c (patch)
tree5056c9207c9302ce39d4ff9f82b0f38fb5526a1c
parent7b55524b4f9527ccea8c1b3db112210e29efbc94 (diff)
修改__cplusplus->__cpluscplus
-rw-r--r--bpf/bpf_config_define.h4
-rw-r--r--bpf/bpf_config_kernel.h4
-rw-r--r--bpf/bpf_config_user.h4
-rw-r--r--bpf/bpf_obj.h4
-rw-r--r--bpf/crc32_hash.h4
-rw-r--r--common/include/io_uring.h4
-rw-r--r--common/include/tap.h4
-rw-r--r--plugin/business/doh/src/dns.h20
8 files changed, 24 insertions, 24 deletions
diff --git a/bpf/bpf_config_define.h b/bpf/bpf_config_define.h
index 193ae4e..5348a63 100644
--- a/bpf/bpf_config_define.h
+++ b/bpf/bpf_config_define.h
@@ -1,7 +1,7 @@
#ifndef _BPF_CONFIG_H_
#define _BPF_CONFIG_H_
-#ifdef __cplusplus
+#ifdef __cpluscplus
extern "C"
{
#endif
@@ -46,7 +46,7 @@ struct
__uint(max_entries, 16);
} bpf_config_map SEC(".maps");
-#ifdef __cplusplus
+#ifdef __cpluscplus
}
#endif
diff --git a/bpf/bpf_config_kernel.h b/bpf/bpf_config_kernel.h
index 7936612..98669f2 100644
--- a/bpf/bpf_config_kernel.h
+++ b/bpf/bpf_config_kernel.h
@@ -1,7 +1,7 @@
#ifndef _BPF_CONFIG_KERNEL_H_
#define _BPF_CONFIG_KERNEL_H_
-#ifdef __cplusplus
+#ifdef __cpluscplus
extern "C"
{
#endif
@@ -54,7 +54,7 @@ static inline __u32 bpf_config_get_queue_num(struct bpf_config *config)
return config->queue_num.val;
}
-#ifdef __cplusplus
+#ifdef __cpluscplus
}
#endif
diff --git a/bpf/bpf_config_user.h b/bpf/bpf_config_user.h
index a6fc2ad..beba012 100644
--- a/bpf/bpf_config_user.h
+++ b/bpf/bpf_config_user.h
@@ -1,7 +1,7 @@
#ifndef _BPF_CONFIG_USER_H_
#define _BPF_CONFIG_USER_H_
-#ifdef __cplusplus
+#ifdef __cpluscplus
extern "C"
{
#endif
@@ -65,7 +65,7 @@ static inline void bpf_config_set_queue_num(struct bpf_config *config, __u32 val
memcpy(config->queue_num.key.str, BPF_CONFIG_KEY_QUEUE_NUM, strlen(BPF_CONFIG_KEY_QUEUE_NUM));
}
-#ifdef __cplusplus
+#ifdef __cpluscplus
}
#endif
diff --git a/bpf/bpf_obj.h b/bpf/bpf_obj.h
index 529080d..e5de40a 100644
--- a/bpf/bpf_obj.h
+++ b/bpf/bpf_obj.h
@@ -1,7 +1,7 @@
#ifndef _BPF_OBJ_H_
#define _BPF_OBJ_H_
-#ifdef __cplusplus
+#ifdef __cpluscplus
extern "C"
{
#endif
@@ -24,7 +24,7 @@ void bpf_obj_unload(struct bpf_obj_ctx *ctx);
*/
int bpf_obj_attach(struct bpf_obj_ctx *ctx, int fd);
-#ifdef __cplusplus
+#ifdef __cpluscplus
}
#endif
diff --git a/bpf/crc32_hash.h b/bpf/crc32_hash.h
index 4aa5e71..9189580 100644
--- a/bpf/crc32_hash.h
+++ b/bpf/crc32_hash.h
@@ -1,7 +1,7 @@
#ifndef _CRC32_HASH_H_
#define _CRC32_HASH_H_
-#ifdef __cplusplus
+#ifdef __cpluscplus
extern "C"
{
#endif
@@ -350,7 +350,7 @@ static inline __u32 crc32_hash(const void *data, __u32 data_len, __u32 init_val)
return init_val;
}
-#ifdef __cplusplus
+#ifdef __cpluscplus
}
#endif
diff --git a/common/include/io_uring.h b/common/include/io_uring.h
index 2f891cc..5964f9c 100644
--- a/common/include/io_uring.h
+++ b/common/include/io_uring.h
@@ -1,7 +1,7 @@
#ifndef _IO_URING_H_
#define _IO_URING_H_
-#ifdef __cplusplus
+#ifdef __cpluscplus
extern "C"
{
#endif
@@ -37,7 +37,7 @@ int io_uring_submit_write_entry(struct io_uring_instance *instance, const char *
// returns the number of processed entrys
int io_uring_peek_ready_entrys(struct io_uring_instance *instance);
-#ifdef __cplusplus
+#ifdef __cpluscplus
}
#endif
diff --git a/common/include/tap.h b/common/include/tap.h
index c31c7d8..47286f5 100644
--- a/common/include/tap.h
+++ b/common/include/tap.h
@@ -1,7 +1,7 @@
#ifndef _TAP_H_
#define _TAP_H_
-#ifdef __cplusplus
+#ifdef __cpluscplus
extern "C"
{
#endif
@@ -12,7 +12,7 @@ void tap_close(int sockfd);
int tap_up_link(const char *eth);
int tap_get_mtu(const char *eth);
-#ifdef __cplusplus
+#ifdef __cpluscplus
}
#endif
diff --git a/plugin/business/doh/src/dns.h b/plugin/business/doh/src/dns.h
index f56c682..33e2e7b 100644
--- a/plugin/business/doh/src/dns.h
+++ b/plugin/business/doh/src/dns.h
@@ -139,7 +139,7 @@
#define DNS_CLASS_HS 4
#define DNS_QCLASS_ANY 255
-// �洢 DNS ͷ����Ϣ�Ľṹ��
+// �洢 DNS ͷ����Ϣ�Ľṹ��
typedef struct _dns_hdr
{
u_int16_t id;
@@ -296,7 +296,7 @@ typedef struct _nsec3param
u_char *salt_value;
} nsec3param_t;
-// �洢 DNS ��Դ��¼����(�ش����� / ��Ȩ���� / ��������)�Ľṹ��
+// �洢 DNS ��Դ��¼����(�ش����� / ��Ȩ���� / ��������)�Ľṹ��
typedef struct _dns_rr
{
u_char name[DNS_MAX_NAME + 1];
@@ -345,7 +345,7 @@ typedef struct _fake_packet_opt
u_char res_info[DNS_MAX_NAME + 1];
} cheat_pkt_opt_t;
-// �洢 DNS Queries ����Ľṹ��
+// �洢 DNS Queries ����Ľṹ��
typedef struct
{
u_int16_t qtype;
@@ -355,22 +355,22 @@ typedef struct
#define MAX_RR_NUM 256
-// �洢���� DNS ��Ϣ�Ľṹ��
+// �洢���� DNS ��Ϣ�Ľṹ��
typedef struct _dns_info
{
- // �洢 DNS ͷ����Ϣ�Ľṹ��
+ // �洢 DNS ͷ����Ϣ�Ľṹ��
dns_hdr_t hdr_info;
- // RR ��¼�ĸ���
+ // RR ��¼�ĸ���
int rr_count;
- // �洢 DNS ��Դ��¼����(�ش����� / ��Ȩ���� / ��������)�Ľṹ��
+ // �洢 DNS ��Դ��¼����(�ش����� / ��Ȩ���� / ��������)�Ľṹ��
dns_rr_t rr[MAX_RR_NUM];
- // �洢 DNS Queries ����Ľṹ��
+ // �洢 DNS Queries ����Ľṹ��
dns_query_question_t query_question;
} dns_info_t;
-#ifdef __cplusplus
+#ifdef __cpluscplus
extern "C"
{
#endif
@@ -382,7 +382,7 @@ int dns_parser(dns_info_t *dns_info, char *in_buff, int buff_len);
int dns_package(dns_info_t *dns_info, char *out_buff, int buff_size);
int dns_cheat_response(dns_info_t *dns_info, cheat_pkt_opt_t *cheat_opt, int cheat_opt_num, char *out_buff, int buff_size);
-#ifdef __cplusplus
+#ifdef __cpluscplus
}
#endif
#endif