/src/zeek/build/src/analyzer/protocol/snmp/events.bif.cc
Line | Count | Source |
1 | | // This file was automatically generated by bifcl from /src/zeek/src/analyzer/protocol/snmp/events.bif (plugin mode). |
2 | | |
3 | | |
4 | | #include "events.bif.h" |
5 | | #include "zeek/Func.h" |
6 | | |
7 | | zeek::EventHandlerPtr snmp_get_request; |
8 | | void zeek::BifEvent::enqueue_snmp_get_request(zeek::analyzer::Analyzer* analyzer, zeek::Connection* c, int is_orig, zeek::IntrusivePtr<zeek::Val> header, zeek::IntrusivePtr<zeek::Val> pdu) |
9 | 363 | { |
10 | | // Note that it is intentional that here we do not |
11 | | // check if ::snmp_get_request is NULL, which should happen *before* |
12 | | // zeek::BifEvent::enqueue_snmp_get_request is called to avoid unnecessary Val |
13 | | // allocation. |
14 | | |
15 | 363 | zeek::event_mgr.Enqueue(::snmp_get_request, zeek::Args{ |
16 | 363 | c->GetVal(), |
17 | 363 | zeek::val_mgr->Bool(is_orig), |
18 | 363 | std::move(header), |
19 | 363 | std::move(pdu), |
20 | 363 | }, |
21 | 363 | zeek::util::detail::SOURCE_LOCAL, analyzer ? analyzer->GetID() : 0, c); |
22 | 363 | } |
23 | | |
24 | | zeek::EventHandlerPtr snmp_get_next_request; |
25 | | void zeek::BifEvent::enqueue_snmp_get_next_request(zeek::analyzer::Analyzer* analyzer, zeek::Connection* c, int is_orig, zeek::IntrusivePtr<zeek::Val> header, zeek::IntrusivePtr<zeek::Val> pdu) |
26 | 486 | { |
27 | | // Note that it is intentional that here we do not |
28 | | // check if ::snmp_get_next_request is NULL, which should happen *before* |
29 | | // zeek::BifEvent::enqueue_snmp_get_next_request is called to avoid unnecessary Val |
30 | | // allocation. |
31 | | |
32 | 486 | zeek::event_mgr.Enqueue(::snmp_get_next_request, zeek::Args{ |
33 | 486 | c->GetVal(), |
34 | 486 | zeek::val_mgr->Bool(is_orig), |
35 | 486 | std::move(header), |
36 | 486 | std::move(pdu), |
37 | 486 | }, |
38 | 486 | zeek::util::detail::SOURCE_LOCAL, analyzer ? analyzer->GetID() : 0, c); |
39 | 486 | } |
40 | | |
41 | | zeek::EventHandlerPtr snmp_response; |
42 | | void zeek::BifEvent::enqueue_snmp_response(zeek::analyzer::Analyzer* analyzer, zeek::Connection* c, int is_orig, zeek::IntrusivePtr<zeek::Val> header, zeek::IntrusivePtr<zeek::Val> pdu) |
43 | 2.35k | { |
44 | | // Note that it is intentional that here we do not |
45 | | // check if ::snmp_response is NULL, which should happen *before* |
46 | | // zeek::BifEvent::enqueue_snmp_response is called to avoid unnecessary Val |
47 | | // allocation. |
48 | | |
49 | 2.35k | zeek::event_mgr.Enqueue(::snmp_response, zeek::Args{ |
50 | 2.35k | c->GetVal(), |
51 | 2.35k | zeek::val_mgr->Bool(is_orig), |
52 | 2.35k | std::move(header), |
53 | 2.35k | std::move(pdu), |
54 | 2.35k | }, |
55 | 2.35k | zeek::util::detail::SOURCE_LOCAL, analyzer ? analyzer->GetID() : 0, c); |
56 | 2.35k | } |
57 | | |
58 | | zeek::EventHandlerPtr snmp_set_request; |
59 | | void zeek::BifEvent::enqueue_snmp_set_request(zeek::analyzer::Analyzer* analyzer, zeek::Connection* c, int is_orig, zeek::IntrusivePtr<zeek::Val> header, zeek::IntrusivePtr<zeek::Val> pdu) |
60 | 746 | { |
61 | | // Note that it is intentional that here we do not |
62 | | // check if ::snmp_set_request is NULL, which should happen *before* |
63 | | // zeek::BifEvent::enqueue_snmp_set_request is called to avoid unnecessary Val |
64 | | // allocation. |
65 | | |
66 | 746 | zeek::event_mgr.Enqueue(::snmp_set_request, zeek::Args{ |
67 | 746 | c->GetVal(), |
68 | 746 | zeek::val_mgr->Bool(is_orig), |
69 | 746 | std::move(header), |
70 | 746 | std::move(pdu), |
71 | 746 | }, |
72 | 746 | zeek::util::detail::SOURCE_LOCAL, analyzer ? analyzer->GetID() : 0, c); |
73 | 746 | } |
74 | | |
75 | | zeek::EventHandlerPtr snmp_trap; |
76 | | void zeek::BifEvent::enqueue_snmp_trap(zeek::analyzer::Analyzer* analyzer, zeek::Connection* c, int is_orig, zeek::IntrusivePtr<zeek::Val> header, zeek::IntrusivePtr<zeek::Val> pdu) |
77 | 561 | { |
78 | | // Note that it is intentional that here we do not |
79 | | // check if ::snmp_trap is NULL, which should happen *before* |
80 | | // zeek::BifEvent::enqueue_snmp_trap is called to avoid unnecessary Val |
81 | | // allocation. |
82 | | |
83 | 561 | zeek::event_mgr.Enqueue(::snmp_trap, zeek::Args{ |
84 | 561 | c->GetVal(), |
85 | 561 | zeek::val_mgr->Bool(is_orig), |
86 | 561 | std::move(header), |
87 | 561 | std::move(pdu), |
88 | 561 | }, |
89 | 561 | zeek::util::detail::SOURCE_LOCAL, analyzer ? analyzer->GetID() : 0, c); |
90 | 561 | } |
91 | | |
92 | | zeek::EventHandlerPtr snmp_get_bulk_request; |
93 | | void zeek::BifEvent::enqueue_snmp_get_bulk_request(zeek::analyzer::Analyzer* analyzer, zeek::Connection* c, int is_orig, zeek::IntrusivePtr<zeek::Val> header, zeek::IntrusivePtr<zeek::Val> pdu) |
94 | 1.20k | { |
95 | | // Note that it is intentional that here we do not |
96 | | // check if ::snmp_get_bulk_request is NULL, which should happen *before* |
97 | | // zeek::BifEvent::enqueue_snmp_get_bulk_request is called to avoid unnecessary Val |
98 | | // allocation. |
99 | | |
100 | 1.20k | zeek::event_mgr.Enqueue(::snmp_get_bulk_request, zeek::Args{ |
101 | 1.20k | c->GetVal(), |
102 | 1.20k | zeek::val_mgr->Bool(is_orig), |
103 | 1.20k | std::move(header), |
104 | 1.20k | std::move(pdu), |
105 | 1.20k | }, |
106 | 1.20k | zeek::util::detail::SOURCE_LOCAL, analyzer ? analyzer->GetID() : 0, c); |
107 | 1.20k | } |
108 | | |
109 | | zeek::EventHandlerPtr snmp_inform_request; |
110 | | void zeek::BifEvent::enqueue_snmp_inform_request(zeek::analyzer::Analyzer* analyzer, zeek::Connection* c, int is_orig, zeek::IntrusivePtr<zeek::Val> header, zeek::IntrusivePtr<zeek::Val> pdu) |
111 | 508 | { |
112 | | // Note that it is intentional that here we do not |
113 | | // check if ::snmp_inform_request is NULL, which should happen *before* |
114 | | // zeek::BifEvent::enqueue_snmp_inform_request is called to avoid unnecessary Val |
115 | | // allocation. |
116 | | |
117 | 508 | zeek::event_mgr.Enqueue(::snmp_inform_request, zeek::Args{ |
118 | 508 | c->GetVal(), |
119 | 508 | zeek::val_mgr->Bool(is_orig), |
120 | 508 | std::move(header), |
121 | 508 | std::move(pdu), |
122 | 508 | }, |
123 | 508 | zeek::util::detail::SOURCE_LOCAL, analyzer ? analyzer->GetID() : 0, c); |
124 | 508 | } |
125 | | |
126 | | zeek::EventHandlerPtr snmp_trapV2; |
127 | | void zeek::BifEvent::enqueue_snmp_trapV2(zeek::analyzer::Analyzer* analyzer, zeek::Connection* c, int is_orig, zeek::IntrusivePtr<zeek::Val> header, zeek::IntrusivePtr<zeek::Val> pdu) |
128 | 532 | { |
129 | | // Note that it is intentional that here we do not |
130 | | // check if ::snmp_trapV2 is NULL, which should happen *before* |
131 | | // zeek::BifEvent::enqueue_snmp_trapV2 is called to avoid unnecessary Val |
132 | | // allocation. |
133 | | |
134 | 532 | zeek::event_mgr.Enqueue(::snmp_trapV2, zeek::Args{ |
135 | 532 | c->GetVal(), |
136 | 532 | zeek::val_mgr->Bool(is_orig), |
137 | 532 | std::move(header), |
138 | 532 | std::move(pdu), |
139 | 532 | }, |
140 | 532 | zeek::util::detail::SOURCE_LOCAL, analyzer ? analyzer->GetID() : 0, c); |
141 | 532 | } |
142 | | |
143 | | zeek::EventHandlerPtr snmp_report; |
144 | | void zeek::BifEvent::enqueue_snmp_report(zeek::analyzer::Analyzer* analyzer, zeek::Connection* c, int is_orig, zeek::IntrusivePtr<zeek::Val> header, zeek::IntrusivePtr<zeek::Val> pdu) |
145 | 359 | { |
146 | | // Note that it is intentional that here we do not |
147 | | // check if ::snmp_report is NULL, which should happen *before* |
148 | | // zeek::BifEvent::enqueue_snmp_report is called to avoid unnecessary Val |
149 | | // allocation. |
150 | | |
151 | 359 | zeek::event_mgr.Enqueue(::snmp_report, zeek::Args{ |
152 | 359 | c->GetVal(), |
153 | 359 | zeek::val_mgr->Bool(is_orig), |
154 | 359 | std::move(header), |
155 | 359 | std::move(pdu), |
156 | 359 | }, |
157 | 359 | zeek::util::detail::SOURCE_LOCAL, analyzer ? analyzer->GetID() : 0, c); |
158 | 359 | } |
159 | | |
160 | | zeek::EventHandlerPtr snmp_unknown_pdu; |
161 | | void zeek::BifEvent::enqueue_snmp_unknown_pdu(zeek::analyzer::Analyzer* analyzer, zeek::Connection* c, int is_orig, zeek::IntrusivePtr<zeek::Val> header, zeek_uint_t tag) |
162 | 7.69k | { |
163 | | // Note that it is intentional that here we do not |
164 | | // check if ::snmp_unknown_pdu is NULL, which should happen *before* |
165 | | // zeek::BifEvent::enqueue_snmp_unknown_pdu is called to avoid unnecessary Val |
166 | | // allocation. |
167 | | |
168 | 7.69k | zeek::event_mgr.Enqueue(::snmp_unknown_pdu, zeek::Args{ |
169 | 7.69k | c->GetVal(), |
170 | 7.69k | zeek::val_mgr->Bool(is_orig), |
171 | 7.69k | std::move(header), |
172 | 7.69k | zeek::val_mgr->Count(tag), |
173 | 7.69k | }, |
174 | 7.69k | zeek::util::detail::SOURCE_LOCAL, analyzer ? analyzer->GetID() : 0, c); |
175 | 7.69k | } |
176 | | |
177 | | zeek::EventHandlerPtr snmp_unknown_scoped_pdu; |
178 | | void zeek::BifEvent::enqueue_snmp_unknown_scoped_pdu(zeek::analyzer::Analyzer* analyzer, zeek::Connection* c, int is_orig, zeek::IntrusivePtr<zeek::Val> header, zeek_uint_t tag) |
179 | 1.27k | { |
180 | | // Note that it is intentional that here we do not |
181 | | // check if ::snmp_unknown_scoped_pdu is NULL, which should happen *before* |
182 | | // zeek::BifEvent::enqueue_snmp_unknown_scoped_pdu is called to avoid unnecessary Val |
183 | | // allocation. |
184 | | |
185 | 1.27k | zeek::event_mgr.Enqueue(::snmp_unknown_scoped_pdu, zeek::Args{ |
186 | 1.27k | c->GetVal(), |
187 | 1.27k | zeek::val_mgr->Bool(is_orig), |
188 | 1.27k | std::move(header), |
189 | 1.27k | zeek::val_mgr->Count(tag), |
190 | 1.27k | }, |
191 | 1.27k | zeek::util::detail::SOURCE_LOCAL, analyzer ? analyzer->GetID() : 0, c); |
192 | 1.27k | } |
193 | | |
194 | | zeek::EventHandlerPtr snmp_encrypted_pdu; |
195 | | void zeek::BifEvent::enqueue_snmp_encrypted_pdu(zeek::analyzer::Analyzer* analyzer, zeek::Connection* c, int is_orig, zeek::IntrusivePtr<zeek::Val> header) |
196 | 1.04k | { |
197 | | // Note that it is intentional that here we do not |
198 | | // check if ::snmp_encrypted_pdu is NULL, which should happen *before* |
199 | | // zeek::BifEvent::enqueue_snmp_encrypted_pdu is called to avoid unnecessary Val |
200 | | // allocation. |
201 | | |
202 | 1.04k | zeek::event_mgr.Enqueue(::snmp_encrypted_pdu, zeek::Args{ |
203 | 1.04k | c->GetVal(), |
204 | 1.04k | zeek::val_mgr->Bool(is_orig), |
205 | 1.04k | std::move(header), |
206 | 1.04k | }, |
207 | 1.04k | zeek::util::detail::SOURCE_LOCAL, analyzer ? analyzer->GetID() : 0, c); |
208 | 1.04k | } |
209 | | |
210 | | zeek::EventHandlerPtr snmp_unknown_header_version; |
211 | | void zeek::BifEvent::enqueue_snmp_unknown_header_version(zeek::analyzer::Analyzer* analyzer, zeek::Connection* c, int is_orig, zeek_uint_t version) |
212 | 1.72k | { |
213 | | // Note that it is intentional that here we do not |
214 | | // check if ::snmp_unknown_header_version is NULL, which should happen *before* |
215 | | // zeek::BifEvent::enqueue_snmp_unknown_header_version is called to avoid unnecessary Val |
216 | | // allocation. |
217 | | |
218 | 1.72k | zeek::event_mgr.Enqueue(::snmp_unknown_header_version, zeek::Args{ |
219 | 1.72k | c->GetVal(), |
220 | 1.72k | zeek::val_mgr->Bool(is_orig), |
221 | 1.72k | zeek::val_mgr->Count(version), |
222 | 1.72k | }, |
223 | 1.72k | zeek::util::detail::SOURCE_LOCAL, analyzer ? analyzer->GetID() : 0, c); |
224 | 1.72k | } |
225 | | |