pfd_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 <sync/policy_ipc.h>
#include "pfd_conn.h"
#include "pfd_kcom.h"
#include "pfd_logging.h"
#include "pfd_packet.h"
#include "pfd_config.h"
#include "pfd_nat.h"
#include "pfd_main.h"

Go to the source code of this file.

Defines

#define DNAME_PFD   "pfd"

Functions

static void pfd_quit (int signo __unused)
static int pfd_init (evContext ctx)
void pfd_shutdown (void)
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 pfd_main.c.


Define Documentation

#define DNAME_PFD   "pfd"

Constant string for the daemon name

Definition at line 144 of file pfd_main.c.

Referenced by main().


Function Documentation

int main ( int32_t  argc,
char **  argv 
)

Initialize pfd'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 1 upon failure

Definition at line 245 of file pfd_main.c.

References DNAME_PFD, and pfd_init().

static int pfd_init ( evContext  ctx  )  [static]

Callback for the first initialization of the RE-SDK Application

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

Definition at line 178 of file pfd_main.c.

References init_config(), init_connections(), init_nat(), init_packet_loops_config(), LOG, pfd_quit(), and pfd_shutdown().

Referenced by main().

static void pfd_quit ( int signo  __unused  )  [static]

This function quits the application does an exit

Definition at line 156 of file pfd_main.c.

References clear_config(), close_connections(), destroy_packet_loops_config(), LOG, stop_packet_loops(), and terminate_nat().

Referenced by pfd_init().

void pfd_shutdown ( void   ) 

Shutdown PFD. Calls exit(1) after cleaning up

Definition at line 220 of file pfd_main.c.

References clear_config(), close_connections(), destroy_packet_loops_config(), LOG, stop_packet_loops(), and terminate_nat().

Referenced by cpd_client_connection(), init_packet_loops(), ped_client_connection(), ped_client_message(), and pfd_init().


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:27:07 2010 for SDK Your Net Corporation Policy Manager Example: Packet Filtering Daemon (pfd) 1.0 by Doxygen 1.5.1