diff session.h @ 547:cf376c696dfc agent-client

Make it compile, update for changes in channel structure.
author Matt Johnston <matt@ucc.asn.au>
date Wed, 01 Jul 2009 04:53:17 +0000
parents 0431915df79f
children 61c3513825b0
line wrap: on
line diff
--- a/session.h	Wed Jul 01 04:16:32 2009 +0000
+++ b/session.h	Wed Jul 01 04:53:17 2009 +0000
@@ -215,6 +215,17 @@
 
 };
 
+struct protocol {
+	int sock; /* read/write with this */
+	buffer * readbuf; /* Pending input data, should read a packet's worth */
+	struct Queue writequeue; /* A queue of output buffers to send */
+	void (*process)(); /* To be called after reading */
+	size_t (*bytes_to_read)();
+	void * state; /* protocol specific */
+	void (*protocol_closed)(); /* to be run when the sock gets closed */
+	void (*loop_handler)(); /* to run at end of each loop */
+};
+
 typedef enum {
 	KEX_NOTHING,
 	KEXINIT_RCVD,