ReactOS 0.4.15-dev-5673-g06b25bc
ttelhndl.cpp File Reference
#include "precomp.h"
#include "telnet.h"
Include dependency graph for ttelhndl.cpp:

Go to the source code of this file.

Macros

#define TELOPT_PRINTD(x)   ;
 
#define TELOPT_PRINTD2(x, n)   ;
 
#define LASTTERM   4
 

Functions

int naws_string (char *buf, int width, int height)
 
DWORD WINAPI telProcessNetwork (LPVOID lpParameter)
 

Macro Definition Documentation

◆ LASTTERM

#define LASTTERM   4

◆ TELOPT_PRINTD

#define TELOPT_PRINTD (   x)    ;

Definition at line 59 of file ttelhndl.cpp.

◆ TELOPT_PRINTD2

#define TELOPT_PRINTD2 (   x,
  n 
)    ;

Definition at line 60 of file ttelhndl.cpp.

Function Documentation

◆ naws_string()

int naws_string ( char buf,
int  width,
int  height 
)

Definition at line 139 of file ttelhndl.cpp.

139 {
140 int l = 0;
141 unsigned char *buf = (unsigned char *)b;
142
143 union {
144 char szResponse[2];
145 int n;
146 };
147
148 buf[l++] = IAC;
149 buf[l++] = SB;
150 buf[l++] = TELOPT_NAWS;
151
152 n = width;
153 buf[l] = szResponse[1];
154 if(buf[l-1] == IAC) buf[l++] = IAC;
155 buf[l++] = szResponse[0];
156 if(buf[l-1] == IAC) buf[l++] = IAC;
157
158 n = height;
159 buf[l++] = szResponse[1];
160 if(buf[l-1] == IAC) buf[l++] = IAC;
161 buf[l++] = szResponse[0];
162 if(buf[l-1] == IAC) buf[l++] = IAC;
163
164 buf[l++] = IAC;
165 buf[l++] = SE;
166
167 return l;
168}
r l[0]
Definition: byte_order.h:167
#define SE
Definition: ftp_var.h:28
#define SB
Definition: ftp_var.h:18
#define IAC
Definition: ftp_var.h:13
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
GLint GLint GLsizei width
Definition: gl.h:1546
GLdouble n
Definition: glext.h:7729
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define TELOPT_NAWS
Definition: telnet.h:101

Referenced by TTelnetHandler::ParseIAC().

◆ telProcessNetwork()

DWORD WINAPI telProcessNetwork ( LPVOID  lpParameter)

Definition at line 479 of file ttelhndl.cpp.

479 {
480 TelThreadParams *pParams = (TelThreadParams *)lpParameter;
481 return pParams->TelHandler.Go(&pParams->p);
482}
DWORD Go(LPVOID pvParams)
Definition: ttelhndl.cpp:485
TTelnetHandler & TelHandler
Definition: tparams.h:20
NetParams p
Definition: tparams.h:19

Referenced by Telnet::Open().