Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 May 1995 00:58:10 +0200 (MET DST)
From:      root@deadline.snafu.de (Andreas S. Wetzel)
To:        freebsd-bugs@FreeBSD.org
Subject:   Weirdity in arpa/telnet.h ??
Message-ID:  <m0s7WK3-000J2hC@deadline.snafu.de>

next in thread | raw e-mail | index | archive | help
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
    ~~    ~~



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?m0s7WK3-000J2hC>