cpd_main.c File Reference

Contains main entry point. More...

#include <signal.h>
#include <string.h>
#include <sys/types.h>
#include <isc/eventlib.h>
#include <jnx/mpsdk.h>
#include <jnx/aux_types.h>
#include <jnx/logging.h>
#include <jnx/junos_kcom.h>
#include "cpd_conn.h"
#include "cpd_config.h"
#include "cpd_http.h"
#include "cpd_logging.h"
#include "cpd_kcom.h"

Go to the source code of this file.


#define DNAME_CPD   "cpd"


static void cpd_ctrl_quit (int signo __unused)
static int cpd_init (evContext ctx)
int main (int32_t argc, char **argv)

Detailed Description

Contains main entry point.

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

Definition in file cpd_main.c.

Define Documentation

#define DNAME_CPD   "cpd"

Constant string for the daemon name

Definition at line 128 of file cpd_main.c.

Referenced by main().

Function Documentation

static void cpd_ctrl_quit ( int signo  __unused  )  [static]

This function quits the application upon a SIGTERM signal

Definition at line 140 of file cpd_main.c.

References clear_config(), close_connections(), LOG, and shutdown_http_server().

Referenced by cpd_init().

static int cpd_init ( evContext  ctx  )  [static]

Callback for the first initialization of the RE-SDK Application

[in] ctx Newly created event context
SUCCESS (0) upon successful completion

Definition at line 160 of file cpd_main.c.

References cpd_ctrl_quit(), cpd_kcom_init(), init_config(), and init_connections().

Referenced by main().

int main ( int32_t  argc,
char **  argv 

Intialize cpd'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 1 upon failure

Definition at line 194 of file cpd_main.c.

References cpd_init(), and DNAME_CPD.

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:53 2010 for SDK Your Net Corporation Policy Manager Example: Captive Portal Daemon (cpd) 1.0 by Doxygen 1.5.1