aboutsummaryrefslogtreecommitdiff
path: root/src/session.h
diff options
context:
space:
mode:
authorJulien Dessaux2018-06-20 13:23:48 +0200
committerJulien Dessaux2018-06-20 13:23:48 +0200
commit8c04f0d56d88ebea808d5505dcee07e8d197e360 (patch)
tree81f8e3f59c17ab234eb95c7812adb0054779a117 /src/session.h
parentInitial import with working simple server based on libssh examples (diff)
downloadbastion-8c04f0d56d88ebea808d5505dcee07e8d197e360.tar.gz
bastion-8c04f0d56d88ebea808d5505dcee07e8d197e360.tar.bz2
bastion-8c04f0d56d88ebea808d5505dcee07e8d197e360.zip
Made a working ssh proxy server
Diffstat (limited to 'src/session.h')
-rw-r--r--src/session.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/session.h b/src/session.h
index 2a4ea8d..50b5fe8 100644
--- a/src/session.h
+++ b/src/session.h
@@ -1,9 +1,19 @@
-#ifndef _SESSION_H_
-#define _SESSION_H_
+#ifndef SESSION_H_
+#define SESSION_H_
#include <libssh/libssh.h>
-#include "util.h"
+#define SESSION_END (SSH_CLOSED | SSH_CLOSED_ERROR)
+
+/* A userdata struct for session. */
+struct session_data_struct {
+ /* Pointer to the channel the session will allocate. */
+ ssh_channel channel;
+ int auth_attempts;
+ int authenticated;
+ // ssh user name when login
+ char * login_username;
+};
void handle_session(ssh_event event, ssh_session session);