aboutsummaryrefslogtreecommitdiff
path: root/src/jail_protocol.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/jail_protocol.h')
-rw-r--r--src/jail_protocol.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/jail_protocol.h b/src/jail_protocol.h
index 51cdf54..b608253 100644
--- a/src/jail_protocol.h
+++ b/src/jail_protocol.h
@@ -16,14 +16,14 @@
#define PROTO_TYPE_PASS 0x42424242
#define PROTO_TYPE_DATA 0x43434343
-typedef struct __attribute__((packed, aligned(4))) jail_data {
+typedef struct jail_data {
int used;
uint32_t last_type;
char user[USER_LEN+1];
char pass[PASS_LEN+1];
} jail_data;
-typedef struct jail_protocol_hdr {
+typedef struct __attribute__((packed, aligned(4))) jail_protocol_hdr {
uint32_t magic;
uint32_t type;
uint32_t size;
@@ -38,8 +38,7 @@ ssize_t jail_protocol_writehdr(int type, unsigned char *buf, size_t bufsiz);
int jail_protocol_handshake_read(event_ctx *ev_client, int client_fd,
int tty_fd, jail_data *dst);
-int jail_protocol_handshake_write(event_ctx *ev_server, int server_fd,
- int proto_fd, jail_data *dst);
+int jail_protocol_handshake_write(int server_fd, jail_data *dst);
int jail_protocol_loop(event_ctx *ctx, on_event_cb on_event, void *user_data);