From owner-freebsd-bugs Fri May 5 15:58:26 1995 Return-Path: bugs-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id PAA15547 for bugs-outgoing; Fri, 5 May 1995 15:58:26 -0700 Received: from unlisys.unlisys.NET (unlisys.unlisys.net [194.64.15.1]) by freefall.cdrom.com (8.6.10/8.6.6) with SMTP id PAA15540 for ; Fri, 5 May 1995 15:58:23 -0700 Received: by unlisys.unlisys.NET from deadline.snafu.de with smtp (Smail3.1.28.1 [@@]) id m0s7WK6-0000HkC; Sat, 6 May 95 00:58 MET DST Received: by deadline.snafu.de id m0s7WK3-000J2hC; Sat, 6 May 95 00:58 MET DST (/\oo/\ Smail3.1.29.1 #29.1) Message-Id: From: root@deadline.snafu.de (Andreas S. Wetzel) Subject: Weirdity in arpa/telnet.h ?? To: freebsd-bugs@FreeBSD.org Date: Sat, 6 May 1995 00:58:10 +0200 (MET DST) Organization: -D-E-A-D-L-I-N-E- Public access UN*X system - 13347 Berlin. X-Mailer: ELM [version 2.4 PL24 PGP2] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 1742 Sender: bugs-owner@FreeBSD.org Precedence: bulk Hi! --- In the includefile arpa/telnet.h it reads ?! #define NTELOPTS (1+TELOPT_NEW_ENVIRON) #ifdef TELOPTS char *telopts[NTELOPTS+1] = { "BINARY", "ECHO", "RCP", "SUPPRESS GO AHEAD", "NAME", "STATUS", "TIMING MARK", "RCTE", "NAOL", "NAOP", "NAOCRD", "NAOHTS", "NAOHTD", "NAOFFD", "NAOVTS", "NAOVTD", "NAOLFD", "EXTEND ASCII", "LOGOUT", "BYTE MACRO", "DATA ENTRY TERMINAL", "SUPDUP", "SUPDUP OUTPUT", "SEND LOCATION", "TERMINAL TYPE", "END OF RECORD", "TACACS UID", "OUTPUT MARKING", "TTYLOC", "3270 REGIME", "X.3 PAD", "NAWS", "TSPEED", "LFLOW", "LINEMODE", "XDISPLOC", "OLD-ENVIRON", "AUTHENTICATION", "ENCRYPT", "NEW-ENVIRON", 0, }; #define TELOPT_FIRST TELOPT_BINARY #define TELOPT_LAST TELOPT_NEW_ENVIRON #define TELOPT_OK(x) ((unsigned int)(x) <= TELOPT_LAST) #define TELOPT(x) telopts[(x)-TELOPT_FIRST] #endif <==== !!! ==== Is there any reason for this being different from the definition of the telnet commands, which reads: #ifdef TELCMDS char *telcmds[] = { "EOF", "SUSP", "ABORT", "EOR", "SE", "NOP", "DMARK", "BRK", "IP", "AO", "AYT", "EC", "EL", "GA", "SB", "WILL", "WONT", "DO", "DONT", "IAC", 0, }; #else <==== !!! ==== extern char *telcmds[]; #endif <==== !!! ==== #define TELCMD_FIRST xEOF #define TELCMD_LAST IAC #define TELCMD_OK(x) ((unsigned int)(x) <= TELCMD_LAST && \ (unsigned int)(x) >= TELCMD_FIRST) #define TELCMD(x) telcmds[(x)-TELCMD_FIRST] Mickey -- (__) (@@) Andreas S. Wetzel E-mail: mickey@deadline.snafu.de /-------\/ Utrechter Strasse 41 Web: http://deadline.snafu.de/ / | || 13347 Berlin Voice: <+4930> 456 81 68 * ||----|| Germany Fax/Data: <+4930> 455 19 57 ~~ ~~