Teonet library  0.4.7
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
teoterm.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include "ev_mgr.h"
#include "modules/net_cli.h"

Macros

#define TTERM_VERSION   VERSION
 

Functions

int cmd_user (struct cli_def *cli, const char *command, char *argv[], int argc)
 Show user command. More...
 
void event_cb (ksnetEvMgrClass *ke, ksnetEvMgrEvents event, void *data, size_t data_len, void *user_data)
 Teonet Events callback. More...
 
int main (int argc, char **argv)
 Main application function. More...
 

Detailed Description

Macro Definition Documentation

#define TTERM_VERSION   VERSION
Examples:
teoterm.c.

Referenced by main().

Function Documentation

int cmd_user ( struct cli_def cli,
const char *  command,
char *  argv[],
int  argc 
)

Show user command.

Parameters
cliThe handle of the cli structure
commandThe entire command which was entered. This is after command expansion
argvThe list of arguments entered
argcThe number of arguments entered
Returns
Examples:
teoterm.c.

References CLI_OK, and cli_print().

Referenced by event_cb().

void event_cb ( ksnetEvMgrClass ke,
ksnetEvMgrEvents  event,
void *  data,
size_t  data_len,
void *  user_data 
)

Teonet Events callback.

Parameters
ke
event
data
data_len
user_data
Examples:
teoterm.c.

References ksnetEvMgrClass::cli, cli_register_command(), cmd_user(), EV_K_TERM_STARTED, MODE_EXEC, and PRIVILEGE_UNPRIVILEGED.

Referenced by main().

int main ( int  argc,
char **  argv 
)

Main application function.

Parameters
argcNumber of parameters
argvParameters array
Returns
EXIT_SUCCESS
Examples:
teoterm.c.

References event_cb(), ke, ksnetEvMgrInit(), ksnetEvMgrRun(), READ_CONFIGURATION, READ_OPTIONS, and TTERM_VERSION.