comparison src/com/trilead/ssh2/packets/PacketGlobalCancelForwardRequest.java @ 0:0ce5cc452d02

initial version
author Carl Byington <carl@five-ten-sg.com>
date Thu, 22 May 2014 10:41:19 -0700
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:0ce5cc452d02
1
2 package com.trilead.ssh2.packets;
3
4 /**
5 * PacketGlobalCancelForwardRequest.
6 *
7 * @author Christian Plattner, plattner@trilead.com
8 * @version $Id: PacketGlobalCancelForwardRequest.java,v 1.1 2007/10/15 12:49:55
9 * cplattne Exp $
10 */
11 public class PacketGlobalCancelForwardRequest {
12 byte[] payload;
13
14 public boolean wantReply;
15 public String bindAddress;
16 public int bindPort;
17
18 public PacketGlobalCancelForwardRequest(boolean wantReply, String bindAddress, int bindPort) {
19 this.wantReply = wantReply;
20 this.bindAddress = bindAddress;
21 this.bindPort = bindPort;
22 }
23
24 public byte[] getPayload() {
25 if (payload == null) {
26 TypesWriter tw = new TypesWriter();
27 tw.writeByte(Packets.SSH_MSG_GLOBAL_REQUEST);
28 tw.writeString("cancel-tcpip-forward");
29 tw.writeBoolean(wantReply);
30 tw.writeString(bindAddress);
31 tw.writeUINT32(bindPort);
32 payload = tw.getBytes();
33 }
34
35 return payload;
36 }
37 }