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