actf 0.0.1
An acute CTF reader
Loading...
Searching...
No Matches
/home/adwe/code/actf/lua_filter.h
Go to the documentation of this file.
1/*
2 * This file is a part of ACTF.
3 *
4 * Copyright (C) 2026 Adam Wendelin <adwe live se>
5 *
6 * ACTF is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU Lesser General Public License as
8 * published by the Free Software Foundation, either version 3 of the
9 * License, or (at your option) any later version.
10 *
11 * ACTF is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
14 * Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with ACTF. If not, see
18 * <https://www.gnu.org/licenses/>.
19 */
20
206#ifndef LUA_FILTER_H
207#define LUA_FILTER_H
208
209#include "event.h"
210#include "event_generator.h"
211
212
223
237 size_t evs_cap);
238
247int actf_lua_filter_lua_init(actf_lua_filter *f, const char *filter_path,
248 int filter_argc, char *filter_argv[]);
249
251int actf_lua_filter_filter(actf_lua_filter *f, actf_event ***evs, size_t *evs_len);
252
255
258
261
267
278
279#endif /* LUA_FILTER_H */
Event related methods.
struct actf_event actf_event
An event.
Definition event.h:35
Event generator API.
struct actf_event_generator actf_lua_filter_to_generator(actf_lua_filter *f)
Create an event generator based on a filter.
const char * actf_lua_filter_last_error(actf_lua_filter *f)
int actf_lua_filter_seek_ns_from_origin(actf_lua_filter *f, int64_t tstamp)
int actf_lua_filter_lua_fini(actf_lua_filter *f)
Finalize a filter, calling actf.fini.
void actf_lua_filter_free(actf_lua_filter *f)
Free a filter.
actf_lua_filter * actf_lua_filter_init(struct actf_event_generator gen, size_t evs_cap)
Initialize a lua filter struct.
struct actf_lua_filter actf_lua_filter
A lua filter, implements an actf_event_generator.
Definition lua_filter.h:222
int actf_lua_filter_lua_init(actf_lua_filter *f, const char *filter_path, int filter_argc, char *filter_argv[])
Initialize the lua part of the filter and call actf.init.
int actf_lua_filter_filter(actf_lua_filter *f, actf_event ***evs, size_t *evs_len)
An event generator.
Definition event_generator.h:93