Ignore:
Timestamp:
May 19, 2003, 4:41:00 AM (22 years ago)
Author:
bird
Message:

#434: Initial tcpip header merges.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/include/arpa/telnet.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r182 r183  
    1 /*
     1/* Modified for gcc by bird 2003
     2 *
    23 * Copyright (c) 1983 Regents of the University of California.
    34 * All rights reserved.
     
    3637#ifndef _TELNET_H_
    3738#define _TELNET_H_
     39#define _ARPA_TELNET_H_
    3840
    3941/*
     
    7577#define TELCMD_FIRST    xEOF
    7678#define TELCMD_LAST     IAC
    77 #define TELCMD_OK(x)    ((x) <= TELCMD_LAST && (x) >= TELCMD_FIRST)
     79#define TELCMD_OK(x)    ((unsigned int)(x) <= TELCMD_LAST && (unsigned int)(x) >= TELCMD_FIRST)
    7880#define TELCMD(x)       telcmds[(x)-TELCMD_FIRST]
    7981
     
    115117#define TELOPT_LINEMODE 34      /* Linemode option */
    116118#define TELOPT_XDISPLOC 35      /* X Display Location */
    117 #define TELOPT_ENVIRON  36      /* Environment variables */
     119#define TELOPT_OLD_ENVIRON 36   /* Old - Environment variables */
    118120#define TELOPT_AUTHENTICATION 37/* Authenticate */
    119121#define TELOPT_ENCRYPT  38      /* Encryption option */
     122#define TELOPT_NEW_ENVIRON 39   /* New - Environment variables */
    120123#define TELOPT_EXOPL    255     /* extended-options-list */
    121124
    122125
    123 #define NTELOPTS        (1+TELOPT_ENCRYPT)
     126#define NTELOPTS        (1+TELOPT_NEW_ENVIRON)
    124127#ifdef TELOPTS
    125128char *telopts[NTELOPTS+1] = {
     
    132135        "TACACS UID", "OUTPUT MARKING", "TTYLOC",
    133136        "3270 REGIME", "X.3 PAD", "NAWS", "TSPEED", "LFLOW",
    134         "LINEMODE", "XDISPLOC", "ENVIRON", "AUTHENTICATION",
    135         "ENCRYPT",
     137        "LINEMODE", "XDISPLOC", "OLD-ENVIRON", "AUTHENTICATION",
     138        "ENCRYPT", "NEW-ENVIRON",
    136139        0,
    137140};
    138141#define TELOPT_FIRST    TELOPT_BINARY
    139 #define TELOPT_LAST     TELOPT_ENCRYPT
    140 #define TELOPT_OK(x)    ((x) <= TELOPT_LAST && (x) >= TELOPT_FIRST)
     142#define TELOPT_LAST     TELOPT_NEW_ENVIRON
     143#define TELOPT_OK(x)    ((unsigned int)(x) <= TELOPT_LAST)
    141144#define TELOPT(x)       telopts[(x)-TELOPT_FIRST]
    142145#endif
     
    148151#define TELQUAL_REPLY   2       /* AUTHENTICATION: client version of IS */
    149152#define TELQUAL_NAME    3       /* AUTHENTICATION: client version of IS */
     153
     154#define LFLOW_OFF               0       /* Disable remote flow control */
     155#define LFLOW_ON                1       /* Enable remote flow control */
     156#define LFLOW_RESTART_ANY       2       /* Restart output on any char */
     157#define LFLOW_RESTART_XON       3       /* Restart output only on XON */
    150158
    151159/*
     
    209217#endif
    210218
    211 #define SLC_NAME_OK(x)  ((x) >= 0 && (x) < NSLC)
     219#define SLC_NAME_OK(x)  ((unsigned int)(x) <= NSLC)
    212220#define SLC_NAME(x)     slc_names[x]
    213221
     
    226234#define SLC_FLUSHOUT    0x20
    227235
    228 #define ENV_VALUE       0
    229 #define ENV_VAR         1
    230 #define ENV_ESC         2
     236#define OLD_ENV_VALUE   0
     237#define OLD_ENV_VAR     1
     238#define NEW_ENV_VAR     0
     239#define NEW_ENV_VALUE   1
     240#define ENV_ESC         2
     241#define ENV_USERVAR     3
    231242
    232243/*
     
    265276#endif
    266277
    267 #define AUTHTYPE_NAME_OK(x)     ((x) >= 0 && (x) < AUTHTYPE_CNT)
     278#define AUTHTYPE_NAME_OK(x)     ((unsigned int)(x) < AUTHTYPE_CNT)
    268279#define AUTHTYPE_NAME(x)        authtype_names[x]
    269280
     
    302313
    303314
    304 #define ENCRYPT_NAME_OK(x)      ((x) >= 0 && (x) < ENCRYPT_CNT)
     315#define ENCRYPT_NAME_OK(x)      ((unsigned int)(x) < ENCRYPT_CNT)
    305316#define ENCRYPT_NAME(x)         encrypt_names[x]
    306317
    307 #define ENCTYPE_NAME_OK(x)      ((x) >= 0 && (x) < ENCTYPE_CNT)
     318#define ENCTYPE_NAME_OK(x)      ((unsigned int)(x) < ENCTYPE_CNT)
    308319#define ENCTYPE_NAME(x)         enctype_names[x]
    309320
Note: See TracChangeset for help on using the changeset viewer.