summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlijia <[email protected]>2021-09-07 15:47:24 +0800
committerlijia <[email protected]>2021-09-07 15:47:24 +0800
commitda3eeea4e6e26ce51a9aeade42d5fd966f8b6e04 (patch)
tree535b54c395f3e1947b41991acdcec977661aca73
parent240efaec395961ad55a85dd7f15fde784de1f065 (diff)
TSG-7561, 支持捕获sapp under ddos bypass的包.v1.0.8
-rw-r--r--src/mesa_pkt_dump.h3
-rw-r--r--src/tcpdump.c5
2 files changed, 5 insertions, 3 deletions
diff --git a/src/mesa_pkt_dump.h b/src/mesa_pkt_dump.h
index ad16cc8..9072c4b 100644
--- a/src/mesa_pkt_dump.h
+++ b/src/mesa_pkt_dump.h
@@ -1,7 +1,7 @@
#ifndef _MESA_PKT_DUMP_H_
#define _MESA_PKT_DUMP_H_ 1
-#define MESA_PKT_DUM_H_VER (20210330)
+#define MESA_PKT_DUM_H_VER (20210907)
/*
����DPDK-3.0, PFRINGģʽ��, ������ռ����ʱ, ͨ��ƽ̨ʵʱ����.
@@ -17,6 +17,7 @@ enum _pkt_classify{
PKT_CLASSIFY_DROP = 0x08, /* DMAC ascii��ֵ: D */
PKT_CLASSIFY_ERROR = 0x10, /* DMAC ascii��ֵ: E */
PKT_CLASSIFY_REPEAT = 0x20, /* DMAC ascii��ֵ: R */
+ PKT_CLASSIFY_BYPASS = 0x40, /* DMAC ascii��ֵ: P */
};
enum pkt_dump_opt_t{
diff --git a/src/tcpdump.c b/src/tcpdump.c
index 6b56ed9..e5d6d78 100644
--- a/src/tcpdump.c
+++ b/src/tcpdump.c
@@ -1384,7 +1384,8 @@ static short get_pkt_classify_optarg(const char *optarg)
pkt_classify_flag |= PKT_CLASSIFY_ERROR;
else if (strcasecmp(section, "repeat") == 0)
pkt_classify_flag |= PKT_CLASSIFY_REPEAT;
-
+ else if (strcasecmp(section, "bypass") == 0)
+ pkt_classify_flag |= PKT_CLASSIFY_BYPASS;
else
{
return 0;
@@ -3367,7 +3368,7 @@ print_usage(void)
(void)fprintf(stderr,
"\t\t[ --vlan-as-mac-in-mac ] force VLAN to be analysed as MAC-IN-MAC format.\n");
(void)fprintf(stderr,
-"\t\t[ --classify in|forward|inject|drop|error|repeat ]. specify packet capture classifier by direction and operation\n");
+"\t\t[ --classify in|forward|inject|drop|error|repeat|bypass ]. specify packet capture classifier by direction and operation\n");
(void)fprintf(stderr,
"\t\t[ --enable_classify_watermark ]. enable record classify type in src mac address\n");
#endif