| 
    EDGESEC
    0.1.0-alpha.0+sha.ca29a8277b72f80785649ea9ef9cd7edf642d939
    
   Secure router - reference implementation 
   | 
 
Structure describing a middleware for the EDGESec capture service. More...
#include <middleware.h>
Data Fields | |
| struct middleware_context *(*const | init )(sqlite3 *db, char *db_path, struct eloop_data *eloop, struct pcap_context *pc, char *params) | 
| Initialises the middleware.  More... | |
| int(*const | process )(struct middleware_context *context, const char *ltype, struct pcap_pkthdr *header, uint8_t *packet, char *ifname) | 
| Runs the middleware.  More... | |
| void(*const | free )(struct middleware_context *context) | 
| Frees the middleware context.  More... | |
| const char *const | name | 
| Human readable name for middleware.  More... | |
Structure describing a middleware for the EDGESec capture service.
All EDGESec capture service middlewares should expose a variable of type capture_middleware only.
You can then use the CMake function edgesecAddCaptureMiddleware to add your middleware to the EDGESec capture service when building EDGESec. 
| void(*const capture_middleware::free) (struct middleware_context *context) | 
Frees the middleware context.
| context | The middleware context | 
| struct middleware_context*(*const capture_middleware::init) (sqlite3 *db, char *db_path, struct eloop_data *eloop, struct pcap_context *pc, char *params) | 
Initialises the middleware.
| db | The sqlite3 db | 
| db_path | The sqlite3 db path | 
| eloop | The eloop structure | 
| pc | The pcap context | 
| params | The middleware params | 
| const char* const capture_middleware::name | 
Human readable name for middleware.
Human readable name for this middleware. Currently only used for logs.
| int(*const capture_middleware::process) (struct middleware_context *context, const char *ltype, struct pcap_pkthdr *header, uint8_t *packet, char *ifname) | 
Runs the middleware.
| context | The middleware context | 
| ltype | The packet type | 
| header | The pcap packet header | 
| packet | The pcap packet | 
| ifname | The capture interface | 
| 0 | on success | 
| -1 | on failure |