diff options
| author | yangwei <[email protected]> | 2024-04-01 16:17:17 +0800 |
|---|---|---|
| committer | yangwei <[email protected]> | 2024-04-01 19:26:46 +0800 |
| commit | a39e2ffe728c2bc6629139b0fea25403f313e758 (patch) | |
| tree | 176d10f6d1ac246c5b6bb8e24ac6b3058515e054 | |
| parent | 0b0a637184a09440ef3b3efabae95bbef805d5d1 (diff) | |
🐞 fix(remove sapp_rawpkt_ntop): 移除sapp_rawpkt_ntop,非eth包计入unknow
| -rw-r--r-- | src/dealpkt/callapp.c | 6 | ||||
| -rw-r--r-- | src/dealpkt/deal_ipv6.c | 2 | ||||
| -rw-r--r-- | src/packet_io/packet_io.c | 2 | ||||
| -rw-r--r-- | src/plugin/src/plugin.c | 7 |
4 files changed, 6 insertions, 11 deletions
diff --git a/src/dealpkt/callapp.c b/src/dealpkt/callapp.c index 4c2b616..77c9886 100644 --- a/src/dealpkt/callapp.c +++ b/src/dealpkt/callapp.c @@ -274,7 +274,6 @@ int stream_register_overlay_udp(STREAM_CB_FUN_T x) return stream_register_funtoArray(FUN_TYPE_UDP,(char (*)())x,g_OverlayUdpFun,&g_OverlayUdpFunNum, 0);
}
-extern const char *sapp_rawpkt_ntop(const raw_pkt_t *raw_pkt, int greedy_inner_layer, char *out_buf, int buf_len);
/*
lijia 2015-01-12 add this_iphdr,
�����IP��Ƭ����İ�, ������ʽ�Ĵ���IP��ͷ, ����ֻ��raw_hdr, ����ȡ������IP��ͷ.
@@ -284,7 +283,6 @@ char plugin_call_streamentry(int type,StreamFunInfo *pFunInfo,struct streaminfo char rec;
struct timespec before_ts, after_ts;
long long time_spent_ns;
- char debug_raw_pkt_string[256];
struct streaminfo_private *pstream_pr=(struct streaminfo_private *)a_stream;
int latency_enabled=MESA_handle_runtime_log_level_enabled(ABBR_PROCESS_LATENCY_LOG_HANDLE, RLOG_LV_INFO);
if(unlikely(latency_enabled))
@@ -325,12 +323,10 @@ char plugin_call_streamentry(int type,StreamFunInfo *pFunInfo,struct streaminfo a_stream->pudpdetail->serverpktnum,
thread_seq);
}else{
- sapp_rawpkt_ntop(pstream_pr->raw_pkt, 1, debug_raw_pkt_string, sizeof(debug_raw_pkt_string)); /* �˴����ȴ�ӡ���ڲ���Ԫ�� */
- sapp_process_latency_log(RLOG_LV_INFO, "plug_name:%s, entry:%s, pkt process latency:%lld us, rawpkt:%s, addr:%s, raw_len:%d, c:%u, s:%u, thread:%d",
+ sapp_process_latency_log(RLOG_LV_INFO, "plug_name:%s, entry:%s, pkt process latency:%lld us, addr:%s, raw_len:%d, c:%u, s:%u, thread:%d",
g_plug_global_entry[pFunInfo->entry_id].plug_name,
g_plug_global_entry[pFunInfo->entry_id].plug_entry_name,
time_spent_ns/1000,
- debug_raw_pkt_string,
printaddr(&a_stream->addr, thread_seq),
pstream_pr->raw_pkt->raw_pkt_len,
a_stream->pudpdetail->clientpktnum,
diff --git a/src/dealpkt/deal_ipv6.c b/src/dealpkt/deal_ipv6.c index 42f6d7e..d3369ff 100644 --- a/src/dealpkt/deal_ipv6.c +++ b/src/dealpkt/deal_ipv6.c @@ -169,9 +169,9 @@ static inline int checkipv6pkt(const struct mesa_ip6_hdr * iph, int payload_len, }
switch(iph->ip6_nxt_hdr){
-#if 0
case NEXTHDR_TCP :
case NEXTHDR_UDP :
+#if 0
case NEXTHDR_IPV6 :
case NEXTHDR_HOP :
case NEXTHDR_IPIP :
diff --git a/src/packet_io/packet_io.c b/src/packet_io/packet_io.c index b636738..f68ba48 100644 --- a/src/packet_io/packet_io.c +++ b/src/packet_io/packet_io.c @@ -661,6 +661,8 @@ static int mesa_default_pkt_cb(const raw_pkt_t *p_raw_pkt, unsigned char dir, in break; default: + local_sys_stat->count[SAPP_STAT_RCV_UNKNOWN]++; + local_sys_stat->length[SAPP_STAT_RCV_UNKNOWN] += (unsigned long long)p_raw_pkt->raw_pkt_len; return PASS; break; } diff --git a/src/plugin/src/plugin.c b/src/plugin/src/plugin.c index f595666..1163863 100644 --- a/src/plugin/src/plugin.c +++ b/src/plugin/src/plugin.c @@ -1244,14 +1244,12 @@ void plug_record_end_time(int plug_id, int thread_seq) } } -extern const char *sapp_rawpkt_ntop(const raw_pkt_t *raw_pkt, int greedy, char *out_buf, int buf_len); char plugin_call_appentry(stSessionFunInfo* funelem_session,stSessionInfo* session_info,int thread_seq,struct streaminfo *a_stream,const void *a_packet) { char rec=APP_STATE_DROPME; struct timespec before_ts, after_ts; long long time_spent_ns; - char debug_raw_pkt_string[256]; const struct streaminfo_private *stream_pr =(struct streaminfo_private *)a_stream; if(g_business_plug_info==NULL) @@ -1289,11 +1287,10 @@ char plugin_call_appentry(stSessionFunInfo* funelem_session,stSessionInfo* sessi thread_seq); }else{ - sapp_rawpkt_ntop(stream_pr->raw_pkt, 1, debug_raw_pkt_string, sizeof(debug_raw_pkt_string)); - sapp_process_latency_log(RLOG_LV_INFO, "plug_name:%s, entry:%s, pkt process latency:%lld us, rawpkt:%s, addr:%s, raw_len:%d, c:%u, s:%u, thread:%d", + sapp_process_latency_log(RLOG_LV_INFO, "plug_name:%s, entry:%s, pkt process latency:%lld us, addr:%s, raw_len:%d, c:%u, s:%u, thread:%d", g_plug_global_entry[funelem_session->entry_id].plug_name, g_plug_global_entry[funelem_session->entry_id].plug_entry_name, - time_spent_ns/1000,debug_raw_pkt_string, + time_spent_ns/1000, printaddr(&a_stream->addr, thread_seq), stream_pr->raw_pkt->raw_pkt_len, a_stream->pudpdetail->clientpktnum, |
