refactor: packet dump utils
This commit is contained in:
@@ -12,7 +12,6 @@
|
||||
#include "hexdump.h"
|
||||
#include "session_utils.h"
|
||||
#include "packet_dump.h"
|
||||
#include "packet_parse.h"
|
||||
#include "stellar/packet.h"
|
||||
#include "stellar/stellar_mq.h"
|
||||
|
||||
@@ -104,7 +103,7 @@ static void on_sess_udp_msg(struct session *sess, int topic_id, const void *msg,
|
||||
log_print(ctx->fd, "debug plugin", "on UDP msg: %s", buff);
|
||||
|
||||
memset(buff, 0, sizeof(buff));
|
||||
packet_to_str(pkt, buff, sizeof(buff) - 1);
|
||||
packet_dump_str(pkt, buff, sizeof(buff) - 1);
|
||||
log_print(ctx->fd, "debug plugin", "rx UDP packet: \n%s", buff);
|
||||
|
||||
pthread_spin_lock(&ctx->lock);
|
||||
@@ -128,7 +127,7 @@ static void on_sess_tcp_msg(struct session *sess, int topic_id, const void *msg,
|
||||
log_print(ctx->fd, "debug plugin", "on TCP msg: %s", buff);
|
||||
|
||||
memset(buff, 0, sizeof(buff));
|
||||
packet_to_str(pkt, buff, sizeof(buff) - 1);
|
||||
packet_dump_str(pkt, buff, sizeof(buff) - 1);
|
||||
log_print(ctx->fd, "debug plugin", "rx TCP packet: \n%s", buff);
|
||||
|
||||
pthread_spin_lock(&ctx->lock);
|
||||
|
||||
Reference in New Issue
Block a user