Some code cleanup
This commit is contained in:
parent
c17e696566
commit
b934bb120c
11 changed files with 122 additions and 112 deletions
12
telnet.h
12
telnet.h
|
@ -1,15 +1,15 @@
|
|||
#pragma once
|
||||
|
||||
/* Handles details related to telnet protocol. */
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <common.h>
|
||||
|
||||
#define TELNET_MSG_SIZE_CHARMODE 9
|
||||
#define TELNET_MSG_LEN_CHARMODE 9
|
||||
|
||||
/**
|
||||
* Creates a telnet protocol message that tells client to go into "character"
|
||||
* mode. The passed data buffer must be big enough to hold the message payload
|
||||
* with the size defined by TELNET_MSG_SIZE_CHARMODE.
|
||||
* with the size defined by TELNET_MSG_LEN_CHARMODE.
|
||||
* Operates directly on the passed data buffer.
|
||||
*/
|
||||
void telnet_message_set_character_mode(char *databuf);
|
||||
|
@ -19,11 +19,11 @@ void telnet_message_set_character_mode(char *databuf);
|
|||
* client. Used to filter out the handshake commands of telnet protocol.
|
||||
* Operates directly on the passed data buffer and modifies the payload length.
|
||||
*/
|
||||
void telnet_handle_client_read(char *databuf, int *datalen);
|
||||
void telnet_filter_client_read(char *databuf, int *datalen);
|
||||
|
||||
/**
|
||||
* Handles special characters in the data buffer before sending them to the
|
||||
* client. Used to correctly echo the characters to the telnet client.
|
||||
* Operates directly on the passed data buffer and modifies the payload length.
|
||||
*/
|
||||
void telnet_handle_client_write(char *databuf, int *datalen);
|
||||
void telnet_filter_client_write(char *databuf, int *datalen);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue