Helium
plugin_chain.h
Go to the documentation of this file.
1 /* *
2  * Lightway Core
3  * Copyright (C) 2021 Express VPN International Ltd.
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * as published by the Free Software Foundation; either version 2
8  * of the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18  */
19 
26 #ifndef PLUGIN_CHAIN_H
27 #define PLUGIN_CHAIN_H
28 
29 #include <he.h>
30 
40 
46 
57 
69 he_return_code_t he_plugin_ingress(he_plugin_chain_t *chain, uint8_t *packet, size_t *length,
70  size_t capacity);
71 
83 he_return_code_t he_plugin_egress(he_plugin_chain_t *chain, uint8_t *packet, size_t *length,
84  size_t capacity);
85 
86 #endif // PLUGIN_CHAIN_H
he_return_code_t he_plugin_ingress(he_plugin_chain_t *chain, uint8_t *packet, size_t *length, size_t capacity)
Execute the ingress function of each registered plugin.
Definition: plugin_chain.c:53
enum he_return_code he_return_code_t
All possible return codes for helium.
he_return_code_t he_plugin_register_plugin(he_plugin_chain_t *chain, plugin_struct_t *plugin)
Register the plugin to the plugin chain.
Definition: plugin_chain.c:31
Definition: he.h:575
Definition: he_plugin.h:49
void he_plugin_destroy_chain(he_plugin_chain_t *chain)
Releases all memory allocated by Helium for this plugin chain.
Definition: plugin_chain.c:27
he_return_code_t he_plugin_egress(he_plugin_chain_t *chain, uint8_t *packet, size_t *length, size_t capacity)
Execute the egress function of each registered plugin.
Definition: plugin_chain.c:76
he_plugin_chain_t * he_plugin_create_chain(void)
Creates a Helium plugin chain.
Definition: plugin_chain.c:23
Core internal header file for libhelium.