1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 /***************************************************************************
4 * Copyright (C) 2005 by Dominic Rath *
5 * Dominic.Rath@gmx.de *
7 * Copyright (C) 2007,2008 Øyvind Harboe *
8 * oyvind.harboe@zylin.com *
10 * Copyright (C) 2008 by Spencer Oliver *
11 * spen@spen-soft.co.uk *
12 ***************************************************************************/
14 #ifndef OPENOCD_SERVER_TELNET_SERVER_H
15 #define OPENOCD_SERVER_TELNET_SERVER_H
17 #include <server/server.h>
19 #define TELNET_BUFFER_SIZE (10*1024)
21 #define TELNET_LINE_HISTORY_SIZE (128)
22 #define TELNET_LINE_MAX_SIZE (10*256)
36 struct telnet_connection
{
39 enum telnet_states state
;
40 char line
[TELNET_LINE_MAX_SIZE
];
44 char *history
[TELNET_LINE_HISTORY_SIZE
];
46 size_t current_history
;
50 struct telnet_service
{
54 int telnet_init(char *banner
);
55 int telnet_register_commands(struct command_context
*command_context
);
56 void telnet_service_free(void);
58 #endif /* OPENOCD_SERVER_TELNET_SERVER_H */