Data Structures | Files | Defines | Functions

Telnet server
[Apps]

Collaboration diagram for Telnet server:

Data Structures

struct  ptentry
struct  telnetd_line
struct  telnetd_state

Files

file  shell.c
file  shell.h
file  telnetd.c
file  telnetd.h

Defines

#define SHELL_PROMPT   "uIP 1.0> "
#define ISO_nl   0x0a
#define ISO_cr   0x0d
#define STATE_NORMAL   0
#define STATE_IAC   1
#define STATE_WILL   2
#define STATE_WONT   3
#define STATE_DO   4
#define STATE_DONT   5
#define STATE_CLOSE   6
#define TELNET_IAC   255
#define TELNET_WILL   251
#define TELNET_WONT   252
#define TELNET_DO   253
#define TELNET_DONT   254
#define TELNETD_CONF_LINELEN   40
#define TELNETD_CONF_NUMLINES   16

Functions

void shell_init (void)
void shell_start (void)
void shell_input (char *cmd)
void shell_quit (char *)
void shell_output (char *str1, char *str2)
void shell_prompt (char *prompt)
 MEMB (linemem, struct telnetd_line, TELNETD_CONF_NUMLINES)
void telnetd_init (void)
void telnetd_appcall (void)

Detailed Description

The uIP telnet server


Define Documentation

#define ISO_cr   0x0d

Definition at line 56 of file telnetd.c.

#define ISO_nl   0x0a

Definition at line 55 of file telnetd.c.

#define SHELL_PROMPT   "uIP 1.0> "

Definition at line 57 of file shell.c.

#define STATE_CLOSE   6

Definition at line 69 of file telnetd.c.

#define STATE_DO   4

Definition at line 67 of file telnetd.c.

#define STATE_DONT   5

Definition at line 68 of file telnetd.c.

#define STATE_IAC   1

Definition at line 64 of file telnetd.c.

#define STATE_NORMAL   0

Definition at line 63 of file telnetd.c.

#define STATE_WILL   2

Definition at line 65 of file telnetd.c.

#define STATE_WONT   3

Definition at line 66 of file telnetd.c.

#define TELNET_DO   253

Definition at line 76 of file telnetd.c.

#define TELNET_DONT   254

Definition at line 77 of file telnetd.c.

#define TELNET_IAC   255

Definition at line 73 of file telnetd.c.

#define TELNET_WILL   251

Definition at line 74 of file telnetd.c.

#define TELNET_WONT   252

Definition at line 75 of file telnetd.c.

#define TELNETD_CONF_LINELEN   40

Definition at line 64 of file telnetd.h.

#define TELNETD_CONF_NUMLINES   16

Definition at line 67 of file telnetd.h.


Function Documentation

MEMB ( linemem  ,
struct telnetd_line  ,
TELNETD_CONF_NUMLINES   
)
void shell_init ( void   ) 

Initialize the shell.

Called when the shell front-end process starts. This function may be used to start listening for signals.

void shell_input ( char *  command  ) 

Process a shell command.

This function will be called by the shell GUI / telnet server whan a command has been entered that should be processed by the shell back-end.

Parameters:
command The command to be processed.
void shell_output ( char *  str1,
char *  str2 
)

Print a string to the shell window.

This function is implemented by the shell GUI / telnet server and can be called by the shell back-end to output a string in the shell window. The string is automatically appended with a linebreak.

Parameters:
str1 The first half of the string to be output.
str2 The second half of the string to be output.

Definition at line 126 of file telnetd.c.

void shell_prompt ( char *  prompt  ) 

Print a prompt to the shell window.

This function can be used by the shell back-end to print out a prompt to the shell window.

Parameters:
prompt The prompt to be printed.

Definition at line 114 of file telnetd.c.

void shell_quit ( char *  str  ) 

Quit the shell.

Definition at line 92 of file telnetd.c.

void shell_start ( void   ) 

Start the shell back-end.

Called by the front-end when a new shell is started.

void telnetd_appcall ( void   ) 
void telnetd_init ( void   ) 

Definition at line 150 of file telnetd.c.

Here is the call graph for this function: