ch.ethz.ssh2.transport
Class TransportConnection

java.lang.Object
  extended bych.ethz.ssh2.transport.TransportConnection

public class TransportConnection
extends java.lang.Object

TransportConnection.

Version:
$Id: TransportConnection.java,v 1.8 2006/02/14 19:43:15 cplattne Exp $
Author:
Christian Plattner, plattner@inf.ethz.ch

Field Summary
(package private)  CipherInputStream cis
           
(package private)  CipherOutputStream cos
           
(package private)  ClientServerHello csh
           
private static Logger log
           
(package private)  MAC recv_mac
           
(package private)  byte[] recv_mac_buffer
           
(package private)  byte[] recv_mac_buffer_cmp
           
(package private)  byte[] recv_packet_header_buffer
           
(package private)  boolean recv_packet_header_present
           
(package private)  int recv_padd_blocksize
           
(package private)  byte[] recv_padding_buffer
           
(package private)  int recv_seq_number
           
(package private)  java.security.SecureRandom rnd
           
(package private)  MAC send_mac
           
(package private)  byte[] send_mac_buffer
           
(package private)  byte[] send_packet_header_buffer
           
(package private)  int send_padd_blocksize
           
(package private)  byte[] send_padding_buffer
           
(package private)  int send_seq_number
           
(package private)  boolean useRandomPadding
           
 
Constructor Summary
TransportConnection(java.io.InputStream is, java.io.OutputStream os, java.security.SecureRandom rnd)
           
 
Method Summary
 void changeRecvCipher(BlockCipher bc, MAC mac)
           
 void changeSendCipher(BlockCipher bc, MAC mac)
           
 int getPacketOverheadEstimate()
           
 int peekNextMessageLength()
           
 int receiveMessage(byte[] buffer, int off, int len)
           
 void sendMessage(byte[] message)
           
 void sendMessage(byte[] message, int off, int len)
           
 void sendMessage(byte[] message, int off, int len, int padd)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static final Logger log

send_seq_number

int send_seq_number

recv_seq_number

int recv_seq_number

cis

CipherInputStream cis

cos

CipherOutputStream cos

useRandomPadding

boolean useRandomPadding

send_mac

MAC send_mac

send_mac_buffer

byte[] send_mac_buffer

send_padd_blocksize

int send_padd_blocksize

recv_mac

MAC recv_mac

recv_mac_buffer

byte[] recv_mac_buffer

recv_mac_buffer_cmp

byte[] recv_mac_buffer_cmp

recv_padd_blocksize

int recv_padd_blocksize

send_padding_buffer

final byte[] send_padding_buffer

send_packet_header_buffer

final byte[] send_packet_header_buffer

recv_padding_buffer

final byte[] recv_padding_buffer

recv_packet_header_buffer

final byte[] recv_packet_header_buffer

recv_packet_header_present

boolean recv_packet_header_present

csh

ClientServerHello csh

rnd

final java.security.SecureRandom rnd
Constructor Detail

TransportConnection

public TransportConnection(java.io.InputStream is,
                           java.io.OutputStream os,
                           java.security.SecureRandom rnd)
Method Detail

changeRecvCipher

public void changeRecvCipher(BlockCipher bc,
                             MAC mac)

changeSendCipher

public void changeSendCipher(BlockCipher bc,
                             MAC mac)

sendMessage

public void sendMessage(byte[] message)
                 throws java.io.IOException
Throws:
java.io.IOException

sendMessage

public void sendMessage(byte[] message,
                        int off,
                        int len)
                 throws java.io.IOException
Throws:
java.io.IOException

getPacketOverheadEstimate

public int getPacketOverheadEstimate()

sendMessage

public void sendMessage(byte[] message,
                        int off,
                        int len,
                        int padd)
                 throws java.io.IOException
Throws:
java.io.IOException

peekNextMessageLength

public int peekNextMessageLength()
                          throws java.io.IOException
Throws:
java.io.IOException

receiveMessage

public int receiveMessage(byte[] buffer,
                          int off,
                          int len)
                   throws java.io.IOException
Throws:
java.io.IOException