ReactOS  0.4.11-dev-946-g431643b
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.

Referenced by TTelnetHandler::ParseIAC().

◆ TELOPT_PRINTD2

#define TELOPT_PRINTD2 (   x,
  n 
)    ;

Definition at line 60 of file ttelhndl.cpp.

Referenced by TTelnetHandler::ParseIAC().

Function Documentation

◆ naws_string()

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

Definition at line 139 of file ttelhndl.cpp.

Referenced by TTelnetHandler::ParseIAC().

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 }
GLint GLint GLsizei width
Definition: gl.h:1546
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLuint n
Definition: s_context.h:57
r l[0]
Definition: byte_order.h:167
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
#define SB
Definition: ftp_var.h:18
#define SE
Definition: ftp_var.h:28
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
#define IAC
Definition: ftp_var.h:13
#define TELOPT_NAWS
Definition: telnet.h:101

◆ telProcessNetwork()

DWORD WINAPI telProcessNetwork ( LPVOID  lpParameter)

Definition at line 479 of file ttelhndl.cpp.

Referenced by Telnet::Open().

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