Skip to content

Commit 9aa8853

Browse files
committed
Adjust PSTATS plugin
1 parent 8bf99ff commit 9aa8853

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

process/pstats.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,13 +146,13 @@ void PSTATSPlugin::update_record(RecordExtPSTATS *pstats_data, const Packet &pkt
146146
}
147147
}
148148

149-
int PSTATSPlugin::post_create(Flow &rec, const Packet &pkt)
149+
ProcessPlugin::FlowAction PSTATSPlugin::post_create(Flow &rec, const Packet &pkt)
150150
{
151151
RecordExtPSTATS *pstats_data = new RecordExtPSTATS();
152152
rec.add_extension(pstats_data);
153153

154154
update_record(pstats_data, pkt);
155-
return 0;
155+
return ProcessPlugin::FlowAction::GET_ALL_DATA;
156156
}
157157

158158
void PSTATSPlugin::pre_export(Flow &rec)
@@ -163,14 +163,13 @@ void PSTATSPlugin::pre_export(Flow &rec)
163163
if (packets <= PSTATS_MINLEN && (flags & 0x02)) { //tcp SYN set
164164
rec.remove_extension(RecordExtPSTATS::REGISTERED_ID);
165165
}
166-
167166
}
168167

169-
int PSTATSPlugin::post_update(Flow &rec, const Packet &pkt)
168+
ProcessPlugin::FlowAction PSTATSPlugin::post_update(Flow &rec, const Packet &pkt)
170169
{
171170
RecordExtPSTATS *pstats_data = (RecordExtPSTATS *) rec.get_extension(RecordExtPSTATS::REGISTERED_ID);
172171
update_record(pstats_data, pkt);
173-
return 0;
172+
return ProcessPlugin::FlowAction::GET_ALL_DATA;
174173
}
175174

176175
}

process/pstats.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,8 @@ class PSTATSPlugin : public ProcessPlugin
218218
std::string get_name() const { return "pstats"; }
219219
RecordExt *get_ext() const { return new RecordExtPSTATS(); }
220220
ProcessPlugin *copy();
221-
int post_create(Flow &rec, const Packet &pkt);
222-
int post_update(Flow &rec, const Packet &pkt);
221+
ProcessPlugin::FlowAction post_create(Flow &rec, const Packet &pkt);
222+
ProcessPlugin::FlowAction post_update(Flow &rec, const Packet &pkt);
223223
void update_record(RecordExtPSTATS *pstats_data, const Packet &pkt);
224224
void pre_export(Flow &rec);
225225

0 commit comments

Comments
 (0)