/src/zeek/build/src/analyzer/protocol/smtp/functions.bif.cc
Line | Count | Source |
1 | | // This file was automatically generated by bifcl from /src/zeek/src/analyzer/protocol/smtp/functions.bif (plugin mode). |
2 | | |
3 | | |
4 | | #include "functions.bif.h" |
5 | | #include "zeek/Func.h" |
6 | | |
7 | | |
8 | | #line 3 "/src/zeek/src/analyzer/protocol/smtp/functions.bif" |
9 | | |
10 | | #include "zeek/analyzer/protocol/smtp/SMTP.h" |
11 | | zeek::ValPtr zeek::BifFunc::skip_smtp_data_native(zeek::Connection* c) |
12 | | #line 12 "/src/zeek/src/analyzer/protocol/smtp/functions.bif" |
13 | | |
14 | | |
15 | | #line 13 "/src/zeek/src/analyzer/protocol/smtp/functions.bif" |
16 | 0 | { |
17 | 0 | #line 13 "/src/zeek/src/analyzer/protocol/smtp/functions.bif" |
18 | |
|
19 | 0 | zeek::analyzer::Analyzer* sa = c->FindAnalyzer("SMTP"); |
20 | 0 | if ( sa ) |
21 | 0 | static_cast<zeek::analyzer::smtp::SMTP_Analyzer*>(sa)->SkipData(); |
22 | 0 | return nullptr; |
23 | 0 | } // end of BifFunc::skip_smtp_data |
24 | | |
25 | | #line 18 "/src/zeek/src/analyzer/protocol/smtp/functions.bif" |
26 | | |
27 | | #line 12 "/src/zeek/src/analyzer/protocol/smtp/functions.bif" |
28 | | zeek::ValPtr zeek::BifFunc::skip_smtp_data_bif(zeek::detail::Frame* frame, const zeek::Args* BiF_ARGS) |
29 | | #line 12 "/src/zeek/src/analyzer/protocol/smtp/functions.bif" |
30 | 0 | { |
31 | 0 | #line 12 "/src/zeek/src/analyzer/protocol/smtp/functions.bif" |
32 | 0 | if ( BiF_ARGS->size() != 1 ) // NOLINT(readability-container-size-empty) |
33 | 0 | #line 12 "/src/zeek/src/analyzer/protocol/smtp/functions.bif" |
34 | 0 | { |
35 | 0 | #line 12 "/src/zeek/src/analyzer/protocol/smtp/functions.bif" |
36 | 0 | zeek::emit_builtin_error(zeek::util::fmt("skip_smtp_data() takes exactly 1 argument(s), got %lu", BiF_ARGS->size())); |
37 | 0 | #line 12 "/src/zeek/src/analyzer/protocol/smtp/functions.bif" |
38 | 0 | return nullptr; |
39 | 0 | #line 12 "/src/zeek/src/analyzer/protocol/smtp/functions.bif" |
40 | 0 | } |
41 | 0 | #line 12 "/src/zeek/src/analyzer/protocol/smtp/functions.bif" |
42 | 0 | zeek::Connection* c = (zeek::Connection*) ((*BiF_ARGS)[0].get()->AsRecordVal()->GetOrigin()); // NOLINT(cppcoreguidelines-pro-type-cstyle-cast,modernize-avoid-c-style-cast) |
43 | 0 | #line 18 "/src/zeek/src/analyzer/protocol/smtp/functions.bif" |
44 | 0 | return zeek::BifFunc::skip_smtp_data_native(c); |
45 | 0 | #line 18 "/src/zeek/src/analyzer/protocol/smtp/functions.bif" |
46 | 0 | } // end of shim for BifFunc::skip_smtp_data |