diff app/src/main/java/ch/ethz/ssh2/packets/PacketChannelAuthAgentReq.java @ 438:d29cce60f393

migrate from Eclipse to Android Studio
author Carl Byington <carl@five-ten-sg.com>
date Thu, 03 Dec 2015 11:23:55 -0800
parents src/ch/ethz/ssh2/packets/PacketChannelAuthAgentReq.java@5824a1475be4
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/src/main/java/ch/ethz/ssh2/packets/PacketChannelAuthAgentReq.java	Thu Dec 03 11:23:55 2015 -0800
@@ -0,0 +1,30 @@
+package ch.ethz.ssh2.packets;
+
+/**
+ * PacketGlobalAuthAgent.
+ *
+ * @author Kenny Root, kenny@the-b.org
+ * @version $Id$
+ */
+public class PacketChannelAuthAgentReq {
+    byte[] payload;
+
+    public int recipientChannelID;
+
+    public PacketChannelAuthAgentReq(int recipientChannelID) {
+        this.recipientChannelID = recipientChannelID;
+    }
+
+    public byte[] getPayload() {
+        if (payload == null) {
+            TypesWriter tw = new TypesWriter();
+            tw.writeByte(Packets.SSH_MSG_CHANNEL_REQUEST);
+            tw.writeUINT32(recipientChannelID);
+            tw.writeString("auth-agent-req@openssh.com");
+            tw.writeBoolean(true); // want reply
+            payload = tw.getBytes();
+        }
+
+        return payload;
+    }
+}