1#define _CRT_SECURE_NO_WARNINGS
12#pragma comment(lib,"ws2_32.lib")
101 fprintf(stderr,
"Waiting for first client to connect. Press ctrl+c to stop connection.\n");
107 signal(SIGINT, SIG_DFL);
127 c->clientInfo = info;
136 char sendMSG[2 * BUFSIZ];
139 vsprintf(sendMSG, msg, l);
156 bool(*multResp)(
void*,
char* msg,
int len,
bool isMore),
196 i += (int)strlen(s) + 1;
static ANIM_HANDLE handle
void read_file_and_execute(FILE *fp)
void set_fileClientInfo(ptrCLIENTINFO info)
void execute_command(ptrCLIENTINFO info, ptrCOMMANDARRAY command, NETSIM_ID d)
void send_message(ptrCLIENTINFO info, char *msg,...)
bool init_cliInterpretor(ptrCLIINFO cliInfo)
static ptrCLIENTINFO lastClient
int fn_NetSim_CLI_HandleTimerEvent()
void CLI_SEND_MESSAGE(CLIHANDLE handle, char *msg,...)
void * add_new_file_client(char *inputFile)
CLIHANDLE FORM_CLI_HANDLE(ptrCOMMANDARRAY cmd, ptrCLIENTINFO info)
DWORD WINAPI command_recv_process(LPVOID lpParam)
void CLI_STOP_WAITING(CLIHANDLE handle)
int fnStopConnection(int sig)
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 * add_new_socket_client(SOCKET s, char *name)
void CLI_PRINT_MESSAGE(CLIHANDLE info, char *msg, int len)
static ptrCLIENTINFO firstClient
ptrCOMMANDARRAY CLI_GET_CMDARRAY_FROM_HANDLE(CLIHANDLE handle)
void add_to_string(ptrCLIENTINFO info, char *sendMsg, int len)
#define _declspec(dllexport)
This function is used to trigger the update.
NETSIM_ID fn_NetSim_Stack_GetDeviceId_asName(const char *name)
EXPORTED char * pszIOPath
EXPORTED struct stru_NetSim_EventDetails * pstruEventDetails
int(* fnHandleTimerEvent)()
union stru_clientInfo::client CLIENT
bool(* multResp)(void *, char *, int, bool)
struct stru_clientInfo * next
SOCKCLIENTINFO sockClient
STRINGCLIENTINFO stringClient
FILECLIENTINFO fileClient