1/* 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 22 unchanged lines hidden (view full) --- 31 * SUCH DAMAGE. 32 */ 33 34#ifndef lint 35#if 0 36static const char sccsid[] = "@(#)termstat.c 8.2 (Berkeley) 5/30/95"; 37#endif 38static const char rcsid[] = |
39 "$FreeBSD: head/contrib/telnet/telnetd/termstat.c 81965 2001-08-20 12:28:40Z markm $"; |
40#endif /* not lint */ 41 42#include "telnetd.h" 43 44#if defined(ENCRYPTION) 45#include <libtelnet/encrypt.h> 46#endif 47 --- 118 unchanged lines hidden (view full) --- 166 */ 167 if (alwayslinemode && linemode && !uselinemode) { 168 uselinemode = 1; 169 tty_setlinemode(uselinemode); 170 } 171 172 if (uselinemode) { 173 /* |
174 * Check for state of BINARY options. |
175 * 176 * We only need to do the binary dance if we are actually going 177 * to use linemode. As this confuses some telnet clients 178 * that don't support linemode, and doesn't gain us 179 * anything, we don't do it unless we're doing linemode. 180 * -Crh (henrich@msu.edu) |
181 */ |
182 |
183 if (tty_isbinaryin()) { 184 if (his_want_state_is_wont(TELOPT_BINARY)) 185 send_do(TELOPT_BINARY, 1); 186 } else { 187 if (his_want_state_is_will(TELOPT_BINARY)) 188 send_dont(TELOPT_BINARY, 1); 189 } |
190 |
191 if (tty_isbinaryout()) { 192 if (my_want_state_is_wont(TELOPT_BINARY)) 193 send_will(TELOPT_BINARY, 1); 194 } else { 195 if (my_want_state_is_will(TELOPT_BINARY)) 196 send_wont(TELOPT_BINARY, 1); 197 } |
198 } |
199 200#ifdef ENCRYPTION 201 /* 202 * If the terminal is not echoing, but editing is enabled, 203 * something like password input is going to happen, so 204 * if we the other side is not currently sending encrypted 205 * data, ask the other side to start encrypting. 206 */ --- 463 unchanged lines hidden --- |