pub fn lks_tap(query: LkQuery, cb: impl PointHandler + 'static) -> LkResult<i64>
Expand description
If the :scan option is set, cb for all matching packets. If the :watch option is set, watch for new matching packets.
The absolute return value is the number of times the callback was called during :scan phase. A positive value means the callback finished by returning true|break - and won’t register watch for further matches.
A 0 or negative value means it is watching for new packets During [lks_process] or [lks_process_while] the cb is called for each matching packet.
The watch is finished when
- the cb returns true or ControlFlow::Break.
- the predicate set will never match again (e.g. the ‘i_*’ or ‘recv’ predicate shall never match again )
- [lks_stop] is called with the matching watch id