diff options
| author | liuxueli <[email protected]> | 2023-12-22 18:40:11 +0800 |
|---|---|---|
| committer | yangwei <[email protected]> | 2023-12-29 18:07:50 +0800 |
| commit | 4752610ee05637067d7daf05053ef3396d044357 (patch) | |
| tree | f883a58a44f2066dbe0c9f66b024cc0823e3c28d | |
| parent | 2c6221da3e7238eb6082020f70d04c40c013a971 (diff) | |
SPO_UDP_STREAM_CONCURRENT输出活跃链接数为流表中的MORE
| -rw-r--r-- | src/extensions/sapp_assistant.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/extensions/sapp_assistant.cpp b/src/extensions/sapp_assistant.cpp index 8c3eaa5..54dfabb 100644 --- a/src/extensions/sapp_assistant.cpp +++ b/src/extensions/sapp_assistant.cpp @@ -1,7 +1,7 @@ /* - ���ļ���ƽ̨���Ĺ��ܺͺ���(Ip��Ƭ, ����ԭ, ��������, ���������), - ���ṩ������ҵ�����Ľӿ�, ��sapp_get_platform_opt��, ��Ϊһ��.so�ļ����ص�ƽ̨, - ���ڸ��²���. + ���ļ���ƽ̨���Ĺ��ܺͺ���(Ip��Ƭ, ����ԭ, ��������, ���������), + ���ṩ������ҵ�����Ľӿ�, ��sapp_get_platform_opt��, ��Ϊһ��.so�ļ����ص�ƽ̨, + ���ڸ��²���. */ #include "sapp_api.h" #include "sapp_private_api.h" @@ -29,14 +29,14 @@ void * (*dl_marsio_buff_ctrlzone)(void *m, uint8_t id); extern void * (*ptr_marsio_buff_ctrlzone)(marsio_buff_t *m, uint8_t id); -/* ʶ���Ƿ������ڲ����ݰ� , �����ڵİ�Ӧ��������ת��/��ע */ +/* ʶ���Ƿ������ڲ����ݰ� , �����ڵİ�Ӧ��������ת��/��ע */ int sapp_identify_tunnel_inner_pkt(const raw_pkt_t *raw_pkt) { int ret = 0; #if IOMODE_MARSIO if (CAP_MODEL_MARSIOV4 == g_packet_io_cap_mode) { - /* û��mrtunnatʱ, �������l2_l3_tunnel_support, Ҫ�ж�overlay����, �Ƿ��Ǹ�������, �Ƿ��Ǿ���overlayԭʼ��·��İ� */ + /* û��mrtunnatʱ, �������l2_l3_tunnel_support, Ҫ�ж�overlay����, �Ƿ��Ǹ�������, �Ƿ��Ǿ���overlayԭʼ��·��İ� */ if (raw_pkt->is_overlay_pkt) { ret = 1; @@ -56,13 +56,13 @@ int sapp_identify_broad_multicast_pkt(const void *this_layer_data, const raw_pkt } if(memcmp(G_BROADCAST_ADDR, p_eth_hdr->ether_dhost, ETH_ALEN) == 0){ - /* G����ģʽ�£���ARPЭ��Ĺ㲥����ֱ�Ӷ���! ��ֹ�ٻ�ע��������, ��ɹ㲥�籩���������� */ + /* G����ģʽ�£���ARPЭ��Ĺ㲥����ֱ�Ӷ���! ��ֹ�ٻ�ע��������, ��ɹ㲥�籩���������� */ if(eth_type != ETH_P_ARP){ return 1; } }else{ - /* 2017-10-10 lijia add, �鲥MAC��ַ, ͨ��Ϊ�������ڿ��������ݰ�, ��LLMNR, STP��Э��, һ�����账�� - �ο�:https://en.wikipedia.org/wiki/Multicast_address + /* 2017-10-10 lijia add, �鲥MAC��ַ, ͨ��Ϊ�������ڿ��������ݰ�, ��LLMNR, STP��Э��, һ�����账�� + �ο�:https://en.wikipedia.org/wiki/Multicast_address */ if((p_eth_hdr->ether_dhost[0] == 0x01) &&(p_eth_hdr->ether_dhost[1] == 0x00) @@ -112,7 +112,7 @@ static inline unsigned long long __get_platform_opt_traffic(int ctype, sapp_sys_ return tmp_long; } -/* 2017-09-04 lijia add, for ��������, �����ȡƽ̨�ڲ����� */ +/* 2017-09-04 lijia add, for ��������, �����ȡƽ̨�ڲ����� */ extern "C" int sapp_get_platform_opt(enum sapp_platform_opt opt, void *opt_val, int *opt_val_len) { int ret = 0; @@ -252,7 +252,7 @@ extern "C" int sapp_get_platform_opt(enum sapp_platform_opt opt, void *opt_val, break; } unsigned long long *tot_num = (unsigned long long *)opt_val; - *tot_num = __get_platform_opt_traffic('c', SAPP_STAT_UDP_STREAM_TWO); + *tot_num = __get_platform_opt_traffic('c', SAPP_STAT_UDP_STREAM_MORE); } break; @@ -560,7 +560,7 @@ extern "C" int sapp_get_platform_opt(enum sapp_platform_opt opt, void *opt_val, } break; - /* �ⲿ���Ƶ������rand�Ⱥ����Ƚ�����CPU, ʹ��CPU��ǰ��ʱ��������, �͵�ǰƽ̨�����İ���ƴ��һ������� */ + /* �ⲿ���Ƶ������rand�Ⱥ����Ƚ�����CPU, ʹ��CPU��ǰ��ʱ��������, �͵�ǰƽ̨�����İ���ƴ��һ������� */ case SPO_RAND_NUMBER: { if(*opt_val_len != sizeof(long long)){ @@ -592,11 +592,11 @@ extern "C" int sapp_get_platform_opt(enum sapp_platform_opt opt, void *opt_val, int id_index = -1; int *opt_int = (int *)opt_val; int i; - pthread_t this_pid = pthread_self(); /* ��ȡ��ǰ�߳�id */ + pthread_t this_pid = pthread_self(); /* ��ȡ��ǰ�߳�id */ pthread_mutex_lock(&g_plug_Independent_thread_mutex); - /* Ϊ����һ���̶߳�ε��ô˽ӿ�, �Ȳ���֮ǰ�Ƿ�� */ + /* Ϊ����һ���̶߳�ε��ô˽ӿ�, �Ȳ���֮ǰ�Ƿ�� */ for(i = 0; i < sapp_global_val->config.cpu.send_only_threads_max_num; i++){ if(g_plug_Independent_thread_pid[i] == this_pid){ id_index = i; @@ -604,14 +604,14 @@ extern "C" int sapp_get_platform_opt(enum sapp_platform_opt opt, void *opt_val, } } - if(-1 == id_index){ /* ��ǰ�̵߳�һ�δ���, û�ҵ� */ + if(-1 == id_index){ /* ��ǰ�̵߳�һ�δ���, û�ҵ� */ for(i = 0; i < sapp_global_val->config.cpu.send_only_threads_max_num; i++){ if(0 == g_plug_Independent_thread_pid[i]){ g_plug_Independent_thread_pid[i] = this_pid; break; } } - if(i >= sapp_global_val->config.cpu.send_only_threads_max_num ){ /* ���������߳�������� */ + if(i >= sapp_global_val->config.cpu.send_only_threads_max_num ){ /* ���������߳�������� */ sapp_runtime_log(RLOG_LV_FATAL, "Independent_thread num more than CPU->send_only_threads_max:%d!\n", sapp_global_val->config.cpu.send_only_threads_max_num); *opt_int = -1; |
