EDGESEC
0.1.0-alpha.0+sha.ca29a8277b72f80785649ea9ef9cd7edf642d939
Secure router - reference implementation
|
File containing the implementation of the subscriber events structure. More...
#include <stdbool.h>
#include <inttypes.h>
#include <sys/un.h>
#include <utarray.h>
#include "subscriber_events.h"
#include "supervisor_config.h"
#include "../utils/log.h"
#include "../utils/sockctl.h"
Macros | |
#define | MAX_SEND_EVENTS_BUF_SIZE 4096 |
Functions | |
int | compare_client_addresses (const struct client_address *a, const struct client_address *b) |
int | sort_subscribers_array (const void *a, const void *b) |
int | add_events_subscriber (struct supervisor_context *context, const struct client_address *addr) |
Add a subscriber to the subscriber events array. More... | |
int | send_events (struct supervisor_context *context, const char *name, const char *format, va_list args) |
int | send_events_subscriber (struct supervisor_context *context, enum SUBSCRIBER_EVENT type, const char *format,...) |
Send an event to the subscribers array. More... | |
File containing the implementation of the subscriber events structure.
#define MAX_SEND_EVENTS_BUF_SIZE 4096 |
int add_events_subscriber | ( | struct supervisor_context * | context, |
const struct client_address * | addr | ||
) |
Add a subscriber to the subscriber events array.
context | The supervisor context |
addr | The subscriber address |
int compare_client_addresses | ( | const struct client_address * | a, |
const struct client_address * | b | ||
) |
int send_events | ( | struct supervisor_context * | context, |
const char * | name, | ||
const char * | format, | ||
va_list | args | ||
) |
int send_events_subscriber | ( | struct supervisor_context * | context, |
enum SUBSCRIBER_EVENT | type, | ||
const char * | format, | ||
... | |||
) |
Send an event to the subscribers array.
context | The supervisor context |
type | The event type |
format | The event format text, passed to vsnprintf() |
... | The event format variables, passed to vsnprintf() |
int sort_subscribers_array | ( | const void * | a, |
const void * | b | ||
) |