1 2 package ch.ethz.ssh2.packets; 3 4 10 public class PacketSessionX11Request 11 { 12 byte[] payload; 13 14 public int recipientChannelID; 15 public boolean wantReply; 16 17 public boolean singleConnection; 18 String x11AuthenticationProtocol; 19 String x11AuthenticationCookie; 20 int x11ScreenNumber; 21 22 public PacketSessionX11Request(int recipientChannelID, boolean wantReply, boolean singleConnection, 23 String x11AuthenticationProtocol, String x11AuthenticationCookie, int x11ScreenNumber) 24 { 25 this.recipientChannelID = recipientChannelID; 26 this.wantReply = wantReply; 27 28 this.singleConnection = singleConnection; 29 this.x11AuthenticationProtocol = x11AuthenticationProtocol; 30 this.x11AuthenticationCookie = x11AuthenticationCookie; 31 this.x11ScreenNumber = x11ScreenNumber; 32 } 33 34 public byte[] getPayload() 35 { 36 if (payload == null) 37 { 38 TypesWriter tw = new TypesWriter(); 39 tw.writeByte(Packets.SSH_MSG_CHANNEL_REQUEST); 40 tw.writeUINT32(recipientChannelID); 41 tw.writeString("x11-req"); 42 tw.writeBoolean(wantReply); 43 44 tw.writeBoolean(singleConnection); 45 tw.writeString(x11AuthenticationProtocol); 46 tw.writeString(x11AuthenticationCookie); 47 tw.writeUINT32(x11ScreenNumber); 48 49 payload = tw.getBytes(); 50 } 51 return payload; 52 } 53 } 54 | Popular Tags |