version 1.6.2.4, 2001/03/21 18:53:19 |
version 1.7, 2000/06/20 01:39:45 |
|
|
* Author: Tatu Ylonen <ylo@cs.hut.fi> |
* Author: Tatu Ylonen <ylo@cs.hut.fi> |
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
* All rights reserved |
* All rights reserved |
|
* Created: Tue Mar 21 15:59:15 1995 ylo |
* Encoding and decoding of terminal modes in a portable way. |
* Encoding and decoding of terminal modes in a portable way. |
* Much of the format is defined in ttymodes.h; it is included multiple times |
* Much of the format is defined in ttymodes.h; it is included multiple times |
* into this file with the appropriate macro definitions to generate the |
* into this file with the appropriate macro definitions to generate the |
* suitable code. |
* suitable code. |
* |
|
* As far as I am concerned, the code I have written for this software |
|
* can be used freely for any purpose. Any derived versions of this |
|
* software must be clearly marked as such, and if the derived work is |
|
* incompatible with the protocol description in the RFC file, it must be |
|
* called by a name other than "ssh" or "Secure Shell". |
|
*/ |
*/ |
|
|
#include "includes.h" |
#include "includes.h" |
RCSID("$OpenBSD$"); |
RCSID("$OpenBSD$"); |
|
|
#include "packet.h" |
#include "packet.h" |
#include "log.h" |
#include "ssh.h" |
#include "ssh1.h" |
|
|
|
#define TTY_OP_END 0 |
#define TTY_OP_END 0 |
#define TTY_OP_ISPEED 192 /* int follows */ |
#define TTY_OP_ISPEED 192 /* int follows */ |
|
|
packet_put_char(OP); packet_put_char(tio.c_cc[NAME]); |
packet_put_char(OP); packet_put_char(tio.c_cc[NAME]); |
#define TTYMODE(NAME, FIELD, OP) \ |
#define TTYMODE(NAME, FIELD, OP) \ |
packet_put_char(OP); packet_put_char((tio.FIELD & NAME) != 0); |
packet_put_char(OP); packet_put_char((tio.FIELD & NAME) != 0); |
|
#define SGTTYCHAR(NAME, OP) |
|
#define SGTTYMODE(NAME, FIELD, OP) |
|
#define SGTTYMODEN(NAME, FIELD, OP) |
|
|
#include "ttymodes.h" |
#include "ttymodes.h" |
|
|
#undef TTYCHAR |
#undef TTYCHAR |
#undef TTYMODE |
#undef TTYMODE |
|
#undef SGTTYCHAR |
|
#undef SGTTYMODE |
|
#undef SGTTYMODEN |
|
|
/* Mark end of mode data. */ |
/* Mark end of mode data. */ |
packet_put_char(TTY_OP_END); |
packet_put_char(TTY_OP_END); |
|
|
else \ |
else \ |
tio.FIELD &= ~NAME; \ |
tio.FIELD &= ~NAME; \ |
break; |
break; |
|
#define SGTTYCHAR(NAME, OP) |
|
#define SGTTYMODE(NAME, FIELD, OP) |
|
#define SGTTYMODEN(NAME, FIELD, OP) |
|
|
#include "ttymodes.h" |
#include "ttymodes.h" |
|
|
#undef TTYCHAR |
#undef TTYCHAR |
#undef TTYMODE |
#undef TTYMODE |
|
#undef SGTTYCHAR |
|
#undef SGTTYMODE |
|
#undef SGTTYMODEN |
|
|
default: |
default: |
debug("Ignoring unsupported tty mode opcode %d (0x%x)", |
debug("Ignoring unsupported tty mode opcode %d (0x%x)", |