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

Macros

#define TTUN_VERSION   VERSION
 
#define TUN_PEER   "teotun"
 
#define TUN_PEER_PORT   22
 
#define TUN_PORT   7522
 

Functions

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 Teotun application function. More...
 

Detailed Description

Macro Definition Documentation

#define TTUN_VERSION   VERSION
Examples:
teotun.c.

Referenced by main().

#define TUN_PEER   "teotun"
Examples:
teotun.c.

Referenced by event_cb().

#define TUN_PEER_PORT   22
Examples:
teotun.c.

Referenced by event_cb().

#define TUN_PORT   7522
Examples:
teotun.c.

Referenced by event_cb().

Function Documentation

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:
teotun.c.

References EV_K_STARTED, ksnTunCreate(), ksnetEvMgrClass::ktun, TUN_PEER, TUN_PEER_PORT, and TUN_PORT.

Referenced by main().

int main ( int  argc,
char **  argv 
)

Main Teotun application function.

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

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