1 package ch.ethz.ssh2.packets; 2 3 4 10 public class PacketSessionSubsystemRequest 11 { 12 byte[] payload; 13 14 public int recipientChannelID; 15 public boolean wantReply; 16 public String subsystem; 17 18 public PacketSessionSubsystemRequest(int recipientChannelID, boolean wantReply, String subsystem) 19 { 20 this.recipientChannelID = recipientChannelID; 21 this.wantReply = wantReply; 22 this.subsystem = subsystem; 23 } 24 25 public byte[] getPayload() 26 { 27 if (payload == null) 28 { 29 TypesWriter tw = new TypesWriter(); 30 tw.writeByte(Packets.SSH_MSG_CHANNEL_REQUEST); 31 tw.writeUINT32(recipientChannelID); 32 tw.writeString("subsystem"); 33 tw.writeBoolean(wantReply); 34 tw.writeString(subsystem); 35 payload = tw.getBytes(); 36 tw.getBytes(payload); 37 } 38 return payload; 39 } 40 } 41 | Popular Tags |