EDGESEC
0.1.0-alpha.0+sha.ca29a8277b72f80785649ea9ef9cd7edf642d939
Secure router - reference implementation
|
File containing the implementation of the protobuf middleware utilities. More...
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <eloop.h>
#include <libgen.h>
#include <sqlite3.h>
#include <string.h>
#include "protobuf_encoder.h"
#include "protobuf_middleware.h"
#include "../../../utils/allocs.h"
#include "../../../utils/log.h"
#include "../../../utils/os.h"
#include "../../../utils/squeue.h"
#include "../../pcap_service.h"
#include "../header_middleware/packet_decoder.h"
#include "../header_middleware/packet_queue.h"
Functions | |
int | pipe_protobuf_tuple_packet (const char *path, int *fd, struct tuple_packet *p) |
pipe the serialised protobuf tuple packets More... | |
int | pipe_protobuf_packets (const char *path, int *fd, UT_array *packets) |
pipe the serialised protobuf packets More... | |
void | free_protobuf_middleware (struct middleware_context *context) |
struct middleware_context * | init_protobuf_middleware (sqlite3 *db, char *db_path, struct eloop_data *eloop, struct pcap_context *pc, char *params) |
int | process_protobuf_middleware (struct middleware_context *context, const char *ltype, struct pcap_pkthdr *header, uint8_t *packet, char *ifname) |
Variables | |
struct capture_middleware | protobuf_middleware |
protobuf Capture Middleware. The protobuf capture middleware generates protobuf messages from caprtured traffic. More... | |
File containing the implementation of the protobuf middleware utilities.
void free_protobuf_middleware | ( | struct middleware_context * | context | ) |
struct middleware_context* init_protobuf_middleware | ( | sqlite3 * | db, |
char * | db_path, | ||
struct eloop_data * | eloop, | ||
struct pcap_context * | pc, | ||
char * | params | ||
) |
int pipe_protobuf_packets | ( | const char * | path, |
int * | fd, | ||
UT_array * | packets | ||
) |
pipe the serialised protobuf packets
path[in] | The pipe file path |
fd[in] | The pipe file descriptor |
packets[in] | The array of packets |
int pipe_protobuf_tuple_packet | ( | const char * | path, |
int * | fd, | ||
struct tuple_packet * | p | ||
) |
pipe the serialised protobuf tuple packets
path[in] | The pipe file path |
fd[in,out] | The pipe file descriptor. If 0 , this will be set to a new fd pointing to path . |
p[in] | The tuple packet |
int process_protobuf_middleware | ( | struct middleware_context * | context, |
const char * | ltype, | ||
struct pcap_pkthdr * | header, | ||
uint8_t * | packet, | ||
char * | ifname | ||
) |
struct capture_middleware protobuf_middleware |
protobuf Capture Middleware. The protobuf capture middleware generates protobuf messages from caprtured traffic.