1 /* ckctel.h -- Symbol and macro definitions for C-Kermit telnet support */
4 Authors: Jeffrey E Altman <jaltman@secure-endpoints.com>,
5 Secure Endpoints Inc., New York City
6 Frank da Cruz <fdc@columbia.edu>
7 Columbia University Academic Information Systems, New York City.
9 Copyright (C) 1985, 2004,
10 Trustees of Columbia University in the City of New York.
11 All rights reserved. See the C-Kermit COPYING.TXT file or the
12 copyright text in the ckcmai.c module for disclaimer and permissions.
15 . Only one source file should include #defines for
16 TELCMDS, TELOPTS, TELOPT_STATES, SLC_NAMES, and AUTH_NAMES.
17 . This file should be used inplace of "arpa/telnet.h"
24 Definitions for the TELNET protocol.
25 can't rely on library header files for any of them.
27 #ifndef IAC /* First the telnet commands */
88 #define LAST_TN_CMD 236
90 #define TN_SAK 200 /* IBM Secure Attention Key */
91 #endif /* LAST_TN_CMD */
93 #define SYNCH 242 /* for telfunc calls */
97 "EOF", "SUSP", "ABORT", "EOR",
98 "SE", "NOP", "DMARK", "BRK", "IP", "AO", "AYT", "EC",
99 "EL", "GA", "SB", "WILL", "WONT", "DO", "DONT", "IAC", 0
102 extern char *telcmds[];
105 #define TELCMD_FIRST TN_EOF
106 #define TELCMD_LAST IAC
107 #define TELCMD_OK(x) ((unsigned int)(x) <= TELCMD_LAST && \
108 (unsigned int)(x) >= TELCMD_FIRST || \
109 (unsigned int)(x) == TN_SAK)
110 #define TELCMD(x) (TELCMD_OK(x)? ((x) == TN_SAK?"SAK": \
111 telcmds[(x)-TELCMD_FIRST]):"UNKNOWN")
113 /* Then the options */
114 /* NB: the following platforms have TELOPT_AUTHENTICATION defined as */
115 /* 45 instead of 37. */
116 #ifdef TELOPT_AUTHENTICATION
118 #undef TELOPT_AUTHENTICATION
121 #undef TELOPT_AUTHENTICATION
124 #undef TELOPT_AUTHENTICATION
126 #endif /* TELOPT_AUTHENTICATION */
129 #ifndef TELOPT_BINARY
130 #define TELOPT_BINARY 0 /* 8-bit data path (RFC 856)*/
133 #define TELOPT_ECHO 1 /* echo (RFC 857)*/
136 #define TELOPT_RCP 2 /* prepare to reconnect (NIC 50005)*/
139 #define TELOPT_SGA 3 /* suppress go ahead (RFC 858) */
142 #define TELOPT_NAMS 4 /* approximate message size (ETHERNET) */
144 #ifndef TELOPT_STATUS
145 #define TELOPT_STATUS 5 /* give status (RFC 859) */
148 #define TELOPT_TM 6 /* timing mark (RFC 860) */
151 #define TELOPT_RCTE 7 /* remote controlled transmission and echo */
152 #endif /* (RFC 726) */
154 #define TELOPT_NAOL 8 /* negotiate about output line width */
155 #endif /* (NIC 50005) */
157 #define TELOPT_NAOP 9 /* negotiate about output page size */
158 #endif /* (NIC 50005) */
159 #ifndef TELOPT_NAOCRD
160 #define TELOPT_NAOCRD 10 /* negotiate about CR disposition (RFC 652) */
161 #endif /* [Historic] */
162 #ifndef TELOPT_NAOHTS
163 #define TELOPT_NAOHTS 11 /* negotiate about horizontal tabstops */
164 #endif /* (RFC 653) [Historic] */
165 #ifndef TELOPT_NAOHTD
166 #define TELOPT_NAOHTD 12 /* negotiate about horiz tab disposition */
167 #endif /* (RFC 654) [Historic] */
168 #ifndef TELOPT_NAOFFD
169 #define TELOPT_NAOFFD 13 /* negotiate about formfeed disposition */
170 #endif /* (RFC 655) [Historic] */
171 #ifndef TELOPT_NAOVTS
172 #define TELOPT_NAOVTS 14 /* negotiate about vertical tab stops */
173 #endif /* (RFC 656) [Historic] */
174 #ifndef TELOPT_NAOVTD
175 #define TELOPT_NAOVTD 15 /* negotiate about vertical tab disposition */
176 #endif /* (RFC 657) [Historic] */
177 #ifndef TELOPT_NAOLFD
178 #define TELOPT_NAOLFD 16 /* negotiate about output LF disposition */
179 #endif /* (RFC 658) [Historic] */
180 #ifndef TELOPT_XASCII
181 #define TELOPT_XASCII 17 /* extended ascii character set */
182 #endif /* (RFC 698) */
183 #ifndef TELOPT_LOGOUT
184 #define TELOPT_LOGOUT 18 /* force logout (RFC 727) */
187 #define TELOPT_BM 19 /* byte macro (RFC 735) */
190 #define TELOPT_DET 20 /* data entry terminal (RFC 1043, 732) */
192 #ifndef TELOPT_SUPDUP
193 #define TELOPT_SUPDUP 21 /* supdup protocol (RFC 736, 734) */
195 #ifndef TELOPT_SUPDUPOUTPUT
196 #define TELOPT_SUPDUPOUTPUT 22 /* supdup output (RFC 749) */
198 #ifndef TELOPT_SNDLOC
199 #define TELOPT_SNDLOC 23 /* send location (RFC 779) */
202 #define TELOPT_TTYPE 24 /* terminal type (RFC 1091) */
205 #define TELOPT_EOR 25 /* end of record (RFC 885) */
208 #define TELOPT_TUID 26 /* TACACS user identification (RFC 927) */
210 #ifndef TELOPT_OUTMRK
211 #define TELOPT_OUTMRK 27 /* output marking (RFC 933) */
213 #ifndef TELOPT_TTYLOC
214 #define TELOPT_TTYLOC 28 /* terminal location number (RFC 946) */
216 #ifndef TELOPT_3270REGIME
217 #define TELOPT_3270REGIME 29 /* 3270 regime (RFC 1041) */
220 #define TELOPT_X3PAD 30 /* X.3 PAD (RFC 1053) */
223 #define TELOPT_NAWS 31 /* window size (RFC 1073) */
225 #ifndef TELOPT_TSPEED
226 #define TELOPT_TSPEED 32 /* terminal speed (RFC 1079) */
229 #define TELOPT_LFLOW 33 /* remote flow control (RFC 1372) */
231 #ifndef TELOPT_LINEMODE
232 #define TELOPT_LINEMODE 34 /* Linemode option (RFC 1184) */
234 #ifndef TELOPT_XDISPLOC
235 #define TELOPT_XDISPLOC 35 /* X Display Location (RFC 1096) */
237 #ifndef TELOPT_OLD_ENVIRON
238 #define TELOPT_OLD_ENVIRON 36 /* Old - Environment variables (RFC 1408) */
240 #ifndef TELOPT_AUTHENTICATION
241 #define TELOPT_AUTHENTICATION 37/* Authenticate (RFC 2941) */
243 #ifndef TELOPT_ENCRYPTION
244 #define TELOPT_ENCRYPTION 38 /* Encryption option (RFC 2946) */
246 #ifndef TELOPT_NEWENVIRON
247 #define TELOPT_NEWENVIRON 39 /* New - Environment variables (RFC 1572) */
250 #define TELOPT_3270E 40 /* 3270 Extended (RFC 1647) */
253 #define TELOPT_XAUTH 41 /* ??? (Earhart) */
255 #ifndef TELOPT_CHARSET
256 #define TELOPT_CHARSET 42 /* Character-set (RFC 2066) */
259 #define TELOPT_RSP 43 /* Remote Serial Port (Barnes) */
261 #ifndef TELOPT_COMPORT
262 #define TELOPT_COMPORT 44 /* Com Port Control (RFC 2217) */
265 #define TELOPT_SLE 45 /* Suppress Local Echo (Atmar) - [rejected] */
267 #ifndef TELOPT_START_TLS
268 #define TELOPT_START_TLS 46 /* Telnet over Transport Layer Security */
270 #ifndef TELOPT_KERMIT
271 #define TELOPT_KERMIT 47 /* Kermit (RFC 2840) */
273 #ifndef TELOPT_SEND_URL
274 #define TELOPT_SEND_URL 48 /* Send URL */
277 #ifndef TELOPT_FORWARD_X
278 #define TELOPT_FORWARD_X 49 /* X Windows Forwarding (Altman) */
279 #endif /* TELOPT_FORWARD_X */
281 #ifndef TELOPT_STDERR
282 #define TELOPT_STDERR 50 /* Redirected Stderr (Altman) */
283 #endif /* TELOPT_STDERR */
285 #ifndef TELOPT_PRAGMA_LOGON
286 #define TELOPT_PRAGMA_LOGON 138 /* Encrypted Logon option (PragmaSys) */
288 #ifndef TELOPT_SSPI_LOGON
289 #define TELOPT_SSPI_LOGON 139 /* MS SSPI Logon option (PragmaSys) */
291 #ifndef TELOPT_PRAGMA_HEARTBEAT
292 /* Server Send Heartbeat option (PragmaSys) */
293 #define TELOPT_PRAGMA_HEARTBEAT 140
296 #define TELOPT_IBM_SAK 200 /* IBM Secure Attention Key */
299 IBM Secure Attention Key (SAK) Option
301 In addition to terminal negotiation, the telnet command allows
302 negotiation for the Secure Attention Key (SAK)
303 option. This option, when supported, provides the local user with
304 a secure communication path to the remote
305 host for tasks such as changing user IDs or passwords. If the remote
306 host supports the SAK function, a trusted
307 shell is opened on the remote host when the telnet send sak
308 subcommand is issued. The SAK function can
309 also be assigned to a single key available in telnet input mode,
310 using the set sak subcommand.
314 Sends the TELNET SAK (Secure Attention Key) sequence, which causes
315 the remote system to invoke the trusted shell. If the SAK is not
316 supported, then an error message is displayed that reads:
317 Remote side does not support SAK.
321 #define TELOPT_EXOPL 255 /* Extended-options-list (RFC 861) */
326 #endif /* NTELOPTS */
327 /* The Telnet Option space is no longer being allocated by ICANN as a */
328 /* continuous list. In other words it is becoming sparse. But we do */
329 /* not want to have to allocate memory for a long list of strings and */
330 /* structs which will never be used. Therefore, the NTELOPTS define */
331 /* can no longer be equal to TELOPT_LAST+1. In fact, the notion of */
332 /* TELOPT_FIRST and TELOPT_LAST no longer make sense. */
335 #define TELOPT_FIRST TELOPT_BINARY
336 #define TELOPT_LAST TELOPT_IBM_SAK
339 The following macros speed us up at runtime but are too complex
340 for some preprocessors / compilers; if your compiler bombs on ckctel.c
341 with "Instruction table overflow" or somesuch, rebuild with -DNOTOMACROS.
346 #endif /* TELOPT_MACRO */
347 #endif /* NOTOMACROS */
350 #define TELOPT_INDEX(x) (((x)>=0 && (x)<= TELOPT_STDERR)?(x):\
351 ((x)>=TELOPT_PRAGMA_LOGON && (x)<=TELOPT_PRAGMA_HEARTBEAT)?(x)-87: \
352 ((x) == TELOPT_IBM_SAK)?(x)-146: NTELOPTS)
354 #define TELOPT_OK(x) (((x) >= TELOPT_BINARY && (x) <= TELOPT_STDERR) ||\
355 ((x) >= TELOPT_PRAGMA_LOGON && (x) <= TELOPT_PRAGMA_HEARTBEAT) ||\
356 ((x) == TELOPT_IBM_SAK))
357 #define TELOPT(x) (TELOPT_OK(x)?telopts[TELOPT_INDEX(x)]:"UNKNOWN")
358 #else /* TELOPT_MACRO */
359 _PROTOTYP(int telopt_index,(int));
360 _PROTOTYP(int telopt_ok,(int));
361 _PROTOTYP(CHAR * telopt, (int));
363 #define TELOPT_INDEX(x) telopt_index(x)
364 #define TELOPT_OK(x) telopt_ok(x)
365 #define TELOPT(x) telopt(x)
366 #endif /* TELOPT_MACRO */
369 char *telopts[NTELOPTS+2] = {
370 /* 0 */ "BINARY", "ECHO", "RCP", "SUPPRESS-GO-AHEAD",
371 /* 4 */ "NAME", "STATUS", "TIMING-MARK", "RCTE",
372 /* 8 */ "NAOL", "NAOP", "NAOCRD", "NAOHTS",
373 /* 12 */ "NAOHTD", "NAOFFD", "NAOVTS", "NAOVTD",
374 /* 16 */ "NAOLFD", "EXTEND-ASCII", "LOGOUT", "BYTE-MACRO",
375 /* 20 */ "DATA-ENTRY-TERMINAL", "SUPDUP", "SUPDUP-OUTPUT", "SEND-LOCATION",
376 /* 24 */ "TERMINAL-TYPE", "END-OF-RECORD", "TACACS-UID", "OUTPUT-MARKING",
377 /* 28 */ "TTYLOC", "3270-REGIME", "X.3-PAD", "NAWS",
378 /* 32 */ "TSPEED", "LFLOW", "LINEMODE", "XDISPLOC",
379 /* 36 */ "OLD-ENVIRON", "AUTHENTICATION", "ENCRYPTION", "NEW-ENVIRONMENT",
380 /* 40 */ "TN3270E","xauth","CHARSET", "remote-serial-port",
381 /* 44 */ "COM-PORT-CONTROL","suppress-local-echo","START-TLS","KERMIT",
382 /* 48 */ "send-url","FORWARD-X","stderr",
383 /* 138 */ "pragma-logon", "sspi-logon", "pragma-heartbeat",
389 extern char * telopts[];
392 /* TELNET Newline Mode */
394 #define TNL_CR 0 /* CR sends bare carriage return */
395 #define TNL_CRNUL 1 /* CR and NUL */
396 #define TNL_CRLF 2 /* CR and LF */
397 #define TNL_LF 3 /* LF instead of CR */
399 /* TELNET Negotiation Mode */
401 #define TN_NG_RF 0 /* Negotiation REFUSED */
402 #define TN_NG_AC 1 /* Negotiation ACCEPTED */
403 #define TN_NG_RQ 2 /* Negotiation REQUESTED */
404 #define TN_NG_MU 3 /* Negotiation REQUIRED (must) */
407 /* Systems where we know we can define TELNET NAWS automatically. */
409 #ifndef CK_NAWS /* In other words, if both */
410 #ifdef CK_TTGWSIZ /* TNCODE and TTGWSIZ are defined */
411 #define CK_NAWS /* then we can do NAWS. */
412 #endif /* CK_TTGWSIZ */
417 #define MAXFWDX 64 /* Num of X windows to be fwd'd */
419 #endif /* CK_FORWARD_X */
421 /* Telnet State structures and definitions */
422 struct _telopt_state {
423 unsigned char def_server_me_mode; /* Default Negotiation Mode */
424 unsigned char def_server_u_mode; /* Default Negotiation Mode */
425 unsigned char def_client_me_mode; /* Default Negotiation Mode */
426 unsigned char def_client_u_mode; /* Default Negotiation Mode */
427 unsigned char me_mode; /* Telnet Negotiation Mode */
428 unsigned char u_mode; /* Telnet Negotiation Mode */
429 unsigned char me; /* Am I ? */
430 unsigned char u; /* Are you? */
431 unsigned char unanswered_will; /* Sent Will, Waiting for DO/DONT */
432 unsigned char unanswered_do; /* Send DO, Waiting for WILL/WONT */
433 unsigned char unanswered_wont; /* Sent WONT, Waiting for DONT */
434 unsigned char unanswered_dont; /* Sent DONT, Waiting for WONT */
435 unsigned char unanswered_sb; /* Sent SB, Waiting for SB (server) */
438 struct _telopt_kermit { /* Kermit Option States */
439 unsigned char me_start; /* I have a Server active */
440 unsigned char me_req_start; /* Sent Req-Start, Waiting for response */
441 unsigned char me_req_stop; /* Sent Req-Stop, Waiting for response */
442 unsigned char u_start; /* You have a Server active */
443 unsigned char sop; /* Have we received the SOP char? */
445 #endif /* IKS_OPTION */
447 struct _telopt_encrypt { /* Encryption Option States */
448 unsigned char need_to_send;
449 unsigned char stop; /* Is encryption stopped? */
451 #endif /* CK_ENCRYPTION */
453 struct _telopt_naws { /* NAWS Option Information */
454 unsigned char need_to_send;
455 int x; /* Last Width */
456 int y; /* Last Height */
460 struct _telopt_start_tls { /* Start TLS Option */
461 unsigned char u_follows; /* u ready for TLS negotiation */
462 unsigned char me_follows; /* me ready for TLS negotiation */
463 unsigned char auth_request; /* Rcvd WILL AUTH before WONT START_TLS */
466 struct _telopt_term { /* Terminal Type */
467 unsigned char need_to_send;
468 unsigned char type[41]; /* Last terminal type */
470 #ifdef CK_ENVIRONMENT
471 struct _telopt_new_env {
472 unsigned char need_to_send;
477 struct _telopt_xdisp {
478 unsigned char need_to_send;
480 #endif /* CK_XDISPLOC */
481 #endif /* CK_ENVIRONMENT */
483 struct _telopt_sndloc {
484 unsigned char need_to_send;
486 #endif /* CK_SNDLOC */
488 struct _telopt_fwd_x {
489 unsigned char need_to_send;
494 unsigned char need_to_send_xauth;
495 unsigned char suspend;
501 #endif /* CK_FORWARD_X */
503 struct _telopt_comport {
504 unsigned char need_to_send;
505 unsigned char wait_for_sb;
506 unsigned char wait_for_ms;
508 #endif /* TN_COMPORT */
509 /* additional options such as New Environment or Send Location */
512 typedef struct _telopt_state telopt_state, *p_telopt_state;
514 /* telopt_states[] is the array of structs which the state of each telnet */
515 /* option is stored. We allocate one more than we need in case we are */
516 /* sent telnet options that we do not recognize. If by some chance the */
517 /* TELOPT_OK() check is skipped, TELOPT_INDEX() will force the option to */
518 /* use the extra cell. */
521 telopt_state telopt_states[NTELOPTS+1];
522 #else /* TELOPT_STATES */
523 extern telopt_state telopt_states[];
524 #endif /* TELOPT_STATES */
526 #define TELOPT_ME(x) (telopt_states[TELOPT_INDEX(x)].me)
527 #define TELOPT_U(x) (telopt_states[TELOPT_INDEX(x)].u)
528 #define TELOPT_ME_MODE(x) \
529 (telopt_states[TELOPT_INDEX(x)].me_mode)
530 #define TELOPT_U_MODE(x) \
531 (telopt_states[TELOPT_INDEX(x)].u_mode)
532 #define TELOPT_UNANSWERED_WILL(x) \
533 (telopt_states[TELOPT_INDEX(x)].unanswered_will)
534 #define TELOPT_UNANSWERED_DO(x) \
535 (telopt_states[TELOPT_INDEX(x)].unanswered_do)
536 #define TELOPT_UNANSWERED_WONT(x) \
537 (telopt_states[TELOPT_INDEX(x)].unanswered_wont)
538 #define TELOPT_UNANSWERED_DONT(x) \
539 (telopt_states[TELOPT_INDEX(x)].unanswered_dont)
540 #define TELOPT_UNANSWERED_SB(x) \
541 (telopt_states[TELOPT_INDEX(x)].unanswered_sb)
542 #define TELOPT_SB(x) \
543 (telopt_states[TELOPT_INDEX(x)].sb)
544 #define TELOPT_DEF_S_ME_MODE(x) \
545 (telopt_states[TELOPT_INDEX(x)].def_server_me_mode)
546 #define TELOPT_DEF_S_U_MODE(x) \
547 (telopt_states[TELOPT_INDEX(x)].def_server_u_mode)
548 #define TELOPT_DEF_C_ME_MODE(x) \
549 (telopt_states[TELOPT_INDEX(x)].def_client_me_mode)
550 #define TELOPT_DEF_C_U_MODE(x) \
551 (telopt_states[TELOPT_INDEX(x)].def_client_u_mode)
554 char * telopt_modes[4] = {
555 "REFUSED", "ACCEPTED", "REQUESTED", "REQUIRED"
557 #else /* TELOPT_MODES */
558 extern char * telopt_modes[];
559 #endif /* TELOPT_MODES */
562 #define TELOPT_MODE_OK(x) ((unsigned int)(x) <= TN_NG_MU)
563 #define TELOPT_MODE(x) (TELOPT_MODE_OK(x)?telopt_modes[(x)-TN_NG_RF]:"UNKNOWN")
564 #else /* TELOPT_MACRO */
565 _PROTOTYP(int telopt_mode_ok,(int));
566 _PROTOTYP(CHAR * telopt_mode,(int));
568 #define TELOPT_MODE_OK(x) telopt_mode_ok(x)
569 #define TELOPT_MODE(x) telopt_mode(x)
570 #endif /* TELOPT_MACRO */
572 /* Sub-option qualifiers */
573 #define TELQUAL_IS 0 /* option is... */
574 #define TELQUAL_SEND 1 /* send option */
575 #define TELQUAL_INFO 2 /* ENVIRON: informational version of IS */
576 #define TELQUAL_REPLY 2 /* AUTHENTICATION: client version of IS */
577 #define TELQUAL_NAME 3 /* AUTHENTICATION: client version of IS */
579 #define TEL_ENV_VAR 0
580 #define TEL_ENV_VALUE 1
581 #define TEL_ENV_ESC 2
582 #define TEL_ENV_USERVAR 3
584 #define LFLOW_OFF 0 /* Disable remote flow control */
585 #define LFLOW_ON 1 /* Enable remote flow control */
586 #define LFLOW_RESTART_ANY 2 /* Restart output on any char */
587 #define LFLOW_RESTART_XON 3 /* Restart output only on XON */
590 * LINEMODE suboptions
594 #define LM_FORWARDMASK 2
597 #define MODE_EDIT 0x01
598 #define MODE_TRAPSIG 0x02
599 #define MODE_ACK 0x04
600 #define MODE_SOFT_TAB 0x08
601 #define MODE_LIT_ECHO 0x10
603 #define MODE_MASK 0x1f
605 /* Not part of protocol, but needed to simplify things... */
606 #define MODE_FLOW 0x0100
607 #define MODE_ECHO 0x0200
608 #define MODE_INBIN 0x0400
609 #define MODE_OUTBIN 0x0800
610 #define MODE_FORCE 0x1000
646 * For backwards compatability, we define SLC_NAMES to be the
647 * list of names if SLC_NAMES is not defined.
649 #define SLC_NAMELIST "0", "SYNCH", "BRK", "IP", "AO", "AYT", "EOR", \
650 "ABORT", "EOF", "SUSP", "EC", "EL", "EW", "RP", \
651 "LNEXT", "XON", "XOFF", "FORW1", "FORW2", \
652 "MCL", "MCR", "MCWL", "MCWR", "MCBOL", "MCEOL", \
653 "INSRT", "OVER", "ECR", "EWR", "EBOL", "EEOL", 0
655 char *slc_names[] = {
659 extern char *slc_names[];
660 #define SLC_NAMES SLC_NAMELIST
663 #define SLC_NAME_OK(x) ((unsigned int)(x) <= NSLC)
664 #define SLC_NAME(x) (SLC_NAME_OK(x)?slc_names[x]:"UNKNOWN")
666 #define SLC_NOSUPPORT 0
667 #define SLC_CANTCHANGE 1
668 #define SLC_VARIABLE 2
669 #define SLC_DEFAULT 3
670 #define SLC_LEVELBITS 0x03
677 #define SLC_FLUSHIN 0x40
678 #define SLC_FLUSHOUT 0x20
680 #define OLD_ENV_VAR 1
681 #define OLD_ENV_VALUE 0
682 #define NEW_ENV_VAR 0
683 #define NEW_ENV_VALUE 1
685 #define ENV_USERVAR 3
687 #define FWDX_SCREEN 0
691 #define FWDX_OPTIONS 4
692 #define FWDX_OPT_DATA 5
696 #define FWDX_OPT_NONE 0
697 #define FWDX_OPT_XAUTH 1
700 * AUTHENTICATION suboptions
704 * Who is authenticating who ...
706 #define AUTH_CLIENT_TO_SERVER 0 /* Client authenticating server */
707 #define AUTH_SERVER_TO_CLIENT 1 /* Server authenticating client */
708 #define AUTH_WHO_MASK 1
711 * amount of authentication done
713 #define AUTH_HOW_ONE_WAY 0
714 #define AUTH_HOW_MUTUAL 2
715 #define AUTH_HOW_MASK 2
718 * should we be encrypting?
720 #define AUTH_ENCRYPT_OFF 0
721 #define AUTH_ENCRYPT_USING_TELOPT 4
722 #define AUTH_ENCRYPT_AFTER_EXCHANGE 16
723 #define AUTH_ENCRYPT_START_TLS 20
724 #define AUTH_ENCRYPT_MASK 20
727 * will we be forwarding?
728 * if we want to activate the use of this flag then
729 * #define USE_INI_CRED_FWD
731 #define INI_CRED_FWD_OFF 0
732 #define INI_CRED_FWD_ON 8
733 #define INI_CRED_FWD_MASK 8
734 #define USE_INI_CRED_FWD
736 #define AUTHTYPE_NULL 0
737 #define AUTHTYPE_KERBEROS_V4 1
738 #define AUTHTYPE_KERBEROS_V5 2
739 #define AUTHTYPE_SPX 3
740 #define AUTHTYPE_MINK 4
741 #define AUTHTYPE_SRP 5
742 #define AUTHTYPE_RSA 6
743 #define AUTHTYPE_SSL 7
744 #define AUTHTYPE_LOKI 10
745 #define AUTHTYPE_SSA 11
746 #define AUTHTYPE_KEA_SJ 12
747 #define AUTHTYPE_KEA_INTEG 13
748 #define AUTHTYPE_DSS 14
749 #define AUTHTYPE_NTLM 15
750 #define AUTHTYPE_GSSAPI_KRB5 16 /* Not allocated by IANA */
753 #endif /* AUTHTYPE_CNT */
754 #define AUTHTYPE_CNT 17
757 * AUTHTYPEs Last updated 21 March 1999
758 * from http://www.isi.edu/in-notes/iana/assignments/telnet-options
761 #define AUTHTYPE_AUTO 99
764 char *authtype_names[] = {
765 "NULL", /* RFC 2941 */
766 "KERBEROS_V4", /* RFC 2941 / 1411 */
767 "KERBEROS_V5", /* RFC 2941 */
768 "SPX", /* RFC 2941 (not Internet Standard) */
769 "MINK", /* RFC 2941 (not Internet Standard) */
770 "SRP", /* RFC 2944 */
771 "RSA", /* RFC 2941 (not Internet Standard) */
772 "SSL", /* RFC 2941 (not Internet Standard) */
773 "IANA_8", /* not assigned by IANA */
774 "IANA_9", /* not assigned by IANA */
775 "LOKI", /* RFC 2941 (not Internet Standard) */
777 "KEA_SJ", /* RFC 2951 */
778 "KEA_SJ_INTEG", /* RFC 2951 */
779 "DSS", /* RFC 2943 */
780 "NTLM", /* Kahn <louisk@microsoft.com> */
781 "GSSAPI-KRB5", /* experimental - altman */
784 char * authmode_names[] = {
785 "CLIENT_TO_SERVER|ONE_WAY",
786 "SERVER_TO_CLIENT|ONE_WAY",
787 "CLIENT_TO_SERVER|MUTUAL",
788 "SERVER_TO_CLIENT|MUTUAL",
789 "CLIENT_TO_SERVER|ONE_WAY|ENCRYPT_USING_TELOPT",
790 "SERVER_TO_CLIENT|ONE_WAY|ENCRYPT_USING_TELOPT",
791 "CLIENT_TO_SERVER|MUTUAL|ENCRYPT_USING_TELOPT",
792 "SERVER_TO_CLIENT|MUTUAL|ENCRYPT_USING_TELOPT",
793 "CLIENT_TO_SERVER|ONE_WAY|CRED_FWD",
794 "SERVER_TO_CLIENT|ONE_WAY|CRED_FWD",
795 "CLIENT_TO_SERVER|MUTUAL|CRED_FWD",
796 "SERVER_TO_CLIENT|MUTUAL|CRED_FWD",
797 "CLIENT_TO_SERVER|ONE_WAY|ENCRYPT_USING_TELOPT|CRED_FWD",
798 "SERVER_TO_CLIENT|ONE_WAY|ENCRYPT_USING_TELOPT|CRED_FWD",
799 "CLIENT_TO_SERVER|MUTUAL|ENCRYPT_USING_TELOPT|CRED_FWD",
800 "SERVER_TO_CLIENT|MUTUAL|ENCRYPT_USING_TELOPT|CRED_FWD",
801 "CLIENT_TO_SERVER|ONE_WAY|ENCRYPT_AFTER_EXCHANGE",
802 "SERVER_TO_CLIENT|ONE_WAY|ENCRYPT_AFTER_EXCHANGE",
803 "CLIENT_TO_SERVER|MUTUAL|ENCRYPT_AFTER_EXCHANGE",
804 "SERVER_TO_CLIENT|MUTUAL|ENCRYPT_AFTER_EXCHANGE",
805 "CLIENT_TO_SERVER|ONE_WAY|ENCRYPT_START_TLS",
806 "SERVER_TO_CLIENT|ONE_WAY|ENCRYPT_START_TLS",
807 "CLIENT_TO_SERVER|MUTUAL|ENCRYPT_START_TLS",
808 "SERVER_TO_CLIENT|MUTUAL|ENCRYPT_START_TLS",
809 "CLIENT_TO_SERVER|ONE_WAY|ENCRYPT_AFTER_EXCHANGE|CRED_FWD",
810 "SERVER_TO_CLIENT|ONE_WAY|ENCRYPT_AFTER_EXCHANGE|CRED_FWD",
811 "CLIENT_TO_SERVER|MUTUAL|ENCRYPT_AFTER_EXCHANGE|CRED_FWD",
812 "SERVER_TO_CLIENT|MUTUAL|ENCRYPT_AFTER_EXCHANGE|CRED_FWD",
813 "CLIENT_TO_SERVER|ONE_WAY|ENCRYPT_START_TLS|CRED_FWD",
814 "SERVER_TO_CLIENT|ONE_WAY|ENCRYPT_START_TLS|CRED_FWD",
815 "CLIENT_TO_SERVER|MUTUAL|ENCRYPT_START_TLS|CRED_FWD",
816 "SERVER_TO_CLIENT|MUTUAL|ENCRYPT_START_TLS|CRED_FWD",
820 extern char *authtype_names[];
821 extern char *authmode_names[];
823 #define AUTHMODE_CNT 32
825 #define AUTHTYPE_NAME_OK(x) ((unsigned int)(x) < AUTHTYPE_CNT)
826 #define AUTHTYPE_NAME(x) (AUTHTYPE_NAME_OK(x)?authtype_names[x]:"UNKNOWN")
828 #define AUTHMODE_NAME_OK(x) ((unsigned int)(x) < AUTHMODE_CNT)
829 #define AUTHMODE_NAME(x) (AUTHMODE_NAME_OK(x)?authmode_names[x]:"UNKNOWN")
831 /* Kerberos Authentication Message Identifiers */
832 #define KRB_AUTH 0 /* Authentication data follows */
833 #define KRB_REJECT 1 /* Rejected (reason might follow) */
834 #define KRB_ACCEPT 2 /* Accepted */
835 #define KRB4_CHALLENGE 3
836 #define KRB4_RESPONSE 4
837 #define KRB5_RESPONSE 3 /* Response for mutual auth. */
838 #define KRB5_FORWARD 4 /* Forwarded credentials follow */
839 #define KRB5_FORWARD_ACCEPT 5 /* Forwarded credentials accepted */
840 #define KRB5_FORWARD_REJECT 6 /* Forwarded credentials rejected */
841 #define KRB5_TLS_VERIFY 7 /* TLS Finished Msg verifier */
843 /* GSSAPI-KRB5 Authentication Message Identifiers */
844 #define GSS_AUTH_DATA 0 /* Authentication data follows */
845 #define GSS_REJECT 1 /* Rejected (reason might follow) */
846 #define GSS_ACCEPT 2 /* Accepted (username might follow) */
847 #define GSS_CONTINUE 3
849 /* Secure Remote Password Authentication Message Identifiers */
850 #define SRP_AUTH 0 /* Authentication data follows */
851 #define SRP_REJECT 1 /* Rejected (reason might follow) */
852 #define SRP_ACCEPT 2 /* Accepted */
853 #define SRP_CHALLENGE 3
854 #define SRP_RESPONSE 4
855 #define SRP_EXP 8 /* */
856 #define SRP_PARAMS 9 /* */
858 /* Telnet Auth using KEA and SKIPJACK */
860 #define KEA_CERTA_RA 1
861 #define KEA_CERTB_RB_IVB_NONCEB 2
862 #define KEA_IVA_RESPONSEB_NONCEA 3
863 #define KEA_RESPONSEA 4
865 /* Tim Hudson's SSL Authentication Message Identifiers */
870 /* Microsoft NTLM Authentication Message Identifiers */
872 #define NTLM_CHALLENGE 1
873 #define NTLM_RESPONSE 2
874 #define NTLM_ACCEPT 3
875 #define NTLM_REJECT 4
877 /* Generic Constants */
878 #define AUTH_SUCCESS 0
879 #define AUTH_FAILURE 255
882 * ENCRYPTion suboptions
884 #define ENCRYPT_IS 0 /* I pick encryption type ... */
885 #define ENCRYPT_SUPPORT 1 /* I support encryption types ... */
886 #define ENCRYPT_REPLY 2 /* Initial setup response */
887 #define ENCRYPT_START 3 /* Am starting to send encrypted */
888 #define ENCRYPT_END 4 /* Am ending encrypted */
889 #define ENCRYPT_REQSTART 5 /* Request you start encrypting */
890 #define ENCRYPT_REQEND 6 /* Request you send encrypting */
891 #define ENCRYPT_ENC_KEYID 7
892 #define ENCRYPT_DEC_KEYID 8
893 #define ENCRYPT_CNT 9
895 #define ENCTYPE_ANY 0
896 #define ENCTYPE_DES_CFB64 1
897 #define ENCTYPE_DES_OFB64 2
898 #define ENCTYPE_DES3_CFB64 3
899 #define ENCTYPE_DES3_OFB64 4
900 #define ENCTYPE_CAST5_40_CFB64 8
901 #define ENCTYPE_CAST5_40_OFB64 9
902 #define ENCTYPE_CAST128_CFB64 10
903 #define ENCTYPE_CAST128_OFB64 11
907 #define ENCTYPE_CNT 12
910 char *encrypt_names[] = {
911 "IS", "SUPPORT", "REPLY", "START", "END",
912 "REQUEST-START", "REQUEST-END", "ENC-KEYID", "DEC-KEYID",
915 char *enctype_names[] = {
917 "DES_CFB64", /* RFC 2952 */
918 "DES_OFB64", /* RFC 2953 */
919 "DES3_CFB64", /* RFC 2947 */
920 "DES3_OFB64", /* RFC 2948 */
924 "CAST5_40_CFB64", /* RFC 2950 */
925 "CAST5_40_OFB64", /* RFC 2949 */
926 "CAST128_CFB64", /* RFC 2950*/
927 "CAST128_OFB64", /* RFC 2949 */
931 extern char *encrypt_names[];
932 extern char *enctype_names[];
935 #define ENCRYPT_NAME_OK(x) ((unsigned int)(x) < ENCRYPT_CNT)
936 #define ENCRYPT_NAME(x) (ENCRYPT_NAME_OK(x)?encrypt_names[x]:"UNKNOWN")
938 #define ENCTYPE_NAME_OK(x) ((unsigned int)(x) < ENCTYPE_CNT)
939 #define ENCTYPE_NAME(x) (ENCTYPE_NAME_OK(x)?enctype_names[x]:"UNKNOWN")
941 /* For setting the state of validUser */
943 #define AUTH_REJECT 0 /* Rejected */
944 #define AUTH_UNKNOWN 1 /* We don't know who he is, but he's okay */
945 #define AUTH_OTHER 2 /* We know him, but not his name */
946 #define AUTH_USER 3 /* We know he name */
947 #define AUTH_VALID 4 /* We know him, and he needs no password */
949 /* Kermit Option Subnegotiations */
951 #define KERMIT_START 0
952 #define KERMIT_STOP 1
953 #define KERMIT_REQ_START 2
954 #define KERMIT_REQ_STOP 3
956 #define KERMIT_RESP_START 8
957 #define KERMIT_RESP_STOP 9
959 /* For SET TELNET AUTH HOW */
960 #define TN_AUTH_HOW_ANY 0
961 #define TN_AUTH_HOW_ONE_WAY 1
962 #define TN_AUTH_HOW_MUTUAL 2
964 /* For SET TELNET AUTH ENCRYPT */
965 #define TN_AUTH_ENC_ANY 0
966 #define TN_AUTH_ENC_NONE 1
967 #define TN_AUTH_ENC_TELOPT 2
968 #define TN_AUTH_ENC_EXCH 3 /* not used in Kermit */
969 #define TN_AUTH_ENC_TLS 4
971 /* Telnet protocol functions defined in C-Kermit */
973 _PROTOTYP( int tn_ini, (void) ); /* Telnet protocol support */
974 _PROTOTYP( int tn_reset, (void));
975 _PROTOTYP( int tn_set_modes, (void));
976 _PROTOTYP( int tn_sopt, (int, int) );
977 _PROTOTYP( int tn_doop, (CHAR, int, int (*)(int) ) );
978 _PROTOTYP( int tn_sttyp, (void) );
979 _PROTOTYP( int tn_snenv, (CHAR *, int) ) ;
980 _PROTOTYP( int tn_rnenv, (CHAR *, int) ) ;
981 _PROTOTYP( int tn_wait, (char *) ) ;
982 _PROTOTYP( int tn_push, (void) ) ;
983 _PROTOTYP( int tnsndbrk, (void) );
984 _PROTOTYP( VOID tn_debug, (char *));
985 _PROTOTYP( int tn_hex, (CHAR *, int, CHAR *, int));
986 _PROTOTYP( unsigned char * tn_get_display, (void));
988 _PROTOTYP( int tn_siks, (int) );
989 _PROTOTYP( int iks_wait, (int, int) );
990 #endif /* IKS_OPTION */
992 _PROTOTYP( int tn_snaws, (void) );
995 _PROTOTYP( int tn_sxdisploc, (void) );
996 #endif /* CK_XDISPLOC */
998 _PROTOTYP( int tn_sndloc, (void) );
999 #endif /* CK_SNDLOC */
1002 typedef struct xauth {
1003 unsigned short family;
1004 unsigned short address_length;
1006 unsigned short number_length;
1008 unsigned short name_length;
1010 unsigned short data_length;
1017 #define FamilyInternet 0
1018 #define FamilyDECnet 1
1019 #define FamilyChaos 2
1021 # define FamilyLocal (256) /* not part of X standard (i.e. X.h) */
1022 # define FamilyWild (65535)
1023 # define FamilyNetname (254) /* not part of X standard */
1024 # define FamilyKrb5Principal (253) /* Kerberos 5 principal name */
1025 # define FamilyLocalHost (252) /* for local non-net authentication */
1026 char *XauFileName();
1029 FILE* /* auth_file */
1033 FILE* /* auth_file */,
1037 Xauth *XauGetAuthByName(
1038 const char* /* display_name */
1041 Xauth *XauGetAuthByAddr(
1042 unsigned int /* family */,
1043 unsigned int /* address_length */,
1044 const char* /* address */,
1045 unsigned int /* number_length */,
1046 const char* /* number */,
1047 unsigned int /* name_length */,
1048 const char* /* name */
1051 void XauDisposeAuth(
1056 _PROTOTYP( int fwdx_create_listen_socket,(int));
1057 _PROTOTYP( int fwdx_open_client_channel,(int));
1058 _PROTOTYP( int fwdx_open_server_channel,(VOID));
1059 _PROTOTYP( int fwdx_close_channel,(int));
1060 _PROTOTYP( int fwdx_write_data_to_channel,(int, char *,int));
1061 _PROTOTYP( int fwdx_send_data_from_channel,(int, char *,int));
1062 _PROTOTYP( int fwdx_close_all,(VOID));
1063 _PROTOTYP( int fwdx_tn_sb,(unsigned char *, int));
1064 _PROTOTYP( int tn_sndfwdx, (void));
1065 _PROTOTYP( int fwdx_send_close,(int));
1066 _PROTOTYP( int fwdx_send_open,(int));
1067 _PROTOTYP( int fwdx_client_reply_options,(char *, int));
1068 _PROTOTYP( int fwdx_send_options,(VOID));
1069 _PROTOTYP( VOID fwdx_check_sockets,(fd_set *));
1070 _PROTOTYP( int fwdx_init_fd_set,(fd_set *));
1071 _PROTOTYP( int fwdx_authorize_channel, (int, unsigned char *, int));
1072 _PROTOTYP( int fwdx_create_fake_xauth, (char *, int, int));
1073 _PROTOTYP( int fwdx_send_xauth, (VOID));
1074 _PROTOTYP( int fwdx_server_avail, (VOID));
1076 _PROTOTYP( VOID fwdx_thread,(VOID *));
1078 #endif /* CK_FORWARD_X */
1081 #define TNC_C2S_SIGNATURE 0
1082 #define TNC_C2S_SET_BAUDRATE 1
1083 #define TNC_C2S_SET_DATASIZE 2
1084 #define TNC_C2S_SET_PARITY 3
1085 #define TNC_C2S_SET_STOPSIZE 4
1086 #define TNC_C2S_SET_CONTROL 5
1087 #define TNC_C2S_NOTIFY_LINESTATE 6
1088 #define TNC_C2S_NOTIFY_MODEMSTATE 7
1089 #define TNC_C2S_FLOW_SUSPEND 8
1090 #define TNC_C2S_FLOW_RESUME 9
1091 #define TNC_C2S_SET_LS_MASK 10
1092 #define TNC_C2S_SET_MS_MASK 11
1093 #define TNC_C2S_PURGE 12
1094 #define TNC_S2C_SIGNATURE 100
1095 #define TNC_S2C_SET_BAUDRATE 101
1096 #define TNC_S2C_SET_DATASIZE 102
1097 #define TNC_S2C_SET_PARITY 103
1098 #define TNC_S2C_SET_STOPSIZE 104
1099 #define TNC_S2C_SET_CONTROL 105
1100 #define TNC_S2C_SEND_LS 106
1101 #define TNC_S2C_SEND_MS 107
1102 #define TNC_S2C_FLOW_SUSPEND 108
1103 #define TNC_S2C_FLOW_RESUME 109
1104 #define TNC_S2C_SET_LS_MASK 110
1105 #define TNC_S2C_SET_MS_MASK 111
1106 #define TNC_S2C_PURGE 112
1108 /* The COMPORT values are not defined in RFC 2217 */
1109 #define TNC_BPS_REQUEST 0
1110 #define TNC_BPS_300 3
1111 #define TNC_BPS_600 4
1112 #define TNC_BPS_1200 5
1113 #define TNC_BPS_2400 6
1114 #define TNC_BPS_4800 7
1115 #define TNC_BPS_9600 8
1116 #define TNC_BPS_14400 9
1117 #define TNC_BPS_19200 10
1118 #define TNC_BPS_28800 11
1119 #define TNC_BPS_38400 12
1120 #define TNC_BPS_57600 13
1121 #define TNC_BPS_115200 14
1122 #define TNC_BPS_230400 15
1123 #define TNC_BPS_460800 16
1125 #define TNC_DS_REQUEST 0
1131 #define TNC_PAR_REQUEST 0
1132 #define TNC_PAR_NONE 1
1133 #define TNC_PAR_ODD 2
1134 #define TNC_PAR_EVEN 3
1135 #define TNC_PAR_MARK 4
1136 #define TNC_PAR_SPACE 5
1138 #define TNC_SB_REQUEST 0
1140 #define TNC_SB_1_5 3
1143 #define TNC_CTL_OFLOW_REQUEST 0
1144 #define TNC_CTL_OFLOW_NONE 1
1145 #define TNC_CTL_OFLOW_XON_XOFF 2
1146 #define TNC_CTL_OFLOW_RTS_CTS 3
1147 #define TNC_CTL_OFLOW_DCD 17
1148 #define TNC_CTL_OFLOW_DSR 19
1150 #define TNC_CTL_BREAK_REQUEST 4
1151 #define TNC_CTL_BREAK_ON 5
1152 #define TNC_CTL_BREAK_OFF 6
1154 #define TNC_CTL_DTR_REQUEST 7
1155 #define TNC_CTL_DTR_ON 8
1156 #define TNC_CTL_DTR_OFF 9
1158 #define TNC_CTL_RTS_REQUEST 10
1159 #define TNC_CTL_RTS_ON 11
1160 #define TNC_CTL_RTS_OFF 12
1162 #define TNC_CTL_IFLOW_REQUEST 13
1163 #define TNC_CTL_IFLOW_NONE 14
1164 #define TNC_CTL_IFLOW_XON_XOFF 15
1165 #define TNC_CTL_IFLOW_RTS_CTS 16
1166 #define TNC_CTL_IFLOW_DTR 18
1168 #define TNC_MS_DATA_READY 1
1169 #define TNC_MS_OVERRUN_ERROR 2
1170 #define TNC_MS_PARITY_ERROR 4
1171 #define TNC_MS_FRAME_ERROR 8
1172 #define TNC_MS_BREAK_ERROR 16
1173 #define TNC_MS_HR_EMPTY 32
1174 #define TNC_MS_SR_EMPTY 64
1175 #define TNC_MS_TIMEOUT_ERROR 128
1177 #define TNC_MS_CTS_DELTA 1
1178 #define TNC_MS_DSR_DELTA 2
1179 #define TNC_MS_EDGE_RING 4
1180 #define TNC_MS_RLSD_DELTA 8
1181 #define TNC_MS_CTS_SIG 16
1182 #define TNC_MS_DSR_SIG 32
1183 #define TNC_MS_RI_SIG 64
1184 #define TNC_MS_RLSD_SIG 128
1186 #define TNC_PURGE_RECEIVE 1
1187 #define TNC_PURGE_TRANSMIT 2
1188 #define TNC_PURGE_BOTH 3
1191 char *tnc_names[] = {
1192 "SIGNATURE", "SET-BAUDRATE", "SET-DATARATE", "SET-PARITY", "SET-STOPSIZE",
1193 "SET-CONTROL", "NOTIFY-LINESTATE", "NOTIFY-MODEMSTATE",
1194 "FLOWCONTROL-SUSPEND", "FLOWCONTROL-RESUME", "SET-LINESTATE-MASK",
1195 "SET-MODEMSTATE-MASK", "PURGE-DATA",
1199 extern char *tnc_names[];
1202 #define TNC_NAME_OK(x) ((x) >= 0 && (x) <= 12 || (x) >= 100 && (x) <= 112)
1203 #define TNC_NAME(x) \
1204 (TNC_NAME_OK(x)?tnc_names[(x)>=100?(x)-100:(x)]:"UNKNOWN")
1206 _PROTOTYP(int tnc_init,(void));
1207 _PROTOTYP(int tnc_wait,(CHAR *, int));
1208 _PROTOTYP(int tnc_tn_sb,(CHAR *,int));
1209 _PROTOTYP(CONST char * tnc_get_signature, (void));
1210 _PROTOTYP(int tnc_send_signature, (char *));
1211 _PROTOTYP(int tnc_set_baud,(long));
1212 _PROTOTYP(int tnc_get_baud,(void));
1213 _PROTOTYP(int tnc_set_datasize,(int));
1214 _PROTOTYP(int tnc_get_datasize,(void));
1215 _PROTOTYP(int tnc_set_parity,(int));
1216 _PROTOTYP(int tnc_get_parity,(void));
1217 _PROTOTYP(int tnc_set_stopsize,(int));
1218 _PROTOTYP(int tnc_get_stopsize,(void));
1219 _PROTOTYP(int tnc_set_oflow,(int));
1220 _PROTOTYP(int tnc_get_oflow,(void));
1221 _PROTOTYP(int tnc_set_iflow,(int));
1222 _PROTOTYP(int tnc_get_iflow,(void));
1223 _PROTOTYP(int tnc_set_break_state,(int));
1224 _PROTOTYP(int tnc_get_break_state,(void));
1225 _PROTOTYP(int tnc_set_dtr_state,(int));
1226 _PROTOTYP(int tnc_get_dtr_state,(void));
1227 _PROTOTYP(int tnc_set_rts_state,(int));
1228 _PROTOTYP(int tnc_get_rts_state,(void));
1229 _PROTOTYP(int tnc_set_ls_mask,(int));
1230 _PROTOTYP(int tnc_get_ls_mask,(void));
1231 _PROTOTYP(int tnc_get_ls,(void));
1232 _PROTOTYP(int tnc_set_ms_mask,(int));
1233 _PROTOTYP(int tnc_get_ms_mask,(void));
1234 _PROTOTYP(int tnc_get_ms,(void));
1235 _PROTOTYP(int tnc_send_purge_data,(int));
1236 _PROTOTYP(int tnc_flow_suspended,(void));
1237 _PROTOTYP(int tnc_suspend_flow,(void));
1238 _PROTOTYP(int tnc_resume_flow,(void));
1240 /* The following methods are to be called by ck?tio.c routines */
1241 _PROTOTYP(int tnsetflow,(int));
1242 _PROTOTYP(int tnsettings,(int,int));
1243 _PROTOTYP(int tngmdm,(void));
1244 _PROTOTYP(int tnsndb,(long));
1245 _PROTOTYP(int istncomport,(void));
1246 _PROTOTYP(int tn_sndcomport,(void));
1247 #endif /* TN_COMPORT */
1249 #ifndef CKCTEL_C /* These are declared in ckctel.c */
1250 extern int tn_init; /* Telnet protocol initialized flag */
1251 extern char *tn_term; /* Terminal type override */
1252 extern int sstelnet; /* Server side telnet? */
1253 extern int tn_deb; /* Telnet option debugging flag */
1254 extern int tn_auth_krb5_des_bug; /* Telnet BUG */
1255 #endif /* CKCTEL_C */
1257 #define TN_MSG_LEN 12292
1259 #endif /* CKCTEL_H */