aboutsummaryrefslogtreecommitdiff
path: root/src/telnet.c
diff options
context:
space:
mode:
authorFranklin Wei <git@fwei.tk>2016-02-01 22:12:12 -0500
committerFranklin Wei <git@fwei.tk>2016-02-01 22:12:12 -0500
commita006044fbcb3355f0fa063720e7c41f4971894a0 (patch)
treed831c6f9a1cc5e9b9166b22be2194c4fd407dec7 /src/telnet.c
parent7e223238ec9d6711290b1718c44cfe8158477b71 (diff)
downloadnetcosm-a006044fbcb3355f0fa063720e7c41f4971894a0.zip
netcosm-a006044fbcb3355f0fa063720e7c41f4971894a0.tar.gz
netcosm-a006044fbcb3355f0fa063720e7c41f4971894a0.tar.bz2
netcosm-a006044fbcb3355f0fa063720e7c41f4971894a0.tar.xz
better command parsing
Diffstat (limited to 'src/telnet.c')
-rw-r--r--src/telnet.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/telnet.c b/src/telnet.c
index 743eb53..9932d84 100644
--- a/src/telnet.c
+++ b/src/telnet.c
@@ -16,8 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#define TELCMDS
+#define TELCMDS /* see <arpa/telnet.h> */
#define TELOPTS
+
#include "globals.h"
#include "client.h"
@@ -132,3 +133,13 @@ void telnet_init(void)
out_raw(init_seq, ARRAYLEN(init_seq));
}
+
+void telnet_clear_screen(void)
+{
+ /* ESC ] 2 J */
+ unsigned char clear_seq[] = { '\033',
+ ']',
+ '2',
+ 'J' };
+ out_raw(clear_seq, ARRAYLEN(clear_seq));
+}