-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdump.h
62 lines (46 loc) · 1.83 KB
/
dump.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*
* Copyright (c) 2010 Axel Neumann
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA
*/
#define DUMP_ERROR_STR "DUMP_ERROR"
#define DUMP_MAX_STR_SIZE (MAX_DBG_STR_SIZE - strlen(DUMP_ERROR_STR))
#define DUMP_MAX_MSG_SIZE 200
#define DUMP_DIRECTION_OUT 0
#define DUMP_DIRECTION_IN 1
#define DUMP_DIRECTION_ARRSZ 2
#define DEF_DUMP_PERIOD 1000
#define MIN_DUMP_PERIOD 100
#define MAX_DUMP_PERIOD 1000000
#define ARG_DUMP_PERIOD "trafficCapturePeriod"
#define ARG_DUMP "traffic"
#define ARG_DUMP_ALL "all"
#define ARG_DUMP_DEV "dev"
#define ARG_DUMP_SUMMARY "summary"
#define DEF_DUMP_REGRESSION_EXP 4
#define MIN_DUMP_REGRESSION_EXP 0
#define MAX_DUMP_REGRESSION_EXP 20
#define ARG_DUMP_REGRESSION_EXP "trafficRegressionExponent"
#define DUMP_TYPE_UDP_PAYLOAD 0
#define DUMP_TYPE_PACKET_HEADER 1
#define DUMP_TYPE_FRAME_HEADER 2
#define DUMP_TYPE_ARRSZ 3
struct dump_data {
uint32_t tmp_frame[DUMP_DIRECTION_ARRSZ][FRAME_TYPE_ARRSZ];
uint32_t pre_frame[DUMP_DIRECTION_ARRSZ][FRAME_TYPE_ARRSZ];
uint32_t avg_frame[DUMP_DIRECTION_ARRSZ][FRAME_TYPE_ARRSZ];
uint32_t tmp_all[DUMP_DIRECTION_ARRSZ][DUMP_TYPE_ARRSZ];
uint32_t pre_all[DUMP_DIRECTION_ARRSZ][DUMP_TYPE_ARRSZ];
uint32_t avg_all[DUMP_DIRECTION_ARRSZ][DUMP_TYPE_ARRSZ];
};