home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / rxtelnet.zip / nvt / nvt.h < prev    next >
Text File  |  1997-09-01  |  1KB  |  42 lines

  1.  
  2.  #define  DEFAULTPORT  23
  3.  #define  MAXLINESIZE  256
  4.  #define  RECVTIMEOUT  1000
  5.  
  6.  typedef unsigned long HNVT;
  7.  
  8.  HNVT  nvtopen( char *hostname, int port );
  9.  int   nvtclose( HNVT hnvt );
  10.  
  11.  int   nvtgets( HNVT hnvt, char *buf, int bufsize );
  12.  int   nvtputs( HNVT hnvt, char *buf, int bufsize );
  13.  int   nvtpeek( HNVT hnvt, int timeout );
  14.  
  15.  
  16.  /* telnet out-of-band commands */
  17.  
  18.  #define   _GA      "GA"
  19.  #define   _AYT     "AYT"
  20.  #define   _AO      "AO"
  21.  #define   _IP      "IP"
  22.  #define   _BREAK   "BREAK"
  23.  #define   _NOP     "NOP"
  24.  #define   _EOR     "EOR"
  25.  #define   _ABORT   "ABORT"
  26.  #define   _SUSP    "SUSP"
  27.  #define   _EOF     "EOF"
  28.  
  29.  int   nvtcommand( HNVT hnvt, char *command );
  30.  
  31.  
  32.  typedef struct                        /* nvt link information       */
  33.          {
  34.            unsigned long   addr;       /* address of connection host */
  35.            int             port;       /* port used for connection   */
  36.            int             socket;     /* socket used for connection */
  37.          }
  38.            LNVT;
  39.  
  40.  int   nvtquery( HNVT hnvt, LNVT *link );
  41.  
  42.