01: package ch.ethz.ssh2.packets;
02:
03: /**
04: * PacketGlobalCancelForwardRequest.
05: *
06: * @author Christian Plattner, plattner@inf.ethz.ch
07: * @version $Id: PacketGlobalCancelForwardRequest.java,v 1.1 2005/12/05 17:13:27 cplattne Exp $
08: */
09: public class PacketGlobalCancelForwardRequest {
10: byte[] payload;
11:
12: public boolean wantReply;
13: public String bindAddress;
14: public int bindPort;
15:
16: public PacketGlobalCancelForwardRequest(boolean wantReply,
17: String bindAddress, int bindPort) {
18: this .wantReply = wantReply;
19: this .bindAddress = bindAddress;
20: this .bindPort = bindPort;
21: }
22:
23: public byte[] getPayload() {
24: if (payload == null) {
25: TypesWriter tw = new TypesWriter();
26: tw.writeByte(Packets.SSH_MSG_GLOBAL_REQUEST);
27:
28: tw.writeString("cancel-tcpip-forward");
29: tw.writeBoolean(wantReply);
30: tw.writeString(bindAddress);
31: tw.writeUINT32(bindPort);
32:
33: payload = tw.getBytes();
34: }
35: return payload;
36: }
37: }
|