]>
git.saurik.com Git - apple/network_cmds.git/blob - telnetd.tproj/ext.h
2 * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * "Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
7 * Reserved. This file contains Original Code and/or Modifications of
8 * Original Code as defined in and that are subject to the Apple Public
9 * Source License Version 1.0 (the 'License'). You may not use this file
10 * except in compliance with the License. Please obtain a copy of the
11 * License at http://www.apple.com/publicsource and read it before using
14 * The Original Code and all software distributed under the License are
15 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
16 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
17 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
19 * License for the specific language governing rights and limitations
22 * @APPLE_LICENSE_HEADER_END@
25 * Copyright (c) 1989, 1993
26 * The Regents of the University of California. All rights reserved.
28 * Redistribution and use in source and binary forms, with or without
29 * modification, are permitted provided that the following conditions
31 * 1. Redistributions of source code must retain the above copyright
32 * notice, this list of conditions and the following disclaimer.
33 * 2. Redistributions in binary form must reproduce the above copyright
34 * notice, this list of conditions and the following disclaimer in the
35 * documentation and/or other materials provided with the distribution.
36 * 3. All advertising materials mentioning features or use of this software
37 * must display the following acknowledgement:
38 * This product includes software developed by the University of
39 * California, Berkeley and its contributors.
40 * 4. Neither the name of the University nor the names of its contributors
41 * may be used to endorse or promote products derived from this software
42 * without specific prior written permission.
44 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
45 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
46 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
47 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
48 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
49 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
50 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
51 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
52 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
53 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
56 * @(#)ext.h 8.2 (Berkeley) 12/15/93
60 * Telnet server variable declarations
62 extern char options
[256];
63 extern char do_dont_resp
[256];
64 extern char will_wont_resp
[256];
65 extern int linemode
; /* linemode on/off */
67 extern int uselinemode
; /* what linemode to use (on/off) */
68 extern int editmode
; /* edit modes in use */
69 extern int useeditmode
; /* edit modes to use */
70 extern int alwayslinemode
; /* command line option */
71 # ifdef KLUDGELINEMODE
72 extern int lmodetype
; /* Client support for linemode */
73 # endif /* KLUDGELINEMODE */
75 extern int flowmode
; /* current flow control state */
76 extern int restartany
; /* restart output on any character state */
78 extern int diagnostic
; /* telnet diagnostic capabilities */
79 #endif /* DIAGNOSTICS */
81 extern int bftpd
; /* behave as bftp daemon */
82 #endif /* BFTPDAEMON */
84 extern int require_SecurID
;
86 #if defined(AUTHENTICATION)
87 extern int auth_level
;
90 extern slcfun slctab
[NSLC
+ 1]; /* slc mapping table */
92 extern char *terminaltype
;
95 * I/O data buffers, pointers, and counters.
97 extern char ptyobuf
[BUFSIZ
+NETSLOP
], *pfrontp
, *pbackp
;
99 extern char netibuf
[BUFSIZ
], *netip
;
101 extern char netobuf
[BUFSIZ
+NETSLOP
], *nfrontp
, *nbackp
;
102 extern char *neturg
; /* one past last bye of urgent data */
106 #if defined(CRAY2) && defined(UNICOS5)
107 extern int unpcc
; /* characters left unprocessed by CRAY-2 terminal routine */
108 extern char *unptyip
; /* pointer to remaining characters in buffer */
113 extern char line
[16];
117 extern int SYNCHing
; /* we are in TELNET SYNCH mode */
129 add_slc
P((int, int, int)),
131 change_slc
P((int, int, int)),
133 clientstat
P((int, int, int)),
134 copy_termbuf
P((char *, int)),
136 defer_terminit
P((void)),
137 do_opt_slc
P((unsigned char *, int)),
141 edithost
P((char *, char *)),
142 fatal
P((int, char *)),
143 fatalperror
P((int, char *)),
144 get_slc_defaults
P((void)),
146 init_termbuf
P((void)),
153 printoption
P((char *, int)),
154 printdata
P((char *, char *, int)),
155 printsub
P((int, unsigned char *, int)),
159 putf
P((char *, char *)),
161 send_do
P((int, int)),
162 send_dont
P((int, int)),
164 send_status
P((void)),
165 send_will
P((int, int)),
166 send_wont
P((int, int)),
169 set_termbuf
P((void)),
170 start_login
P((char *, int, char *)),
172 #if defined(AUTHENTICATION)
173 start_slave
P((char *)),
175 start_slave
P((char *, int, char *)),
180 tty_binaryin
P((int)),
181 tty_binaryout
P((int));
184 end_slc
P((unsigned char **)),
190 spcset
P((int, cc_t
*, cc_t
**)),
194 tty_flowmode
P((void)),
195 tty_restartany
P((void)),
196 tty_isbinaryin
P((void)),
197 tty_isbinaryout
P((void)),
198 tty_iscrnl
P((void)),
199 tty_isecho
P((void)),
200 tty_isediting
P((void)),
201 tty_islitecho
P((void)),
202 tty_isnewmap
P((void)),
204 tty_issofttab
P((void)),
205 tty_istrapsig
P((void)),
206 tty_linemode
P((void));
210 tty_setecho
P((int)),
211 tty_setedit
P((int)),
212 tty_setlinemode
P((int)),
213 tty_setlitecho
P((int)),
215 tty_setsofttab
P((int)),
219 writenet
P((unsigned char *, int));
222 extern void (*encrypt_output
) P((unsigned char *, int));
223 extern int (*decrypt_input
) P((int));
224 extern char *nclearto
;
225 #endif /* ENCRYPTION */
229 * The following are some clocks used to decide how to interpret
230 * the relationship between various variables.
235 system
, /* what the current time is */
236 echotoggle
, /* last time user entered echo character */
237 modenegotiated
, /* last time operating mode negotiated */
238 didnetreceive
, /* last time we read data from network */
239 ttypesubopt
, /* ttype subopt is received */
240 tspeedsubopt
, /* tspeed subopt is received */
241 environsubopt
, /* environ subopt is received */
242 oenvironsubopt
, /* old environ subopt is received */
243 xdisplocsubopt
, /* xdisploc subopt is received */
244 baseline
, /* time started to do timed action */
245 gotDM
; /* when did we last see a data mark */
249 #if defined(CRAY2) && defined(UNICOS5)
250 extern int needtermstat
;
255 # define DEFAULT_IM "\r\n\r\nCray UNICOS (%h) (%t)\r\n\r\r\n\r"
258 # define DEFAULT_IM "\r\n\r\nSunOS UNIX (%h) (%t)\r\n\r\r\n\r"
261 # define DEFAULT_IM "\r\n\r\nULTRIX (%h) (%t)\r\n\r\r\n\r"
263 # define DEFAULT_IM "\r\n\r\n4.4 BSD (%h) (%t)\r\n\r\r\n\r"