OpenOCD
jsp_server.c File Reference
Include dependency graph for jsp_server.c:

Go to the source code of this file.

Functions

 COMMAND_HANDLER (handle_jsp_port_command)
 
static int jsp_connection_closed (struct connection *connection)
 
int jsp_init (struct or1k_jtag *jtag_info, char *banner)
 
static int jsp_input (struct connection *connection)
 
static int jsp_new_connection (struct connection *connection)
 
static int jsp_poll_read (void *priv)
 
int jsp_register_commands (struct command_context *cmd_ctx)
 
void jsp_service_free (void)
 
static int telnet_write (struct connection *connection, const void *data, int len)
 

Variables

static const struct command_registration jsp_command_handlers []
 
static char * jsp_port
 
static const struct service_driver jsp_service_driver
 
static const char *const negotiate
 A skim of the relevant RFCs suggests that if my application simply sent the characters IAC DONT LINEMODE (\377\376\042) as soon as the client connects, the client should be forced into character mode. More...
 

Function Documentation

◆ COMMAND_HANDLER()

COMMAND_HANDLER ( handle_jsp_port_command  )

Definition at line 205 of file jsp_server.c.

References CALL_COMMAND_HANDLER, and jsp_port.

◆ jsp_connection_closed()

static int jsp_connection_closed ( struct connection connection)
static

◆ jsp_init()

int jsp_init ( struct or1k_jtag jtag_info,
char *  banner 
)

◆ jsp_input()

◆ jsp_new_connection()

◆ jsp_poll_read()

static int jsp_poll_read ( void *  priv)
static

◆ jsp_register_commands()

int jsp_register_commands ( struct command_context cmd_ctx)

Definition at line 222 of file jsp_server.c.

References jsp_command_handlers, jsp_port, NULL, and register_commands().

Referenced by server_register_commands().

◆ jsp_service_free()

void jsp_service_free ( void  )

Definition at line 228 of file jsp_server.c.

References jsp_port.

Referenced by server_free().

◆ telnet_write()

static int telnet_write ( struct connection connection,
const void *  data,
int  len 
)
static

Variable Documentation

◆ jsp_command_handlers

const struct command_registration jsp_command_handlers[]
static
Initial value:
= {
{
.name = "jsp_port",
.handler = handle_jsp_port_command,
.mode = COMMAND_ANY,
.help = "Specify port on which to listen "
"for incoming JSP telnet connections.",
.usage = "[port_num]",
},
}
#define COMMAND_REGISTRATION_DONE
Use this as the last entry in an array of command_registration records.
Definition: command.h:253
@ COMMAND_ANY
Definition: command.h:42

Definition at line 205 of file jsp_server.c.

Referenced by jsp_register_commands().

◆ jsp_port

char* jsp_port
static

Definition at line 20 of file jsp_server.c.

Referenced by COMMAND_HANDLER(), jsp_init(), jsp_register_commands(), and jsp_service_free().

◆ jsp_service_driver

const struct service_driver jsp_service_driver
static
Initial value:
= {
.name = "jsp",
.new_connection_during_keep_alive_handler = NULL,
.new_connection_handler = jsp_new_connection,
.input_handler = jsp_input,
.connection_closed_handler = jsp_connection_closed,
.keep_client_alive_handler = NULL,
}
static int jsp_connection_closed(struct connection *connection)
Definition: jsp_server.c:174
static int jsp_new_connection(struct connection *connection)
Definition: jsp_server.c:69
static int jsp_input(struct connection *connection)
Definition: jsp_server.c:101
#define NULL
Definition: usb.h:16

Definition at line 174 of file jsp_server.c.

Referenced by jsp_init().

◆ negotiate

const char* const negotiate
static
Initial value:
=
"\xFF\xFB\x03"
"\xFF\xFB\x01"
"\xFF\xFD\x03"
"\xFF\xFE\x01"

A skim of the relevant RFCs suggests that if my application simply sent the characters IAC DONT LINEMODE (\377\376\042) as soon as the client connects, the client should be forced into character mode.

However it doesn't make any difference.

Definition at line 27 of file jsp_server.c.

Referenced by jsp_new_connection().