Skip to content

Commit 28a549e

Browse files
Lukas HutakLukas955
authored andcommitted
fdsdump: flow: define header
1 parent 3832dae commit 28a549e

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

src/tools/fdsdump/src/flow.hpp

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#pragma once
2+
3+
/**
4+
* @brief Direction of flow record to be considered when processing.
5+
*
6+
* Flow records might be unidirection or bidirectional. During flow processing,
7+
* however, we may only be interested in selected flow directions, e.g. due to
8+
* applied filtering according to user-defined parameters.
9+
*/
10+
enum Direction {
11+
/** @brief No direction should be processed. */
12+
DIRECTION_NONE = 0x00,
13+
/** @brief Process the record from the forward direction only. */
14+
DIRECTION_FWD = 0x01,
15+
/** @brief Process the record from the reverse direction only. */
16+
DIRECTION_REV = 0x02,
17+
/** @brief Process the record from the both directions. */
18+
DIRECTION_BOTH = 0x03,
19+
};
20+
21+
/**
22+
* @brief Flow record to be processed.
23+
* @warning
24+
* This structure cannot be simply copied as <em>rec</em> contains
25+
* primitive reference to IPFIX templates and flow data.
26+
*/
27+
struct Flow {
28+
/** @brief Direction(s) of the flow to be considered. */
29+
enum Direction dir;
30+
/** @brief Flow Data record */
31+
struct fds_drec rec;
32+
};

0 commit comments

Comments
 (0)