aboutsummaryrefslogtreecommitdiff
path: root/src/session.h
blob: 50b5fe8eec93e16bf314f68d38a07993f6d558a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#ifndef SESSION_H_
#define SESSION_H_

#include <libssh/libssh.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);

#endif