summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoryangwei <[email protected]>2024-11-11 18:27:05 +0800
committeryangwei <[email protected]>2024-11-11 18:27:05 +0800
commitaa533ca96daea5a06179e88bbb17a859122def22 (patch)
tree5c0f638b37894a1db7a6c41410dc625d4dc62d91 /src
parentbde71f307790be97116e03e2b7ac6e3d05744f6b (diff)
🔧 build(fix el9 warning): ignore test case code
Diffstat (limited to 'src')
-rw-r--r--src/dealpkt/deal_mac_in_mac.c10
-rw-r--r--src/dealpkt/deal_proxy.c42
-rw-r--r--src/support/ap_bloom/CMakeLists.txt3
3 files changed, 27 insertions, 28 deletions
diff --git a/src/dealpkt/deal_mac_in_mac.c b/src/dealpkt/deal_mac_in_mac.c
index 9a92b58..b7c9eba 100644
--- a/src/dealpkt/deal_mac_in_mac.c
+++ b/src/dealpkt/deal_mac_in_mac.c
@@ -44,7 +44,7 @@ static inline int should_create_empty_mpls_layer_for_symmetric(const struct stre
}
-/* 2018-08-19 lijia add, for PanGu��Ŀ��������������ʽ, ������ETH_P_8021AD�ֶ�, ʵ����MAC-IN-MAC��ʽ���ݰ�,
+/* 2018-08-19 lijia add, for PanGu��Ŀ��������������ʽ, ������ETH_P_8021AD�ֶ�, ʵ����MAC-IN-MAC��ʽ���ݰ�,
outer_mac--inner_mac--ipv4/6--tcp/udp---layer7.
*/
int mac_in_mac_entry(struct streaminfo_private *fstream_pr, const void *this_layer_hdr,int thread_num,
@@ -55,8 +55,8 @@ int mac_in_mac_entry(struct streaminfo_private *fstream_pr, const void *this_lay
struct streamindex *ptmp;
struct streaminfo_private *pstream_pr;
struct streaminfo *pstream;
- const struct mesa_ethernet_hdr *outer_ether_hdr;
- const struct mesa_ethernet_hdr *inner_ether_hdr;
+ const struct mesa_ethernet_hdr *outer_ether_hdr=NULL;
+ const struct mesa_ethernet_hdr *inner_ether_hdr=NULL;
//const struct mesa_vlan_detail_hdr *vlan_hdr;
const unsigned char *next_layer_data;
int next_layer_offset, ret;
@@ -83,7 +83,7 @@ int mac_in_mac_entry(struct streaminfo_private *fstream_pr, const void *this_lay
pstream->addr.paddr = &mim_addr;
pstream_pr->addr_use_as_hash = 0;
}else{
- pstream_pr = NULL; /* ʹ�ϲ����Э���pfatherΪNULL */
+ pstream_pr = NULL; /* ʹ�ϲ����Э���pfatherΪNULL */
next_layer_offset = 0;
if((int)CAP_LEVEL_MAC == (int)raw_pkt->low_layer_type){
((raw_pkt_t *)raw_pkt)->raw_pkt_data = (char *)raw_pkt->__lib_raw_pkt_data + sizeof(struct mesa_ethernet_hdr);
@@ -92,7 +92,7 @@ int mac_in_mac_entry(struct streaminfo_private *fstream_pr, const void *this_lay
}
eth_type = ntohs(inner_ether_hdr->ether_type);
-#if 0 /* 2021-05-06 lijia close, �ǶԳ�mpls�ijɶ�̬����streaminfo�ķ�ʽ���. */
+#if 0 /* 2021-05-06 lijia close, �ǶԳ�mpls�ijɶ�̬����streaminfo�ķ�ʽ���. */
if(should_create_empty_mpls_layer_for_symmetric(pstream, eth_type) != 0){
if(eth_type == ETHERTYPE_IP || eth_type == ETHERTYPE_IPv6)
{
diff --git a/src/dealpkt/deal_proxy.c b/src/dealpkt/deal_proxy.c
index 0a8f8ac..b51eff0 100644
--- a/src/dealpkt/deal_proxy.c
+++ b/src/dealpkt/deal_proxy.c
@@ -13,17 +13,17 @@ extern int udp_stream_table_size;
/*
20141017 : lqy
-1) �½�deal_proxy_stream ���ô���sock4,5,http�Ĺ�����������
-2) ģ��һ��stream �γ����Ƶ�α��pstream->pPrxoy->fstream
+1) �½�deal_proxy_stream ���ô���sock4,5,http�Ĺ�����������
+2) ģ��һ��stream �γ����Ƶ�α��pstream->pPrxoy->fstream
20150123 lqy
-1) ���´����ĵ�ַ˳����Ƕ����ʱ��ʹ�������ַ��ʵ�ʵ�ַ�Ͷ˿�
- �����п���ΪCONNECT pop.163.com:110 ����ģʽ�£���ַ�����0.0.0.0
+1) ���´����ĵ�ַ˳����Ƕ����ʱ��ʹ�������ַ��ʵ�ʵ�ַ�Ͷ˿�
+ �����п���ΪCONNECT pop.163.com:110 ����ģʽ�£���ַ�����0.0.0.0
*/
-/*�ص��ϲ���Ϣ���ͷŴ�������������Ϣ*/
+/*�ص��ϲ���Ϣ���ͷŴ�������������Ϣ*/
void free_tcp_proxy_stream(struct streaminfo *pstream,struct streaminfo *pProxy)
{
if (pProxy == NULL)
@@ -37,20 +37,20 @@ void free_tcp_proxy_stream(struct streaminfo *pstream,struct streaminfo *pProxy)
- //�Ȼص����ܴ��ڵ�Ӧ�ò�
+ //�Ȼص����ܴ��ڵ�Ӧ�ò�
if(pProxydetail->apme!=NULL)
{
pProxy->opstate=OP_STATE_CLOSE;
saved_opstate = pstream->opstate;
- pstream->opstate = OP_STATE_CLOSE;/* 20160928 lijia add, ���ô�����������״̬ */
- //tcp stream �ص�
+ pstream->opstate = OP_STATE_CLOSE;/* 20160928 lijia add, ���ô�����������״̬ */
+ //tcp stream �ص�
stream_process_tcp(pstream,NULL,NULL,NULL,&(pProxydetail->apme),&(pProxy->opstate));
pProxydetail->apme=NULL;
- pstream->opstate = saved_opstate; /* 20160928 lijia add, �ָ���ǰ��״̬ */
+ pstream->opstate = saved_opstate; /* 20160928 lijia add, �ָ���ǰ��״̬ */
}
- //�ڶ��� �ͷ�
+ //�ڶ��� �ͷ�
pProxydetail=(struct proxydetail *)pProxy->pdetail;
if(pProxydetail->pUser)
@@ -95,7 +95,7 @@ void free_tcp_proxy_stream(struct streaminfo *pstream,struct streaminfo *pProxy)
}
-/*��һ����������Ϣ�����һ��fatherstream,���ҹ��ص�stream��*/
+/*��һ����������Ϣ�����һ��fatherstream,���ҹ��ص�stream��*/
void set_proxy_fstream(struct streaminfo *pstream,struct streaminfo *pProxy)
{
@@ -103,7 +103,7 @@ void set_proxy_fstream(struct streaminfo *pstream,struct streaminfo *pProxy)
struct proxydetail *pProxydetail=(struct proxydetail *)pProxy->pdetail;
struct tcpdetail *pdetail=(struct tcpdetail *)pstream->pdetail;
- //������������ͼ���ַ��Ϣ
+ //������������ͼ���ַ��Ϣ
if(pstream->addr.addrtype==ADDR_TYPE_IPV4)
{
@@ -118,7 +118,7 @@ void set_proxy_fstream(struct streaminfo *pstream,struct streaminfo *pProxy)
pProxy->addr.addrtype=ADDR_TYPE_IPV6;
paddr=dictator_malloc(pstream->threadnum,sizeof(struct tuple6));
memcpy(paddr,pstream->addr.paddr,sizeof(struct tuple6));
- if(NULL == pProxydetail->pIpv6){ /* 2015-02-02 lijia add, �п��ܻ�ȡ���� */
+ if(NULL == pProxydetail->pIpv6){ /* 2015-02-02 lijia add, �п��ܻ�ȡ���� */
//printf("proxy type:%d, not fill addr info!\n", pProxydetail->iType);
memset(((struct tuple6 *)paddr)->daddr,0,16);
}else{
@@ -140,7 +140,7 @@ void set_proxy_fstream(struct streaminfo *pstream,struct streaminfo *pProxy)
}
-/*��������������Ϣ������ɺ󣬽���Ƕ�׵���*/
+/*��������������Ϣ������ɺ󣬽���Ƕ�׵���*/
int deal_tcp_in_proxy_stream(struct streaminfo *stream,void * a_packet,struct streaminfo *pProxy)
{
int ret=PASS;
@@ -178,10 +178,10 @@ int deal_tcp_in_proxy_stream(struct streaminfo *stream,void * a_packet,struct st
return APP_STATE_GIVEME;
}
#else
- struct streaminfo_private *carry_ip_stream = stream_pr; /* IP-PORT�洢��ͬһ��, ����Ҫͨ��pfather���� */
+ struct streaminfo_private *carry_ip_stream = stream_pr; /* IP-PORT�洢��ͬһ��, ����Ҫͨ��pfather���� */
#endif
- //�������Ӷ�Ӧ��ϵ��ʹ����α���������Ч
+ //�������Ӷ�Ӧ��ϵ��ʹ����α���������Ч
pProxy->pfather=stream->pfather;
stream->pfather=pProxy;
@@ -197,7 +197,7 @@ int deal_tcp_in_proxy_stream(struct streaminfo *stream,void * a_packet,struct st
stream->opstate=pProxy->opstate;
- if(NULL == real_raw_pkt){ /* ��ʱ��̭, ��ԭʼ������ */
+ if(NULL == real_raw_pkt){ /* ��ʱ��̭, ��ԭʼ������ */
ret=stream_process_tcp(stream, NULL, NULL, NULL,
&pProxydetail->apme,&(stream->opstate));
@@ -208,7 +208,7 @@ int deal_tcp_in_proxy_stream(struct streaminfo *stream,void * a_packet,struct st
(const raw_pkt_t *)real_raw_pkt, &pProxydetail->apme,&(stream->opstate));
}
pProxy->opstate=stream->opstate;
- //��ԭ״̬
+ //��ԭ״̬
stream->opstate=tmpstate;
stream->pfather=pProxy->pfather;
@@ -242,16 +242,16 @@ int deal_tcp_in_proxy_stream(struct streaminfo *stream,void * a_packet,struct st
if(ret==DROP)
{
- appstate=appstate|APP_STATE_DROPPKT;
+ appstate|=APP_STATE_DROPPKT;
}
if(pProxydetail->apme==NULL)
{
- appstate=appstate|APP_STATE_DROPME;
+ appstate|=APP_STATE_DROPME;
}
if(OP_STATE_CLOSE == stream->opstate){
- appstate |= APP_STATE_DROPME;
+ appstate|= APP_STATE_DROPME;
}
return appstate;
diff --git a/src/support/ap_bloom/CMakeLists.txt b/src/support/ap_bloom/CMakeLists.txt
index c6c0424..e83a918 100644
--- a/src/support/ap_bloom/CMakeLists.txt
+++ b/src/support/ap_bloom/CMakeLists.txt
@@ -1,5 +1,4 @@
-cmake_minimum_required(VERSION 2.8...3.10)
-
+suppress_cppcheck_in_current_dir()
add_definitions(-fPIC)
include_directories(${CMAKE_SOURCE_DIR}/src/support/ap_bloom/deps)