reassembler_main.c File Reference

Contains main entry point. More...

#include <signal.h>
#include <stdbool.h>
#include <stdlib.h>
#include <unistd.h>
#include <getopt.h>
#include <isc/eventlib.h>
#include <jnx/aux_types.h>
#include <jnx/bits.h>
#include <jnx/mpsdk.h>
#include <sys/jnx/jbuf.h>
#include "reassembler_logging.h"
#include "reassembler_packet.h"

Go to the source code of this file.

Defines

#define DNAME_REASSEMBLER   "reassembler"
 The daemon name.
#define MIN_MTU   576
 Min allowed MTU of any IP net.
#define MAX_MTU   JBUF_MAX_SEND_LEN
 Max allowed MTU.

Functions

static void reassembler_quit (int signo __unused)
static int reassembler_init (evContext ctx)
static int cmd_opt_hdlr (char c, char *args)
int main (int32_t argc, char **argv)

Variables

uint16_t reassembler_mtu
 the configured MTU
static bool invalid_mtu
 if true during init issue a warning declaring MTU
static evContext mainctx
 the event context of this main thread


Detailed Description

Contains main entry point.

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

Definition in file reassembler_main.c.


Function Documentation

int main ( int32_t  argc,
char **  argv 
)

Intialize application'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 263 of file reassembler_main.c.

References cmd_opt_hdlr(), DNAME_REASSEMBLER, and reassembler_init().

static int reassembler_init ( evContext  ctx  )  [static]

Callback for the first initialization of the Services-SDK Application

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

Definition at line 197 of file reassembler_main.c.

References init_packet_loops(), invalid_mtu, mainctx, MAX_MTU, MIN_MTU, reassembler_mtu, and reassembler_quit().

Referenced by main().

static void reassembler_quit ( int signo  __unused  )  [static]

This function quits the application does an exit

Definition at line 178 of file reassembler_main.c.

References mainctx, and stop_packet_loops().

Referenced by reassembler_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 IP Fragment Reassembly Example: reassembler 1.0 by Doxygen 1.5.1