1#ifndef _SESSIONS_H_ 2#define _SESSIONS_H_ 3 4#include "betalk.h" 5#include "fsproto.h" 6 7typedef struct 8{ 9 unsigned int type; 10 unsigned int length; 11 char *data; 12} bt_arg_t; 13 14typedef struct btblock 15{ 16 vnode_id vnid; 17 off_t pos; 18 int32 len; 19 int32 count; 20 char *buffer; 21 struct btblock *next; 22 struct btblock *prev; 23} bt_block; 24 25typedef struct session 26{ 27 int socket; 28 unsigned int client_s_addr; 29 thread_id handlerID; 30 31 bool killed; 32 33 // What share did the client connect to? And when? 34 int share; 35 int rights; 36 time_t logon; 37 38 // Buffered write support. 39 bt_block *rootBlock; 40 sem_id blockSem; 41 int32 blockVar; 42 43 char ioBuffer[BT_MAX_IO_BUFFER + 9]; 44 char attrBuffer[BT_MAX_ATTR_BUFFER + 1]; 45 char pathBuffer[B_PATH_NAME_LENGTH + 1]; 46 47 struct session *next; 48} bt_session_t; 49 50#endif 51