Classes | Defines | Enumerations | Functions | Variables
telnet.c File Reference
#include "curl_setup.h"
#include "urldata.h"
#include <curl/curl.h>
#include "transfer.h"
#include "sendf.h"
#include "telnet.h"
#include "connect.h"
#include "progress.h"
#include "system_win32.h"
#include "arpa_telnet.h"
#include "select.h"
#include "strcase.h"
#include "warnless.h"
#include "curl_printf.h"
#include "curl_memory.h"
#include "memdebug.h"
Include dependency graph for telnet.c:

Go to the source code of this file.

Classes

struct  TELNET

Defines

#define bufferflush()   startskipping()
#define CURL_EMPTY   0
#define CURL_NO   0
#define CURL_OPPOSITE   1
#define CURL_SB_ACCUM(x, c)
#define CURL_SB_CLEAR(x)   x->subpointer = x->subbuffer
#define CURL_SB_EOF(x)   (x->subpointer >= x->subend)
#define CURL_SB_GET(x)   ((*x->subpointer++)&0xff)
#define CURL_SB_LEN(x)   (x->subend - x->subpointer)
#define CURL_SB_PEEK(x)   ((*x->subpointer)&0xff)
#define CURL_SB_TERM(x)
#define CURL_WANTNO   3
#define CURL_WANTYES   2
#define CURL_YES   1
#define startskipping()
#define SUBBUFSIZE   512
#define TELCMDS
#define TELOPTS
#define writebyte()

Enumerations

enum  TelnetReceive {
  CURL_TS_DATA = 0, CURL_TS_IAC, CURL_TS_WILL, CURL_TS_WONT,
  CURL_TS_DO, CURL_TS_DONT, CURL_TS_CR, CURL_TS_SB,
  CURL_TS_SE
}

Functions

static CURLcode check_telnet_options (struct connectdata *conn)
static CURLcode init_telnet (struct connectdata *conn)
static void negotiate (struct connectdata *)
static void printoption (struct Curl_easy *data, const char *direction, int cmd, int option)
static void printsub (struct Curl_easy *data, int direction, unsigned char *pointer, size_t length)
static void rec_do (struct connectdata *conn, int option)
static void rec_dont (struct connectdata *conn, int option)
static void rec_will (struct connectdata *conn, int option)
static void rec_wont (struct connectdata *conn, int option)
static void send_negotiation (struct connectdata *, int cmd, int option)
static CURLcode send_telnet_data (struct connectdata *conn, char *buffer, ssize_t nread)
static void sendsuboption (struct connectdata *conn, int option)
static void set_local_option (struct connectdata *, int cmd, int option)
static void set_remote_option (struct connectdata *, int cmd, int option)
static void suboption (struct connectdata *)
static CURLcode telnet_do (struct connectdata *conn, bool *done)
static CURLcode telnet_done (struct connectdata *conn, CURLcode, bool premature)
static CURLcode telrcv (struct connectdata *, const unsigned char *inbuf, ssize_t count)

Variables

struct Curl_handler Curl_handler_telnet

Define Documentation

#define bufferflush ( )    startskipping()
#define CURL_EMPTY   0

Definition at line 131 of file telnet.c.

#define CURL_NO   0

Definition at line 126 of file telnet.c.

#define CURL_OPPOSITE   1

Definition at line 132 of file telnet.c.

#define CURL_SB_ACCUM (   x,
 
)
Value:
do {                                                       \
    if(x->subpointer < (x->subbuffer+sizeof x->subbuffer))   \
      *x->subpointer++ = (c);                                \
  } WHILE_FALSE

Definition at line 77 of file telnet.c.

#define CURL_SB_CLEAR (   x)    x->subpointer = x->subbuffer

Definition at line 71 of file telnet.c.

#define CURL_SB_EOF (   x)    (x->subpointer >= x->subend)

Definition at line 85 of file telnet.c.

#define CURL_SB_GET (   x)    ((*x->subpointer++)&0xff)

Definition at line 83 of file telnet.c.

#define CURL_SB_LEN (   x)    (x->subend - x->subpointer)

Definition at line 86 of file telnet.c.

#define CURL_SB_PEEK (   x)    ((*x->subpointer)&0xff)

Definition at line 84 of file telnet.c.

#define CURL_SB_TERM (   x)
Value:
do {                                                  \
    x->subend = x->subpointer;                          \
    CURL_SB_CLEAR(x);                                   \
  } WHILE_FALSE

Definition at line 72 of file telnet.c.

#define CURL_WANTNO   3

Definition at line 129 of file telnet.c.

#define CURL_WANTYES   2

Definition at line 128 of file telnet.c.

#define CURL_YES   1

Definition at line 127 of file telnet.c.

#define startskipping ( )
Value:
if(startwrite >= 0) {                                       \
    result = Curl_client_write(conn,                          \
                               CLIENTWRITE_BODY,              \
                               (char *)&inbuf[startwrite],    \
                               in-startwrite);                \
    if(result)                                                \
      return result;                                          \
  }                                                           \
  startwrite = -1
#define SUBBUFSIZE   512

Definition at line 69 of file telnet.c.

#define TELCMDS

Definition at line 57 of file telnet.c.

#define TELOPTS

Definition at line 56 of file telnet.c.

#define writebyte ( )
Value:
if(startwrite < 0) \
      startwrite = in

Enumeration Type Documentation

Enumerator:
CURL_TS_DATA 
CURL_TS_IAC 
CURL_TS_WILL 
CURL_TS_WONT 
CURL_TS_DO 
CURL_TS_DONT 
CURL_TS_CR 
CURL_TS_SB 
CURL_TS_SE 

Definition at line 137 of file telnet.c.


Function Documentation

static CURLcode check_telnet_options ( struct connectdata conn) [static]

Definition at line 818 of file telnet.c.

static CURLcode init_telnet ( struct connectdata conn) [static]

Definition at line 240 of file telnet.c.

static void negotiate ( struct connectdata conn) [static]

Definition at line 290 of file telnet.c.

static void printoption ( struct Curl_easy data,
const char *  direction,
int  cmd,
int  option 
) [static]

Definition at line 308 of file telnet.c.

static void printsub ( struct Curl_easy data,
int  direction,
unsigned char *  pointer,
size_t  length 
) [static]

Definition at line 705 of file telnet.c.

static void rec_do ( struct connectdata conn,
int  option 
) [static]

Definition at line 603 of file telnet.c.

static void rec_dont ( struct connectdata conn,
int  option 
) [static]

Definition at line 663 of file telnet.c.

static void rec_will ( struct connectdata conn,
int  option 
) [static]

Definition at line 439 of file telnet.c.

static void rec_wont ( struct connectdata conn,
int  option 
) [static]

Definition at line 487 of file telnet.c.

static void send_negotiation ( struct connectdata conn,
int  cmd,
int  option 
) [static]

Definition at line 344 of file telnet.c.

static CURLcode send_telnet_data ( struct connectdata conn,
char *  buffer,
ssize_t  nread 
) [static]

Definition at line 1224 of file telnet.c.

static void sendsuboption ( struct connectdata conn,
int  option 
) [static]

Definition at line 1002 of file telnet.c.

static void set_local_option ( struct connectdata conn,
int  cmd,
int  option 
) [static]

Definition at line 529 of file telnet.c.

static void set_remote_option ( struct connectdata conn,
int  cmd,
int  option 
) [static]

Definition at line 365 of file telnet.c.

static void suboption ( struct connectdata conn) [static]

Definition at line 924 of file telnet.c.

static CURLcode telnet_do ( struct connectdata conn,
bool done 
) [static]

Definition at line 1281 of file telnet.c.

static CURLcode telnet_done ( struct connectdata conn,
CURLcode  status,
bool  premature 
) [static]

Definition at line 1263 of file telnet.c.

static CURLcode telrcv ( struct connectdata conn,
const unsigned char *  inbuf,
ssize_t  count 
) [static]

Definition at line 1059 of file telnet.c.


Variable Documentation



rc_visard_driver
Author(s): Heiko Hirschmueller , Christian Emmerich , Felix Ruess
autogenerated on Thu Jun 6 2019 20:43:09