File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed
Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -66,27 +66,29 @@ ProcessPlugin *SMTPPlugin::copy()
6666 return new SMTPPlugin (*this );
6767}
6868
69- int SMTPPlugin::post_create (Flow &rec, const Packet &pkt)
69+ ProcessPlugin::FlowAction SMTPPlugin::post_create (Flow &rec, const Packet &pkt)
7070{
7171 if (pkt.src_port == 25 || pkt.dst_port == 25 ) {
7272 create_smtp_record (rec, pkt);
73+ return ProcessPlugin::FlowAction::GET_ALL_DATA;
7374 }
7475
75- return 0 ;
76+ return ProcessPlugin::FlowAction::NO_PROCESS ;
7677}
7778
78- int SMTPPlugin::pre_update (Flow &rec, Packet &pkt)
79+ ProcessPlugin::FlowAction SMTPPlugin::pre_update (Flow &rec, Packet &pkt)
7980{
8081 if (pkt.src_port == 25 || pkt.dst_port == 25 ) {
8182 RecordExt *ext = rec.get_extension (RecordExtSMTP::REGISTERED_ID);
8283 if (ext == nullptr ) {
8384 create_smtp_record (rec, pkt);
84- return 0 ;
85+ return ProcessPlugin::FlowAction::GET_ALL_DATA ;
8586 }
8687 update_smtp_record (static_cast <RecordExtSMTP *>(ext), pkt);
88+ return ProcessPlugin::FlowAction::GET_ALL_DATA;
8789 }
8890
89- return 0 ;
91+ return ProcessPlugin::FlowAction::NO_PROCESS ;
9092}
9193
9294char *strncasestr (const char *str, size_t n, const char *substr)
Original file line number Diff line number Diff line change @@ -241,8 +241,8 @@ class SMTPPlugin : public ProcessPlugin
241241 RecordExt *get_ext () const { return new RecordExtSMTP (); }
242242 ProcessPlugin *copy ();
243243
244- int post_create (Flow &rec, const Packet &pkt);
245- int pre_update (Flow &rec, Packet &pkt);
244+ ProcessPlugin::FlowAction post_create (Flow &rec, const Packet &pkt);
245+ ProcessPlugin::FlowAction pre_update (Flow &rec, Packet &pkt);
246246 void finish (bool print_stats);
247247
248248 bool smtp_keyword (const char *data);
You can’t perform that action at this time.
0 commit comments