Telnet server. More...
#include <BoardSupport/inc/stdtypes.h>
#include <stdlib.h>
#include <stdio.h>
#include <stddef.h>
#include <inttypes.h>
#include <time.h>
#include <string.h>
#include <Libs/NETlib/net.h>
#include <BoardSupport/inc/BoardSpecific.h>
#include <Common/Common.h>
#include <Common/uartio.h>
#include <Common/timer.h>
#include <Common/CPrintf.h>
#include "telnetio.h"
Functions | |
int | TelnetPrintf (const char *format,...) |
Custom Telnet printf function. More... | |
void | TelnetWriteStr (const char *buffer) |
append a zero terminated string to telnet write buffer More... | |
int32_t | TelnetWriteChar (char c) |
append a char to telnet write buffer More... | |
void | Telnet_send_option (SOCKET *tcp_server, unsigned char option, unsigned char c) |
send a Telnet option More... | |
int | Telnet_check_message (telnet_server_type *telnet) |
Parse user commands. More... | |
uint32_t | Telnet_initialize_server (user_type *user, char *hello_msg, int16_t(*InputParser)(T_ComDevice *, char), T_Handle CmdTab) |
initialize Telnet Server More... | |
telnet_return_type * | Telnet_server (void) |
handle Telnet Server More... | |
Variables | |
unsigned char | telnet_option_msg [] = { TELNET_IAC, TELNET_WILL, 1, 0 } |
uint32_t | telnet_active = 0 |
static telnet_server_type | telnet |
_ _ _ __| | ___(_) ____ _ __ | |_ / _` | / __| |/ _` | '_ \| __| | (_| | _ \__ \ | (_| | | | | |_ \__,_|(_) ___/_|\__, |_| |_|\__| Signalprocessing |___/ Technology
This module provides a telnet server on port 23. Each received charcter is passed to a user defined callback function for further processing (e.g. command processing). The output functions TelnetPrintf(), TelnetWriteStr()and TelnetWriteChar() use a local data buffer for all characters that should be sent over the active telnet connection. This buffer is polled for new data every 100ms (TELNET_OUTPUT_SCAN_INTERVAL). If you observe BUFFEROVERFLOW_ERROR while you try to send out multiple messages, then either try to decrease TELNET_OUTPUT_SCAN_INTERVAL or increase the used buffer (TELNET_OUTPUT_BUFFER_SIZE).
void TelnetWriteStr | ( | const char * | buffer | ) |
buffer | - buffer to send |
unsigned char telnet_option_msg[] = { TELNET_IAC, TELNET_WILL, 1, 0 } |
|
static |