Skip to content

Commit

Permalink
Add CTT support
Browse files Browse the repository at this point in the history
  • Loading branch information
Zadamsa committed Dec 23, 2024
1 parent ff070de commit dbafa1d
Show file tree
Hide file tree
Showing 16 changed files with 543 additions and 183 deletions.
2 changes: 2 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ ipfixprobe_storage_src=\
storage/cttController.cpp \
storage/cacheRowSpan.hpp \
storage/cacheRowSpan.cpp \
storage/cttController.hpp \
storage/cttController.cpp \
storage/xxhash.c \
storage/xxhash.h

Expand Down
6 changes: 3 additions & 3 deletions include/ipfixprobe/flowifc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,9 @@ struct Flow : public Record {

#ifdef WITH_CTT
uint64_t flow_hash_ctt; /**< Flow hash for CTT. */
bool record_in_ctt; /**< CTT - offload or not. */
bool is_delayed; /**< Delayed export flag. */
time_t delay_time; /**< Time until export of the flow is delayed. */
//bool record_in_ctt; /**< CTT - offload or not. */
//bool is_delayed; /**< Delayed export flag. */
//timeval delay_time; /**< Time until export of the flow is delayed. */
#endif

PluginsStatus plugins_status; /**< Statuses of the process plugins for this flow, used to check
Expand Down
2 changes: 1 addition & 1 deletion include/ipfixprobe/packet.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ namespace ipxp {
* \brief Structure for storing parsed packet fields
*/
struct Packet : public Record {
struct timeval ts;
timeval ts;

uint8_t dst_mac[6];
uint8_t src_mac[6];
Expand Down
7 changes: 1 addition & 6 deletions include/ipfixprobe/storage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ class StoragePlugin : public Plugin
virtual void export_expired(time_t ts)
{
}

virtual void finish()
{
}
Expand Down Expand Up @@ -189,12 +190,6 @@ class StoragePlugin : public Plugin
*/
int plugins_post_create(Flow& rec, const Packet& pkt)
{
// if metadata are valid, add flow hash ctt to the flow record
#ifdef WITH_CTT
if (pkt.cttmeta_valid) {
rec.flow_hash_ctt = pkt.cttmeta.flow_hash;
}
#endif /* WITH_CTT */
PluginStatusConverter plugin_status_converter(m_plugins_status);
int ret = 0;
for (unsigned int i = 0; i < m_plugin_cnt; i++) {
Expand Down
Loading

0 comments on commit dbafa1d

Please sign in to comment.