OpenOCD
|
Go to the source code of this file.
Macros | |
#define | CTRL(c) (c - '@') |
#define | TELNET_HISTORY ".openocd_history" |
Variables | |
static char * | negotiate |
static const struct command_registration | telnet_command_handlers [] |
static char * | telnet_port |
static const struct service_driver | telnet_service_driver |
static const struct command_registration | telnet_subcommand_handlers [] |
#define CTRL | ( | c | ) | (c - '@') |
Definition at line 31 of file telnet_server.c.
#define TELNET_HISTORY ".openocd_history" |
Definition at line 32 of file telnet_server.c.
COMMAND_HANDLER | ( | handle_exit_command | ) |
Definition at line 975 of file telnet_server.c.
References ERROR_COMMAND_CLOSE_CONNECTION.
COMMAND_HANDLER | ( | handle_telnet_port_command | ) |
Definition at line 970 of file telnet_server.c.
References CALL_COMMAND_HANDLER, and telnet_port.
|
static |
Definition at line 563 of file telnet_server.c.
References alloc_printf(), cmd, connection::cmd_ctx, COMMAND_CONFIG, command_context::interp, jimcmd_is_oocd_command(), jimcmd_privdata(), lh(), telnet_connection::line, telnet_connection::line_cursor, telnet_connection::line_size, list_add_tail(), list_empty(), list_for_each_entry, list_for_each_entry_safe, LIST_HEAD, list_is_singular(), LOG_ERROR, name, NULL, connection::priv, telnet_bell(), telnet_insert(), telnet_prompt(), and telnet_write().
Referenced by telnet_input().
|
static |
Definition at line 52 of file telnet_server.c.
References telnet_write().
Referenced by telnet_auto_complete(), and telnet_insert().
|
inlinestatic |
Definition at line 388 of file telnet_server.c.
References telnet_connection::line_size, connection::priv, and TELNET_LINE_MAX_SIZE.
Referenced by telnet_insert().
|
static |
Definition at line 252 of file telnet_server.c.
References telnet_connection::line, telnet_connection::line_cursor, telnet_connection::line_size, and telnet_write().
Referenced by telnet_history_go(), and telnet_input().
|
static |
Definition at line 906 of file telnet_server.c.
References connection::cmd_ctx, delete_debug_msg_receiver(), ERROR_OK, telnet_connection::history, log_remove_callback(), NULL, connection::priv, telnet_connection::prompt, TELNET_LINE_HISTORY_SIZE, telnet_log_callback(), and telnet_save_history().
|
static |
Definition at line 534 of file telnet_server.c.
References telnet_connection::line, telnet_connection::line_cursor, telnet_connection::line_size, connection::priv, and telnet_write().
Referenced by telnet_input().
|
static |
Definition at line 432 of file telnet_server.c.
References telnet_connection::line, telnet_connection::line_cursor, telnet_connection::line_size, connection::priv, and telnet_write().
Referenced by telnet_input().
|
static |
Definition at line 489 of file telnet_server.c.
References connection::cmd_ctx, command_run_line(), ERROR_COMMAND_CLOSE_CONNECTION, ERROR_OK, ERROR_SERVER_REMOTE_CLOSED, telnet_connection::line, telnet_connection::line_cursor, telnet_connection::line_size, connection::priv, telnet_connection::prompt_visible, telnet_history_add(), telnet_history_print(), telnet_prompt(), telnet_save_history(), and telnet_write().
Referenced by telnet_input().
|
static |
Definition at line 303 of file telnet_server.c.
References telnet_connection::current_history, telnet_connection::history, telnet_connection::line, telnet_connection::next_history, connection::priv, and TELNET_LINE_HISTORY_SIZE.
Referenced by telnet_exec_line().
|
static |
Definition at line 294 of file telnet_server.c.
References telnet_connection::current_history, telnet_connection::next_history, connection::priv, telnet_history_go(), and TELNET_LINE_HISTORY_SIZE.
Referenced by telnet_input().
|
static |
Definition at line 269 of file telnet_server.c.
References telnet_connection::current_history, telnet_connection::history, telnet_connection::line, telnet_connection::line_cursor, telnet_connection::line_size, connection::priv, telnet_connection::state, telnet_clear_line(), TELNET_STATE_DATA, and telnet_write().
Referenced by telnet_history_down(), and telnet_history_up().
|
static |
Definition at line 329 of file telnet_server.c.
References telnet_connection::history, telnet_connection::line, telnet_connection::line_cursor, telnet_connection::line_size, telnet_connection::next_history, connection::priv, TELNET_LINE_HISTORY_SIZE, telnet_prompt(), and telnet_write().
Referenced by telnet_exec_line().
|
static |
Definition at line 284 of file telnet_server.c.
References telnet_connection::current_history, connection::priv, telnet_history_go(), and TELNET_LINE_HISTORY_SIZE.
Referenced by telnet_input().
int telnet_init | ( | char * | banner | ) |
Definition at line 942 of file telnet_server.c.
References add_service(), telnet_service::banner, CONNECTION_LIMIT_UNLIMITED, ERROR_FAIL, ERROR_OK, LOG_ERROR, LOG_INFO, telnet_port, and telnet_service_driver.
Referenced by server_init().
|
static |
Definition at line 750 of file telnet_server.c.
References buffer, connection_read(), CTRL, ERROR_FAIL, ERROR_OK, ERROR_SERVER_REMOTE_CLOSED, telnet_connection::last_escape, telnet_connection::line, telnet_connection::line_cursor, telnet_connection::line_size, LOG_DEBUG, LOG_ERROR, connection::priv, telnet_connection::state, telnet_auto_complete(), TELNET_BUFFER_SIZE, telnet_clear_line(), telnet_cut_line_to_end(), telnet_delete_character(), telnet_exec_line(), telnet_history_down(), telnet_history_up(), telnet_insert(), telnet_interrupt(), telnet_move_cursor(), telnet_remove_character(), TELNET_STATE_DATA, TELNET_STATE_DO, TELNET_STATE_DONT, TELNET_STATE_ESCAPE, TELNET_STATE_IAC, TELNET_STATE_SB, TELNET_STATE_SE, TELNET_STATE_WILL, and TELNET_STATE_WONT.
|
static |
Definition at line 401 of file telnet_server.c.
References telnet_connection::line, telnet_connection::line_cursor, telnet_connection::line_size, connection::priv, telnet_bell(), telnet_can_insert(), and telnet_write().
Referenced by telnet_auto_complete(), and telnet_input().
|
static |
Definition at line 551 of file telnet_server.c.
References telnet_connection::line_cursor, telnet_connection::line_size, connection::priv, telnet_move_cursor(), telnet_prompt(), and telnet_write().
Referenced by telnet_input().
|
static |
Definition at line 134 of file telnet_server.c.
References buffer, telnet_connection::current_history, get_home_dir(), telnet_connection::history, LOG_INFO, telnet_connection::next_history, TELNET_BUFFER_SIZE, TELNET_HISTORY, and TELNET_LINE_HISTORY_SIZE.
Referenced by telnet_new_connection().
|
static |
Definition at line 96 of file telnet_server.c.
References telnet_connection::line, telnet_connection::line_cursor, telnet_connection::line_size, MIN, priv, connection::priv, telnet_connection::prompt, telnet_connection::prompt_visible, telnet_outputline(), telnet_prompt(), and telnet_write().
Referenced by telnet_connection_closed(), and telnet_new_connection().
|
static |
Definition at line 359 of file telnet_server.c.
References telnet_connection::line, telnet_connection::line_cursor, telnet_connection::line_size, MIN, connection::priv, and telnet_write().
Referenced by telnet_input(), and telnet_interrupt().
|
static |
Definition at line 210 of file telnet_server.c.
References telnet_service::banner, connection::cmd_ctx, command_set_output_handler(), ERROR_FAIL, ERROR_OK, log_add_callback(), LOG_ERROR, negotiate, connection::priv, service::priv, telnet_connection::prompt, telnet_connection::prompt_visible, connection::service, telnet_connection::state, telnet_load_history(), telnet_log_callback(), telnet_output(), telnet_prompt(), TELNET_STATE_DATA, and telnet_write().
|
static |
Definition at line 89 of file telnet_server.c.
References connection::cmd_ctx, command_context::output_handler_priv, and telnet_outputline().
Referenced by telnet_new_connection().
|
static |
Definition at line 65 of file telnet_server.c.
References ERROR_OK, telnet_connection::line, and telnet_write().
Referenced by telnet_log_callback(), and telnet_output().
|
static |
Definition at line 58 of file telnet_server.c.
References connection::priv, telnet_connection::prompt, and telnet_write().
Referenced by telnet_auto_complete(), telnet_exec_line(), telnet_history_print(), telnet_interrupt(), telnet_log_callback(), and telnet_new_connection().
int telnet_register_commands | ( | struct command_context * | cmd_ctx | ) |
Definition at line 1011 of file telnet_server.c.
References NULL, register_commands(), telnet_command_handlers, and telnet_port.
Referenced by server_register_commands().
|
static |
Definition at line 465 of file telnet_server.c.
References telnet_connection::line, telnet_connection::line_cursor, telnet_connection::line_size, connection::priv, and telnet_write().
Referenced by telnet_input().
|
static |
Definition at line 170 of file telnet_server.c.
References telnet_connection::current_history, get_home_dir(), telnet_connection::history, LOG_INFO, TELNET_HISTORY, and TELNET_LINE_HISTORY_SIZE.
Referenced by telnet_connection_closed(), and telnet_exec_line().
void telnet_service_free | ( | void | ) |
Definition at line 1017 of file telnet_server.c.
References telnet_port.
Referenced by server_free().
|
static |
Definition at line 38 of file telnet_server.c.
References telnet_connection::closed, connection_write(), ERROR_OK, ERROR_SERVER_REMOTE_CLOSED, and connection::priv.
Referenced by telnet_auto_complete(), telnet_bell(), telnet_clear_line(), telnet_cut_line_to_end(), telnet_delete_character(), telnet_exec_line(), telnet_history_go(), telnet_history_print(), telnet_insert(), telnet_interrupt(), telnet_log_callback(), telnet_move_cursor(), telnet_new_connection(), telnet_outputline(), telnet_prompt(), and telnet_remove_character().
|
static |
Definition at line 25 of file telnet_server.c.
Referenced by telnet_new_connection().
|
static |
Definition at line 975 of file telnet_server.c.
Referenced by telnet_register_commands().
|
static |
Definition at line 23 of file telnet_server.c.
Referenced by COMMAND_HANDLER(), telnet_init(), telnet_register_commands(), and telnet_service_free().
|
static |
Definition at line 906 of file telnet_server.c.
Referenced by telnet_init().
|
static |
Definition at line 975 of file telnet_server.c.