|
DTNMA Reference Tools v2.1.0 - 13.gc5c0bac
Delay-Tolerant Networking Management Architecture (DTNMA) Tool Suite
|
#include "cace/amp/proxy_msg.h"#include "cace/amp/ion_bp.h"#include "cace/ari/text.h"#include "cace/util/threadset.h"#include "cace/util/logging.h"#include "cace/util/defs.h"#include <m-bstring.h>#include <m-shared-ptr.h>#include <m-buffer.h>#include <signal.h>#include <getopt.h>#include <errno.h>#include <sys/poll.h>#include <sys/socket.h>#include <sys/un.h>#include <bp.h>
Include dependency graph for main.c:Data Structures | |
| struct | prox_item_t |
Macros | |
| #define | M_OPL_prox_item_t() (INIT(API_2(prox_item_init)), CLEAR(API_2(prox_item_deinit)), INIT_SET(0), INIT_MOVE(0), SET(0), MOVE(0)) |
| M*LIB oplist for prox_item_t. | |
| #define | PROX_ITEM_QUEUE_DEPTH 10 |
Functions | |
| static int | mgr_parse_args (int argc, char *const argv[]) |
| Parse optional command line arguments. | |
| static void | show_usage (const char *argv0) |
| static void | prox_item_init (prox_item_t *obj) |
| static void | prox_item_deinit (prox_item_t *obj) |
| M_BUFFER_DEF (prox_item_queue, prox_item_ptr_t *, PROX_ITEM_QUEUE_DEPTH, M_BUFFER_QUEUE|M_BUFFER_PUSH_INIT_POP_MOVE, M_SHARED_PTR_OPLIST(prox_item_ptr, M_OPL_prox_item_t())) static prox_item_queue_t outgoing | |
| Items outgoing to the BPA. | |
| static void * | sock_worker (void *arg) |
| Thread work function for the socket side. | |
| static void * | bp_send_worker (void *ctx) |
| Thread work function for the BP sending (outgoing). | |
| static void * | bp_recv_worker (void *ctx) |
| Thread work function for the BP receiving (incoming). | |
| static void | daemon_signal_handler (int signum) |
| int | main (int argc, char *argv[]) |
Variables | |
| static cace_daemon_run_t | running |
| thread safe running state | |
| static int | log_limit = LOG_WARNING |
| logging filter | |
| static char * | arg_path_listen = NULL |
| Local listening socket path. | |
| static int | sock_listen = -1 |
| Socket FD for listening. | |
| static int | sock_conn = -1 |
| Socket FD for traffic. | |
| static char * | arg_eid = NULL |
| Local BP endpoint ID. | |
| static BpSAP | ion_sap |
| ION interface struct. | |
| static prox_item_queue_t | incoming |
| Items incoming from the BPA. | |
| static cace_threadset_t | threads |
| Thread states. | |
| #define M_OPL_prox_item_t | ( | ) | (INIT(API_2(prox_item_init)), CLEAR(API_2(prox_item_deinit)), INIT_SET(0), INIT_MOVE(0), SET(0), MOVE(0)) |
M*LIB oplist for prox_item_t.
| #define PROX_ITEM_QUEUE_DEPTH 10 |
|
static |
Thread work function for the BP receiving (incoming).
References cace_ari_set_tstr(), cace_daemon_run_get(), cace_daemon_run_stop(), CACE_LOG_ERR, CACE_LOG_INFO, prox_item_t::data, incoming, ion_sap, prox_item_t::peer, result, and running.
Referenced by main().
|
static |
Thread work function for the BP sending (outgoing).
References cace_ari_cget_tstr_cstr(), CACE_ARI_TEXT_ENC_OPTS_DEFAULT, cace_ari_text_encode(), cace_daemon_run_get(), CACE_LOG_ERR, CACE_LOG_INFO, prox_item_t::data, ion_sap, prox_item_t::peer, result, and running.
Referenced by main().
|
static |
References cace_daemon_run_stop(), CACE_LOG_INFO, and running.
Referenced by main().
| M_BUFFER_DEF | ( | prox_item_queue | , |
| prox_item_ptr_t * | , | ||
| PROX_ITEM_QUEUE_DEPTH | , | ||
| M_BUFFER_QUEUE| | M_BUFFER_PUSH_INIT_POP_MOVE, | ||
| M_SHARED_PTR_OPLIST(prox_item_ptr, M_OPL_prox_item_t()) | |||
| ) |
Items outgoing to the BPA.
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
References arg_eid, arg_path_listen, bp_recv_worker(), bp_send_worker(), cace_closelog(), cace_daemon_run_wait(), CACE_LOG_DEBUG, CACE_LOG_ERR, CACE_LOG_INFO, cace_log_set_least_severity(), cace_openlog(), cace_threadset_join(), cace_threadset_start(), daemon_signal_handler(), incoming, ion_sap, log_limit, mgr_parse_args(), PROX_ITEM_QUEUE_DEPTH, running, show_usage(), sock_conn, sock_listen, sock_worker(), and threads.
|
static |
Parse optional command line arguments.
References arg_eid, arg_path_listen, cace_log_get_severity(), log_limit, and show_usage().
Referenced by main().
|
static |
References cace_ari_deinit(), prox_item_t::data, and prox_item_t::peer.
|
static |
References cace_ari_init(), prox_item_t::data, and prox_item_t::peer.
|
static |
Referenced by main(), and mgr_parse_args().
|
static |
Thread work function for the socket side.
References cace_amp_proxy_msg_recv(), cace_amp_proxy_msg_send(), cace_daemon_run_get(), cace_daemon_run_stop(), CACE_LOG_ERR, CACE_LOG_INFO, prox_item_t::data, incoming, prox_item_t::peer, running, sock_conn, and sock_listen.
Referenced by main().
|
static |
Local BP endpoint ID.
Referenced by main(), and mgr_parse_args().
|
static |
Local listening socket path.
Referenced by main(), and mgr_parse_args().
|
static |
Items incoming from the BPA.
Referenced by bp_recv_worker(), main(), and sock_worker().
|
static |
ION interface struct.
Referenced by bp_recv_worker(), bp_send_worker(), and main().
|
static |
logging filter
Referenced by main(), and mgr_parse_args().
|
static |
thread safe running state
Referenced by bp_recv_worker(), bp_send_worker(), cace_amp_proxy_cli_recv(), cace_amp_socket_recv(), daemon_signal_handler(), dummy_recv(), main(), sock_worker(), stdin_recv(), and work_sink().
|
static |
Socket FD for traffic.
Referenced by main(), and sock_worker().
|
static |
Socket FD for listening.
Referenced by main(), and sock_worker().
|
static |
Thread states.
Referenced by main().