1 2 package ch.ethz.ssh2.packets; 3 4 10 public class PacketGlobalCancelForwardRequest 11 { 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 { 20 this.wantReply = wantReply; 21 this.bindAddress = bindAddress; 22 this.bindPort = bindPort; 23 } 24 25 public byte[] getPayload() 26 { 27 if (payload == null) 28 { 29 TypesWriter tw = new TypesWriter(); 30 tw.writeByte(Packets.SSH_MSG_GLOBAL_REQUEST); 31 32 tw.writeString("cancel-tcpip-forward"); 33 tw.writeBoolean(wantReply); 34 tw.writeString(bindAddress); 35 tw.writeUINT32(bindPort); 36 37 payload = tw.getBytes(); 38 } 39 return payload; 40 } 41 } 42 | Popular Tags |