hellopics-mgmt_main.c File Reference

Contains main entry point. More...

#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <isc/eventlib.h>
#include <jnx/aux_types.h>
#include <jnx/bits.h>
#include <jnx/mgmt_sock_pub.h>
#include <jnx/junos_init.h>
#include <jnx/junos_trace.h>
#include "hellopics-mgmt_logging.h"
#include "hellopics-mgmt_config.h"
#include "hellopics-mgmt_conn.h"
#include "hellopics-mgmt_ha.h"

Go to the source code of this file.


#define DNAME_HELLOPICS_MGMT   "hellopics-mgmt"


static void hellopics_mastership_switch (bool master)
static int hellopics_init (evContext ctx)
int main (int argc, char **argv)


volatile boolean is_master
const parse_menu_t master_menu []
evContext present_ctx

Detailed Description

Contains main entry point.

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

Definition in file hellopics-mgmt_main.c.

Define Documentation

#define DNAME_HELLOPICS_MGMT   "hellopics-mgmt"

Constant string for the daemon name

Definition at line 129 of file hellopics-mgmt_main.c.

Referenced by main().

Function Documentation

static int hellopics_init ( evContext  ctx  )  [static]

Callback for the first initialization of the RE-SDK Application

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

Definition at line 154 of file hellopics-mgmt_main.c.

References init_config(), init_connection_stats(), init_server(), and present_ctx.

Referenced by main().

static void hellopics_mastership_switch ( bool master  __unused  )  [static]

Callback function, called when the RE switches mastership and the mastership notification happens.

[in] master Indicates master or backup.

Definition at line 234 of file hellopics-mgmt_main.c.

References LOG.

Referenced by main().

int main ( int  argc,
char **  argv 

Intializes hellopics-mgmt's environment

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

Definition at line 180 of file hellopics-mgmt_main.c.

References DNAME_HELLOPICS_MGMT, hellopics_config_read(), hellopics_init(), hellopics_mastership_switch(), LOG, and master_menu.

Variable Documentation

const parse_menu_t master_menu[]

main menu of commands

Definition at line 116 of file hellopics-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:58 2010 for SDK Your Net Corporation Hellopics Example: hellopics-mgmt 1.0 by Doxygen 1.5.1