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 * PacketSessionStartShell. 9 * 10 * @author Christian Plattner 11 * @version 2.50, 03/15/10 12 */ 13 public class PacketSessionStartShell 14 { 15 byte[] payload; 16 17 public int recipientChannelID; 18 public boolean wantReply; 19 PacketSessionStartShell(int recipientChannelID, boolean wantReply)20 public PacketSessionStartShell(int recipientChannelID, boolean wantReply) 21 { 22 this.recipientChannelID = recipientChannelID; 23 this.wantReply = wantReply; 24 } 25 getPayload()26 public byte[] getPayload() 27 { 28 if (payload == null) 29 { 30 TypesWriter tw = new TypesWriter(); 31 tw.writeByte(Packets.SSH_MSG_CHANNEL_REQUEST); 32 tw.writeUINT32(recipientChannelID); 33 tw.writeString("shell"); 34 tw.writeBoolean(wantReply); 35 payload = tw.getBytes(); 36 } 37 return payload; 38 } 39 } 40