✨feat: 使用cmake编译,并支持自动版本号
This commit is contained in:
@@ -44,7 +44,6 @@
|
||||
#define MESA_DUMP (1)
|
||||
#if MESA_DUMP
|
||||
#include "mesa_pkt_dump.h"
|
||||
const int tcpdump_mesa_version_VERSION_20181114 = 20181114;
|
||||
int tcpdump_data_offset = 0; /* 用于跳过某些底层数据, 如vxlan, 可以直接获取或设置过滤条件看vxlan的内层数据包内容 */
|
||||
unsigned char tcpdump_thread_index_array[64]; /* 开启捕包线程id数组, 靠长度决定id数量, 每个占1字节, 命令行输入支持逗号分隔 */
|
||||
int tcpdump_thread_index_array_num = 0;
|
||||
@@ -151,6 +150,12 @@ The Regents of the University of California. All rights reserved.\n";
|
||||
|
||||
#include "print.h"
|
||||
|
||||
#ifdef GIT_VERSION
|
||||
const char *tcpdump_mesa_version = (const char *)GIT_VERSION;
|
||||
#else
|
||||
const char *tcpdump_mesa_version = "GIT_VERSION_UNKNOWN";
|
||||
#endif
|
||||
|
||||
#ifndef PATH_MAX
|
||||
#define PATH_MAX 1024
|
||||
#endif
|
||||
@@ -3223,7 +3228,7 @@ print_usage(void)
|
||||
(void)fprintf(stderr,
|
||||
"----------------------------------------------------------------------------------------------.\n");
|
||||
(void)fprintf(stderr,
|
||||
"\t\tThe follow args is customized for tcpdump_mesa(%d):\n", tcpdump_mesa_version_VERSION_20181114);
|
||||
"\t\tThe follow args is customized for tcpdump_mesa(%s):\n", tcpdump_mesa_version);
|
||||
(void)fprintf(stderr,
|
||||
"\t\t[ -a ] enable perceptive mode, can detect loss packet number.\n");
|
||||
(void)fprintf(stderr,
|
||||
|
||||
Reference in New Issue
Block a user