273
|
1 /*
|
|
2 * Copyright (c) 2006-2011 Christian Plattner. All rights reserved.
|
|
3 * Please refer to the LICENSE.txt for licensing details.
|
|
4 */
|
|
5 package ch.ethz.ssh2.packets;
|
|
6
|
|
7 /**
|
|
8 * @author Christian Plattner
|
|
9 * @version $Id: PacketGlobalForwardRequest.java 160 2014-05-01 14:30:26Z dkocher@sudo.ch $
|
|
10 */
|
|
11 public final class PacketGlobalForwardRequest {
|
|
12
|
|
13 private final byte[] payload;
|
|
14
|
|
15 public PacketGlobalForwardRequest(boolean wantReply, String bindAddress, int bindPort) {
|
|
16 TypesWriter tw = new TypesWriter();
|
|
17 tw.writeByte(Packets.SSH_MSG_GLOBAL_REQUEST);
|
|
18 tw.writeString("tcpip-forward");
|
|
19 tw.writeBoolean(wantReply);
|
|
20 tw.writeString(bindAddress);
|
|
21 tw.writeUINT32(bindPort);
|
|
22 payload = tw.getBytes();
|
|
23 }
|
|
24
|
|
25 public byte[] getPayload() {
|
|
26 return payload;
|
|
27 }
|
|
28 }
|