#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 |
Contains the main entry point and registers the application as a MSP daemon
Definition in file reassembler_main.c.
int main | ( | int32_t | argc, | |
char ** | argv | |||
) |
Intialize application's environment
[in] | argc | Number of command line arguments |
[in] | argv | String array of command line arguments |
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
[in] | ctx | Newly created event context |
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().