Helium
Data Structures | Typedefs | Enumerations
he_plugin.h File Reference

The internal plugin API definitions. More...

#include <stddef.h>
#include <stdint.h>
Include dependency graph for he_plugin.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  plugin_struct
 Data structure of a helium plugin. More...
 

Typedefs

typedef enum he_plugin_return_code he_plugin_return_code_t
 
typedef he_plugin_return_code_t(* plugin_do_ingress) (uint8_t *packet, size_t *length, size_t capacity, void *data)
 The prototype for the ingress function of a helium plugin. More...
 
typedef he_plugin_return_code_t(* plugin_do_egress) (uint8_t *packet, size_t *length, size_t capacity, void *data)
 The prototype for the egress function of a helium plugin. More...
 
typedef struct plugin_struct plugin_struct_t
 Data structure of a helium plugin.
 

Enumerations

enum  he_plugin_return_code { HE_PLUGIN_SUCCESS = 0, HE_PLUGIN_FAIL = -1, HE_PLUGIN_DROP = -2 }
 

Detailed Description

The internal plugin API definitions.

This file is separated out to clearly indicate that a plugin implementation only needs to care about this API, not the full set of types and functions included.

Typedef Documentation

◆ he_plugin_return_code_t

All possible return code for a helium plugin

◆ plugin_do_egress

typedef he_plugin_return_code_t(* plugin_do_egress) (uint8_t *packet, size_t *length, size_t capacity, void *data)

The prototype for the egress function of a helium plugin.

Parameters
packetA pointer to the packet data
lengthA pointer to the length of the packet data. If the packet size changed after processed by this function, the length will be set to the new length of the packet data.
capacityThe length of the underlying buffer for packet
dataA pointer to the context data of the helium plugin
Returns
HE_SUCCESS All plugins executed successfully
HE_ERR_PLUGIN_DROP A plugin marked this packet for a drop
HE_ERR_FAILED An error occurred processing this packet
Note
The content of packet may be modified, grow or shrunk, depending on the registered plugins

◆ plugin_do_ingress

typedef he_plugin_return_code_t(* plugin_do_ingress) (uint8_t *packet, size_t *length, size_t capacity, void *data)

The prototype for the ingress function of a helium plugin.

Parameters
packetA pointer to the packet data
lengthA pointer to the length of the packet data. If the packet size changed after processed by this function, the length will be set to the new length of the packet data.
capacityThe length of the underlying buffer for packet
dataA pointer to the context data of the helium plugin
Returns
HE_SUCCESS All plugins executed successfully
HE_ERR_PLUGIN_DROP A plugin marked this packet for a drop
HE_ERR_FAILED An error occurred processing this packet
Note
The content of packet may be modified, grow or shrunk, depending on the registered plugins

Enumeration Type Documentation

◆ he_plugin_return_code

All possible return code for a helium plugin