DTNMA Reference Tools v2.1.0 - 13.gc5c0bac
Delay-Tolerant Networking Management Architecture (DTNMA) Tool Suite
Loading...
Searching...
No Matches
daemon_run.c File Reference
#include "daemon_run.h"
#include "logging.h"
#include <errno.h>
+ Include dependency graph for daemon_run.c:

Functions

int cace_daemon_run_init (cace_daemon_run_t *dr)
 daemon_run_init Initialize the daemon run object.
 
void cace_daemon_run_cleanup (cace_daemon_run_t *dr)
 daemon_run_cleanup Deinitialize the object.
 
void cace_daemon_run_stop (cace_daemon_run_t *dr)
 daemon_run_stop Signal the daemon to stop running.
 
bool cace_daemon_run_get (cace_daemon_run_t *dr)
 daemon_run_get Determine the daemon running status.
 
bool cace_daemon_run_wait (cace_daemon_run_t *dr)
 Wait until the running state is stopped.
 

Function Documentation

◆ cace_daemon_run_cleanup()

void cace_daemon_run_cleanup ( cace_daemon_run_t dr)

daemon_run_cleanup Deinitialize the object.

Parameters
drThe object to inspect.

References CACE_LOG_ERR, and cace_daemon_run_t::stop.

Referenced by refda_agent_deinit(), and refdm_mgr_deinit().

◆ cace_daemon_run_get()

bool cace_daemon_run_get ( cace_daemon_run_t dr)

daemon_run_get Determine the daemon running status.

This function is thread safe.

Parameters
drThe object to inspect.
Returns
True if the daemon continues to run.

References CACE_LOG_DEBUG, CACE_LOG_ERR, and cace_daemon_run_t::stop.

Referenced by bp_recv_worker(), bp_send_worker(), cace_amp_proxy_cli_recv(), cace_amp_socket_recv(), cace_daemon_run_init(), refda_ingress_worker(), refdm_ingress_worker(), sock_worker(), and stdin_recv().

◆ cace_daemon_run_init()

int cace_daemon_run_init ( cace_daemon_run_t dr)

daemon_run_init Initialize the daemon run object.

Parameters
drThe object to initialize.
Returns
Zero if successful, nonzero otherwise.

References cace_daemon_run_get(), CACE_LOG_ERR, and cace_daemon_run_t::stop.

Referenced by refda_agent_init(), and refdm_mgr_init().

◆ cace_daemon_run_stop()

void cace_daemon_run_stop ( cace_daemon_run_t dr)

daemon_run_stop Signal the daemon to stop running.

Parameters
drThe object to inspect.

References CACE_LOG_ERR, CACE_LOG_INFO, and cace_daemon_run_t::stop.

Referenced by bp_recv_worker(), daemon_signal_handler(), refda_agent_stop(), refda_egress_worker(), refdm_mgr_stop(), and sock_worker().

◆ cace_daemon_run_wait()

bool cace_daemon_run_wait ( cace_daemon_run_t dr)

Wait until the running state is stopped.

Parameters
drThe run object.
Returns
True if successful.

References CACE_LOG_ERR, and cace_daemon_run_t::stop.

Referenced by main().