X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/5bf38209596744224e7488b96ea239ac406e68b1..56559b702c4cad512689ce12e3bd83d85c117194:/usr/src/include/arpa/telnet.h diff --git a/usr/src/include/arpa/telnet.h b/usr/src/include/arpa/telnet.h index edd6d7c304..0d74eb2d41 100644 --- a/usr/src/include/arpa/telnet.h +++ b/usr/src/include/arpa/telnet.h @@ -1,12 +1,15 @@ /* - * Copyright (c) 1983 Regents of the University of California. - * All rights reserved. + * Copyright (c) 1983, 1993 + * The Regents of the University of California. All rights reserved. * * %sccs.include.redist.c% * - * @(#)telnet.h 5.12 (Berkeley) %G% + * @(#)telnet.h 8.1 (Berkeley) %G% */ +#ifndef _TELNET_H_ +#define _TELNET_H_ + /* * Definitions for the TELNET protocol. */ @@ -45,7 +48,8 @@ extern char *telcmds[]; #define TELCMD_FIRST xEOF #define TELCMD_LAST IAC -#define TELCMD_OK(x) ((x) <= TELCMD_LAST && (x) >= TELCMD_FIRST) +#define TELCMD_OK(x) ((unsigned int)(x) <= TELCMD_LAST && \ + (unsigned int)(x) >= TELCMD_FIRST) #define TELCMD(x) telcmds[(x)-TELCMD_FIRST] /* telnet options */ @@ -108,7 +112,7 @@ char *telopts[NTELOPTS+1] = { }; #define TELOPT_FIRST TELOPT_BINARY #define TELOPT_LAST TELOPT_ENCRYPT -#define TELOPT_OK(x) ((x) <= TELOPT_LAST && (x) >= TELOPT_FIRST) +#define TELOPT_OK(x) ((unsigned int)(x) <= TELOPT_LAST) #define TELOPT(x) telopts[(x)-TELOPT_FIRST] #endif @@ -117,6 +121,12 @@ char *telopts[NTELOPTS+1] = { #define TELQUAL_SEND 1 /* send option */ #define TELQUAL_INFO 2 /* ENVIRON: informational version of IS */ #define TELQUAL_REPLY 2 /* AUTHENTICATION: client version of IS */ +#define TELQUAL_NAME 3 /* AUTHENTICATION: client version of IS */ + +#define LFLOW_OFF 0 /* Disable remote flow control */ +#define LFLOW_ON 1 /* Enable remote flow control */ +#define LFLOW_RESTART_ANY 2 /* Restart output on any char */ +#define LFLOW_RESTART_XON 3 /* Restart output only on XON */ /* * LINEMODE suboptions @@ -178,7 +188,7 @@ extern char *slc_names[]; #define SLC_NAMES SLC_NAMELIST #endif -#define SLC_NAME_OK(x) ((x) >= 0 && (x) < NSLC) +#define SLC_NAME_OK(x) ((unsigned int)(x) <= NSLC) #define SLC_NAME(x) slc_names[x] #define SLC_NOSUPPORT 0 @@ -198,6 +208,7 @@ extern char *slc_names[]; #define ENV_VALUE 0 #define ENV_VAR 1 #define ENV_ESC 2 +#define ENV_USERVAR 3 /* * AUTHENTICATION suboptions @@ -234,7 +245,7 @@ char *authtype_names[] = { extern char *authtype_names[]; #endif -#define AUTHTYPE_NAME_OK(x) ((x) >= 0 && (x) < AUTHTYPE_CNT) +#define AUTHTYPE_NAME_OK(x) ((unsigned int)(x) < AUTHTYPE_CNT) #define AUTHTYPE_NAME(x) authtype_names[x] /* @@ -247,20 +258,23 @@ extern char *authtype_names[]; #define ENCRYPT_END 4 /* Am ending encrypted */ #define ENCRYPT_REQSTART 5 /* Request you start encrypting */ #define ENCRYPT_REQEND 6 /* Request you send encrypting */ -#define ENCRYPT_CNT 7 +#define ENCRYPT_ENC_KEYID 7 +#define ENCRYPT_DEC_KEYID 8 +#define ENCRYPT_CNT 9 #define ENCTYPE_ANY 0 -#define ENCTYPE_KRBDES 1 -#define ENCTYPE_CNT 2 +#define ENCTYPE_DES_CFB64 1 +#define ENCTYPE_DES_OFB64 2 +#define ENCTYPE_CNT 3 #ifdef ENCRYPT_NAMES char *encrypt_names[] = { "IS", "SUPPORT", "REPLY", "START", "END", - "REQUEST-START", "REQUEST-END", + "REQUEST-START", "REQUEST-END", "ENC-KEYID", "DEC-KEYID", 0, }; char *enctype_names[] = { - "ANY", "KRBDES", 0, + "ANY", "DES_CFB64", "DES_OFB64", 0, }; #else extern char *encrypt_names[]; @@ -268,8 +282,10 @@ extern char *enctype_names[]; #endif -#define ENCRYPT_NAME_OK(x) ((x) >= 0 && (x) < ENCRYPT_CNT) +#define ENCRYPT_NAME_OK(x) ((unsigned int)(x) < ENCRYPT_CNT) #define ENCRYPT_NAME(x) encrypt_names[x] -#define ENCTYPE_NAME_OK(x) ((x) >= 0 && (x) < ENCTYPE_CNT) +#define ENCTYPE_NAME_OK(x) ((unsigned int)(x) < ENCTYPE_CNT) #define ENCTYPE_NAME(x) enctype_names[x] + +#endif /* !_TELNET_H_ */