X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/5a4def747897c1c6ffbe465506d846c7c686d3e9..40e1caa2da06d6d4699d5dc3dafb3d34b81f23f7:/Projects/Webserver/Lib/TELNETServerApp.c diff --git a/Projects/Webserver/Lib/TELNETServerApp.c b/Projects/Webserver/Lib/TELNETServerApp.c index eed24c801..e94efe6eb 100644 --- a/Projects/Webserver/Lib/TELNETServerApp.c +++ b/Projects/Webserver/Lib/TELNETServerApp.c @@ -1,13 +1,13 @@ /* LUFA Library - Copyright (C) Dean Camera, 2010. + Copyright (C) Dean Camera, 2015. dean [at] fourwalledcubicle [dot] com - www.fourwalledcubicle.com + www.lufa-lib.org */ /* - Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) + Copyright 2015 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted @@ -18,7 +18,7 @@ advertising or publicity pertaining to distribution of the software without specific, written prior permission. - The author disclaim all warranties with regard to this + The author disclaims all warranties with regard to this software, including all implied warranties of merchantability and fitness. In no event shall the author be liable for any special, indirect or consequential damages or any damages @@ -28,8 +28,6 @@ this software. */ -#if defined(ENABLE_TELNET_SERVER) || defined(__DOXYGEN__) - /** \file * * TELNET Webserver Application. When connected to the uIP stack, @@ -39,6 +37,8 @@ #define INCLUDE_FROM_TELNETSERVERAPP_C #include "TELNETServerApp.h" +#if defined(ENABLE_TELNET_SERVER) || defined(__DOXYGEN__) + /** Welcome message to send to a TELNET client when a connection is first made. */ const char PROGMEM WelcomeHeader[] = "********************************************\r\n" "* LUFA uIP Webserver (TELNET) *\r\n" @@ -54,7 +54,7 @@ const char PROGMEM TELNETMenu[] = "\r\n" /** Header to print before the current connections are printed to the client */ const char PROGMEM CurrentConnectionsHeader[] = "\r\n* Current TCP Connections: *\r\n"; -/** Initialization function for the simple HTTP webserver. */ +/** Initialization function for the simple TELNET webserver. */ void TELNETServerApp_Init(void) { /* Listen on port 23 for TELNET connections from hosts */ @@ -146,7 +146,7 @@ static void TELNETServerApp_DisplayTCPConnections(void) if (CurrConnection->tcpstateflags != UIP_CLOSED) { /* Add the current connection's details to the out buffer */ - ResponseLen += sprintf_P(&AppData[ResponseLen], PSTR("%u) %02d.%02d.%02d.%02d (Local %u, Remote %u)\r\n"), + ResponseLen += sprintf_P(&AppData[ResponseLen], PSTR("%u) %d.%d.%d.%d (Local Port %u <=> Remote Port %u)\r\n"), ++ActiveConnCount, CurrConnection->ripaddr.u8[0], CurrConnection->ripaddr.u8[1],