version 1.20.2.1, 2006/09/30 04:06:51 |
version 1.21, 2006/03/19 18:51:19 |
|
|
/* $OpenBSD$ */ |
|
/* |
/* |
* 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 |
|
|
* suitable code. |
* suitable code. |
*/ |
*/ |
|
|
#include <sys/types.h> |
#include "includes.h" |
|
|
#include <errno.h> |
|
#include <string.h> |
|
#include <termios.h> |
#include <termios.h> |
#include <stdarg.h> |
|
|
|
#include "packet.h" |
#include "packet.h" |
#include "log.h" |
#include "log.h" |
#include "ssh1.h" |
#include "ssh1.h" |
#include "compat.h" |
#include "compat.h" |
#include "buffer.h" |
#include "buffer.h" |
|
#include "bufaux.h" |
|
|
#define TTY_OP_END 0 |
#define TTY_OP_END 0 |
/* |
/* |
|
|
n_bytes += 4; |
n_bytes += 4; |
baud = packet_get_int(); |
baud = packet_get_int(); |
debug3("tty_parse_modes: ispeed %d", baud); |
debug3("tty_parse_modes: ispeed %d", baud); |
if (failure != -1 && |
if (failure != -1 && cfsetispeed(&tio, baud_to_speed(baud)) == -1) |
cfsetispeed(&tio, baud_to_speed(baud)) == -1) |
|
error("cfsetispeed failed for %d", baud); |
error("cfsetispeed failed for %d", baud); |
break; |
break; |
|
|
|
|
n_bytes += 4; |
n_bytes += 4; |
baud = packet_get_int(); |
baud = packet_get_int(); |
debug3("tty_parse_modes: ospeed %d", baud); |
debug3("tty_parse_modes: ospeed %d", baud); |
if (failure != -1 && |
if (failure != -1 && cfsetospeed(&tio, baud_to_speed(baud)) == -1) |
cfsetospeed(&tio, baud_to_speed(baud)) == -1) |
|
error("cfsetospeed failed for %d", baud); |
error("cfsetospeed failed for %d", baud); |
break; |
break; |
|
|
|
|
/* |
/* |
* It is a truly undefined opcode (160 to 255). |
* It is a truly undefined opcode (160 to 255). |
* We have no idea about its arguments. So we |
* We have no idea about its arguments. So we |
* must stop parsing. Note that some data |
* must stop parsing. Note that some data may be |
* may be left in the packet; hopefully there |
* left in the packet; hopefully there is nothing |
* is nothing more coming after the mode data. |
* more coming after the mode data. |
*/ |
*/ |
logit("parse_tty_modes: unknown opcode %d", |
logit("parse_tty_modes: unknown opcode %d", opcode); |
opcode); |
|
goto set; |
goto set; |
} |
} |
} else { |
} else { |
|
|
(void) packet_get_int(); |
(void) packet_get_int(); |
break; |
break; |
} else { |
} else { |
logit("parse_tty_modes: unknown opcode %d", |
logit("parse_tty_modes: unknown opcode %d", opcode); |
opcode); |
|
goto set; |
goto set; |
} |
} |
} |
} |