dpm-mgmt_main.c File Reference

Contains main entry point. More...

#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


Detailed Description

Contains main entry point.

Contains the main entry point and registers the application as a JUNOS daemon

Definition in file dpm-mgmt_main.c.


Define Documentation

#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().


Function Documentation

static int dpm_init ( evContext  ctx  )  [static]

Callback for the first initialization of the RE-SDK Application

Parameters:
[in] ctx Newly created event context
Returns:
SUCCESS if successful; otherwise EFAIL with an error message

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

Parameters:
[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.

Parameters:
[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

Parameters:
[in] argc Number of command line arguments
[in] argv String array of command line arguments
Returns:
0 upon successful exit of the application (shouldn't happen) or non-zero upon failure

Definition at line 539 of file dpm-mgmt_main.c.

References DNAME_DPM_MGMT, dpm_config, dpm_config_read(), dpm_init(), and master_menu.


Variable Documentation

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[]

main menu of commands

Definition at line 143 of file dpm-mgmt_ui.c.

Referenced by main().


2007-2009 Juniper Networks, Inc. All rights reserved. The information contained herein is confidential information of Juniper Networks, Inc., and may not be used, disclosed, distributed, modified, or copied without the prior written consent of Juniper Networks, Inc. in an express license. This information is subject to change by Juniper Networks, Inc. Juniper Networks, the Juniper Networks logo, and JUNOS are registered trademarks of Juniper Networks, Inc. in the United States and other countries. All other trademarks, service marks, registered trademarks, or registered service marks are the property of their respective owners.
Generated on Sun May 30 20:26:55 2010 for SDK Your Net Corporation Dynamic Policy Manager Example: dpm-mgmt 1.0 by Doxygen 1.5.1