#include <sync/common.h>
#include <jnx/pmon.h>
#include "dpm-mgmt_main.h"
#include "dpm-mgmt_config.h"
#include "dpm-mgmt_conn.h"
#include "dpm-mgmt_kcom.h"
#include "dpm-mgmt_logging.h"
Go to the source code of this file.
Defines | |
#define | DNAME_DPM_MGMT "dpm-mgmt" |
#define | PMON_HB_INTERVAL 30 |
Functions | |
static void | dpm_sigterm (int signal_ign __unused) |
static int | dpm_init (evContext ctx) |
void | dpm_shutdown (boolean do_exit) |
int | main (int argc, char **argv) |
Variables | |
const parse_menu_t | master_menu [] |
const char * | dpm_config [] |
static junos_pmon_context_t | pmon |
health monitoring handle |
Contains the main entry point and registers the application as a JUNOS daemon
Definition in file dpm-mgmt_main.c.
#define DNAME_DPM_MGMT "dpm-mgmt" |
Constant string for the daemon name
Definition at line 397 of file dpm-mgmt_main.c.
Referenced by main().
#define PMON_HB_INTERVAL 30 |
The heartbeat interval to use when setting up process health monitoring
Definition at line 403 of file dpm-mgmt_main.c.
Referenced by dpm_init().
static int dpm_init | ( | evContext | ctx | ) | [static] |
Callback for the first initialization of the RE-SDK Application
[in] | ctx | Newly created event context |
Definition at line 446 of file dpm-mgmt_main.c.
References clear_config(), dpm_sigterm(), init_config(), init_conn_server(), kcom_init(), kcom_shutdown(), LOG, pmon, PMON_HB_INTERVAL, and shutdown_conn_server().
Referenced by main().
void dpm_shutdown | ( | boolean | do_exit | ) |
Shutdown app and opitonally exit with status 0
[in] | do_exit | if true, log a shutdown message and call exit(0) |
Definition at line 512 of file dpm-mgmt_main.c.
References clear_config(), kcom_shutdown(), LOG, pmon, and shutdown_conn_server().
Referenced by dpm_sigterm().
static void dpm_sigterm | ( | int signal_ign | __unused | ) | [static] |
Shutdown app upon a SIGTERM.
[in] | signal_ign | Always SIGTERM (ignored) |
Definition at line 431 of file dpm-mgmt_main.c.
References dpm_shutdown().
Referenced by dpm_init().
int main | ( | int | argc, | |
char ** | argv | |||
) |
Intializes dpm-mgmt's environment
[in] | argc | Number of command line arguments |
[in] | argv | String array of command line arguments |
Definition at line 539 of file dpm-mgmt_main.c.
References DNAME_DPM_MGMT, dpm_config, dpm_config_read(), dpm_init(), and master_menu.
const char* dpm_config[] |
Path in configuration DB to DPM configuration
Definition at line 38 of file dpm-mgmt_config.c.
Referenced by dpm_config_read(), and main().
const parse_menu_t master_menu[] |