comparison src/ch/ethz/ssh2/packets/PacketOpenDirectTCPIPChannel.java @ 308:42b15aaa7ac7 ganymed

merge
author Carl Byington <carl@five-ten-sg.com>
date Wed, 30 Jul 2014 14:21:50 -0700
parents 071eccdff8ea
children
comparison
equal deleted inserted replaced
306:90e47d99ea54 308:42b15aaa7ac7
13 13
14 public PacketOpenDirectTCPIPChannel(int channelID, int initialWindowSize, int maxPacketSize, 14 public PacketOpenDirectTCPIPChannel(int channelID, int initialWindowSize, int maxPacketSize,
15 String host_to_connect, int port_to_connect, String originator_IP_address, 15 String host_to_connect, int port_to_connect, String originator_IP_address,
16 int originator_port) { 16 int originator_port) {
17 TypesWriter tw = new TypesWriter(); 17 TypesWriter tw = new TypesWriter();
18
19 tw.writeByte(Packets.SSH_MSG_CHANNEL_OPEN); 18 tw.writeByte(Packets.SSH_MSG_CHANNEL_OPEN);
20 tw.writeString("direct-tcpip"); 19 tw.writeString("direct-tcpip");
21 tw.writeUINT32(channelID); 20 tw.writeUINT32(channelID);
22 tw.writeUINT32(initialWindowSize); 21 tw.writeUINT32(initialWindowSize);
23 tw.writeUINT32(maxPacketSize); 22 tw.writeUINT32(maxPacketSize);
24 tw.writeString(host_to_connect); 23 tw.writeString(host_to_connect);
25 tw.writeUINT32(port_to_connect); 24 tw.writeUINT32(port_to_connect);
26 tw.writeString(originator_IP_address); 25 tw.writeString(originator_IP_address);
27 tw.writeUINT32(originator_port); 26 tw.writeUINT32(originator_port);
28
29 payload = tw.getBytes(); 27 payload = tw.getBytes();
30 } 28 }
31 29
32 public byte[] getPayload() { 30 public byte[] getPayload() {
33 return payload; 31 return payload;