BSL v0.0.0
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 "bsl_mock_bpa.h"
#include "mock_bpa_ctr.h"
#include <security_context/DefaultSecContext.h>
#include <policy_provider/SamplePolicyProvider.h>
Go to the source code of this file.
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_in6 *addr, const char *optarg) |
static int | bind_udp (int *sock, const struct sockaddr_in6 *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_in6 | over_addr = { .sin6_family = 0 } |
static struct sockaddr_in6 | app_addr = { .sin6_family = 0 } |
static struct sockaddr_in6 | under_addr = { .sin6_family = 0 } |
static struct sockaddr_in6 | router_addr = { .sin6_family = 0 } |
static int | tx_notify_r |
static int | tx_notify_w |
static BSL_HostEID_t | sec_eid |
This is the main entry for a mock BPA daemon that communicates through unix domain sockets.
Definition in file mock_bpa.c.
#define DATA_QUEUE_SIZE 100 |
Definition at line 46 of file mock_bpa.c.
|
static |
Definition at line 113 of file mock_bpa.c.
|
static |
Definition at line 517 of file mock_bpa.c.
|
static |
Definition at line 362 of file mock_bpa.c.
|
static |
Definition at line 315 of file mock_bpa.c.
|
static |
Definition at line 72 of file mock_bpa.c.
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 575 of file mock_bpa.c.
|
static |
Definition at line 138 of file mock_bpa.c.
|
static |
Definition at line 563 of file mock_bpa.c.
|
static |
Definition at line 173 of file mock_bpa.c.
|
static |
Definition at line 243 of file mock_bpa.c.
|
static |
Definition at line 279 of file mock_bpa.c.
|
static |
Definition at line 179 of file mock_bpa.c.
|
static |
Definition at line 208 of file mock_bpa.c.
|
static |
Definition at line 66 of file mock_bpa.c.
|
static |
Definition at line 64 of file mock_bpa.c.
|
static |
Definition at line 61 of file mock_bpa.c.
|
static |
Definition at line 55 of file mock_bpa.c.
|
static |
Definition at line 56 of file mock_bpa.c.
|
static |
Definition at line 65 of file mock_bpa.c.
|
static |
Definition at line 52 of file mock_bpa.c.
|
static |
Definition at line 68 of file mock_bpa.c.
|
static |
Definition at line 70 of file mock_bpa.c.
|
static |
Definition at line 44 of file mock_bpa.c.
|
static |
Definition at line 58 of file mock_bpa.c.
|
static |
Definition at line 58 of file mock_bpa.c.
|
static |
Definition at line 58 of file mock_bpa.c.
|
static |
Definition at line 58 of file mock_bpa.c.
|
static |
Definition at line 69 of file mock_bpa.c.
|
static |
Definition at line 69 of file mock_bpa.c.
|
static |
Definition at line 67 of file mock_bpa.c.
|
static |
Definition at line 53 of file mock_bpa.c.
|
static |
Definition at line 54 of file mock_bpa.c.