Commit Graph

21 Commits

Author SHA1 Message Date
Adam Dunkels
0b882cd516 Telnetd improvement: allow specifying a maximum silence time and kill the connection after that time. This is to avoid the telnet connection getting stuck forever if the connecting host reboots. 2013-05-25 12:10:26 +02:00
Adam Dunkels
944537fccf Removed all old RCS tags in the Contiki source tree. Those RCS tags are not used any more, as we are now using git to manage the Contiki source tree 2012-10-26 15:54:49 +02:00
Nicholas J Humfrey
efab964451 Converted u8_t to uint8_t and u16_t to uint16_t in the apps directory. 2012-02-21 08:33:25 -05:00
Oliver Schmidt
c48f8fd39a Keep gcc 4.x from complaining about 'lvalue required as increment operand'. 2011-05-22 23:08:40 +02:00
Oliver Schmidt
d4f49fa204 Added explicit rejection of multiple connections.
Although a simple solution the recently introduced approach to just not listen to incoming connetions if there's already one has the downside that one doesn't know if a connection fails because the server is down or becuase there's a connection.
Therefore now connections are always accepted but after sending a message to the user and waiting a few seconds they are closed.
The appstate is used used in a somewhat unusual way here: The one and only "active" connection has an appstate of 0. For all other connections the appstate is initially set to 1. Then it is increased on every uIP poll until it reaches 10, which triggers the connection close. This somewhat hacky approach allows to keep track of the rejected sessions without any additional state variables and/or timers.
2011-05-21 21:03:04 +02:00
Oliver Schmidt
d862e9dcfb Allow only one Telnet connection at a time.
As the session state management of Telnet server is a single static variable allowing more than one connection leads to inconsistencies.
2011-04-17 12:46:42 +02:00
Oliver Schmidt
831312e311 Some Telnet server enhancements:
- PETSCII sending support
- Option to customize shell prompt and banner
- Stop all running commands on shell close
- New 'exit' and 'quit' commands to close shell
2011-04-16 21:10:22 +02:00
adamdunkels
5585d72c86 A simple but substantial change: uIP used the htons()/HTONS() macro
functions for converting between host and network byte order. These
names are the de facto standard names for this functionality because
of the original BSD TCP/IP implementation. But they cause problems for
uIP/Contiki: some platforms define these names themselves (Mac OS,
most notably), causing compilation problems for Contiki on those
platforms.

This commit changes all htons to uip_htons instead. Same goes for
htonl, ntohs, and ntohl. All-caps versions as well.
2010-10-19 18:29:03 +00:00
adamdunkels
7b87c2f5dc Bugfix: the code tried to shave off the ending newline character even if it did not exist 2008-10-31 18:07:13 +00:00
oliverschmidt
aa7ba44fb1 Avoided compiler warning. 2008-02-28 23:59:05 +00:00
oliverschmidt
2ce444c175 Made use of shell_quit(). 2008-02-28 23:50:02 +00:00
adamdunkels
814558b1fe Rewrote the telnet server to buffer the output in a single, large buffer rather than as individual lines. This both makes output faster and makes it possible to buffer more outgoing data. 2008-02-24 20:43:28 +00:00
oliverschmidt
f244bdbf2d Accomodate for the now more complex shell output. 2008-02-09 18:51:56 +00:00
oliverschmidt
b1c748c137 Adjusted telnet server to the new shell logic. 2008-02-09 17:15:58 +00:00
oliverschmidt
062e2a1ce4 Removed compiler warning. 2007-11-17 20:13:54 +00:00
ksb
3bb9fda749 Avoid warning about using a cast as a lvalue. 2007-08-22 10:59:56 +00:00
oliverschmidt
6e5193f303 Added integration of shell event handler into shell server. This is obligatory for the 'ls' command to succeed. 2007-04-13 22:47:43 +00:00
oliverschmidt
94bd0de72d Fixed incomplete integration of shell server log gui. 2007-04-13 22:15:52 +00:00
oliverschmidt
079a4a1b54 Avoid compiler warnings. 2007-04-13 22:02:28 +00:00
oliverschmidt
7aae71934d Providing a dummy program_handler_load() made made the telnet server work without program-handler but on the other hand incompatible with an exsistng program handler :-(
Therefore I replaced that hack with a clean CONF macro, which by the way really removes the run() and exec() functionality instead of just implementing it empty.
2007-04-13 21:04:52 +00:00
adamdunkels
c9e808d638 Import of the contiki-2.x development code from the SICS internal CVS server 2006-06-17 22:41:10 +00:00