NetSim Source Code Help
Loading...
Searching...
No Matches
CLIInterpretor.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <Ws2tcpip.h>
#include <windows.h>
#include <stdbool.h>
#include <signal.h>
#include "main.h"
#include "CLI.h"
#include "CLIInterface.h"
Include dependency graph for CLIInterpretor.c:

Go to the source code of this file.

Macros

#define _CRT_SECURE_NO_WARNINGS
 

Functions

void init_socket ()
 
DWORD WINAPI command_recv_process (LPVOID lpParam)
 
void * add_new_socket_client (SOCKET s, char *name)
 
void * add_new_file_client (char *inputFile)
 
int fnStopConnection (int sig)
 
bool init_cliInterpretor (ptrCLIINFO cliInfo)
 
ptrCOMMANDARRAY CLI_GET_CMDARRAY_FROM_HANDLE (CLIHANDLE handle)
 
CLIHANDLE FORM_CLI_HANDLE (ptrCOMMANDARRAY cmd, ptrCLIENTINFO info)
 
void CLI_SEND_MESSAGE (CLIHANDLE handle, char *msg,...)
 
void CLI_STOP_WAITING (CLIHANDLE handle)
 
char * CLI_EXECUTE_COMMAND (ptrCOMMANDARRAY cmd, NETSIM_ID d, int *len, bool(*multResp)(void *, char *msg, int len, bool isMore), void *arg, bool *isMore)
 
void CLI_PRINT_MESSAGE (CLIHANDLE info, char *msg, int len)
 
int fn_NetSim_CLI_HandleTimerEvent ()
 
void add_to_string (ptrCLIENTINFO info, char *sendMsg, int len)
 

Variables

static ptrCLIENTINFO firstClient = NULL
 
static ptrCLIENTINFO lastClient = NULL
 
static bool iswait = true
 

Macro Definition Documentation

◆ _CRT_SECURE_NO_WARNINGS

#define _CRT_SECURE_NO_WARNINGS

Definition at line 1 of file CLIInterpretor.c.

Function Documentation

◆ add_new_file_client()

void * add_new_file_client ( char *  inputFile)

Definition at line 45 of file CLIInterpretor.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_new_socket_client()

void * add_new_socket_client ( SOCKET  s,
char *  name 
)

Definition at line 19 of file CLIInterpretor.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_to_string()

void add_to_string ( ptrCLIENTINFO  info,
char *  sendMsg,
int  len 
)

Definition at line 210 of file CLIInterpretor.c.

Here is the caller graph for this function:

◆ CLI_EXECUTE_COMMAND()

char * CLI_EXECUTE_COMMAND ( ptrCOMMANDARRAY  cmd,
NETSIM_ID  d,
int *  len,
bool(*)(void *, char *msg, int len, bool isMore)  multResp,
void *  arg,
bool *  isMore 
)

Definition at line 153 of file CLIInterpretor.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CLI_GET_CMDARRAY_FROM_HANDLE()

ptrCOMMANDARRAY CLI_GET_CMDARRAY_FROM_HANDLE ( CLIHANDLE  handle)

Definition at line 117 of file CLIInterpretor.c.

Here is the caller graph for this function:

◆ CLI_PRINT_MESSAGE()

void CLI_PRINT_MESSAGE ( CLIHANDLE  info,
char *  msg,
int  len 
)

Definition at line 182 of file CLIInterpretor.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CLI_SEND_MESSAGE()

void CLI_SEND_MESSAGE ( CLIHANDLE  handle,
char *  msg,
  ... 
)

Definition at line 132 of file CLIInterpretor.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CLI_STOP_WAITING()

void CLI_STOP_WAITING ( CLIHANDLE  handle)

Definition at line 143 of file CLIInterpretor.c.

Here is the caller graph for this function:

◆ command_recv_process()

DWORD WINAPI command_recv_process ( LPVOID  lpParam)

Definition at line 130 of file Socket.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fn_NetSim_CLI_HandleTimerEvent()

int fn_NetSim_CLI_HandleTimerEvent ( )

Definition at line 203 of file CLIInterpretor.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fnStopConnection()

int fnStopConnection ( int  sig)

Definition at line 88 of file CLIInterpretor.c.

Here is the caller graph for this function:

◆ FORM_CLI_HANDLE()

CLIHANDLE FORM_CLI_HANDLE ( ptrCOMMANDARRAY  cmd,
ptrCLIENTINFO  info 
)

Definition at line 123 of file CLIInterpretor.c.

Here is the caller graph for this function:

◆ init_cliInterpretor()

bool init_cliInterpretor ( ptrCLIINFO  cliInfo)

Definition at line 97 of file CLIInterpretor.c.

Here is the call graph for this function:

◆ init_socket()

void init_socket ( )

Definition at line 116 of file Socket.c.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ firstClient

ptrCLIENTINFO firstClient = NULL
static

Definition at line 17 of file CLIInterpretor.c.

◆ iswait

bool iswait = true
static

Definition at line 87 of file CLIInterpretor.c.

◆ lastClient

ptrCLIENTINFO lastClient = NULL
static

Definition at line 18 of file CLIInterpretor.c.