BSL v0.0.0 - 0.geda3e66
AMMOS Bundle Protocol Security Library (BSL)
|
This is the main entry for a mock BPA daemon that communicates through unix domain sockets. More...
#include <arpa/inet.h>
#include <errno.h>
#include <m-atomic.h>
#include <m-buffer.h>
#include <netdb.h>
#include <poll.h>
#include <signal.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/un.h>
#include <unistd.h>
#include <BPSecLib_Private.h>
#include <BPSecLib_Public.h>
#include <CryptoInterface.h>
#include "agent.h"
#include "ctr.h"
#include "policy_config.h"
#include "policy_registry.h"
#include <security_context/DefaultSecContext.h>
#include <policy_provider/SamplePolicyProvider.h>
Macros | |
#define | DATA_QUEUE_SIZE 100 |
Functions | |
BUFFER_DEF (data_queue, mock_bpa_ctr_t, DATA_QUEUE_SIZE, BUFFER_QUEUE|BUFFER_THREAD_SAFE|BUFFER_PUSH_INIT_POP_MOVE|BUFFER_BLOCKING) static data_queue_t over_rx | |
static int | ingest_netaddr (struct sockaddr_in *addr, const char *arg) |
static int | bind_udp (int *sock, const struct sockaddr_in *addr) |
static int | mock_bpa_process (BSL_PolicyLocation_e loc, MockBPA_Bundle_t *bundle) |
static void | sig_stop (int signum) |
static void * | work_over_rx (void *arg) |
static void * | work_under_rx (void *arg) |
static void * | work_deliver (void *arg) |
static void * | work_forward (void *arg) |
static int | bpa_init (void) |
static int | bpa_exec (void) |
static void | bpa_cleanup (void) |
static void | show_usage (const char *argv0) |
int | main (int argc, char **argv) |
Variables | |
static atomic_bool | stop_state |
static data_queue_t | over_tx |
static data_queue_t | under_rx |
static data_queue_t | under_tx |
static data_queue_t | deliver |
static data_queue_t | forward |
static pthread_t | thr_over_rx |
static pthread_t | thr_under_rx |
static pthread_t | thr_deliver |
static pthread_t | thr_forward |
static BSL_LibCtx_t * | bsl |
static BSL_HostEID_t | app_eid |
static struct sockaddr_in | over_addr = { .sin_family = 0 } |
static struct sockaddr_in | app_addr = { .sin_family = 0 } |
static struct sockaddr_in | under_addr = { .sin_family = 0 } |
static struct sockaddr_in | router_addr = { .sin_family = 0 } |
static int | tx_notify_r |
static int | tx_notify_w |
static BSL_HostEID_t | sec_eid |
static bool | policy_configured = false |
static mock_bpa_policy_registry_t | policy_registry |
This is the main entry for a mock BPA daemon that communicates through unix domain sockets.