diff options
author | Taru Karttunen <taruti@taruti.net> | 2011-03-30 15:46:40 +0300 |
---|---|---|
committer | Taru Karttunen <taruti@taruti.net> | 2011-03-30 15:46:40 +0300 |
commit | e5888a1ffdae813d7575f5fb02275c6bb07e5199 (patch) | |
tree | d8d51eac403f07814b9e936eed0c9a79195e2450 /sys/src/liboventi/session.h |
Import sources from 2011-03-30 iso image
Diffstat (limited to 'sys/src/liboventi/session.h')
-rwxr-xr-x | sys/src/liboventi/session.h | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/sys/src/liboventi/session.h b/sys/src/liboventi/session.h new file mode 100755 index 000000000..8df857f4d --- /dev/null +++ b/sys/src/liboventi/session.h @@ -0,0 +1,74 @@ +typedef struct VtAuth VtAuth; + +/* op codes */ +enum { + VtRError = 1, + VtQPing, + VtRPing, + VtQHello, + VtRHello, + VtQGoodbye, + VtRGoodbye, /* not used */ + VtQAuth0, + VtRAuth0, + VtQAuth1, + VtRAuth1, + VtQRead, + VtRRead, + VtQWrite, + VtRWrite, + VtQSync, + VtRSync, + + VtMaxOp +}; + +/* connection state */ +enum { + VtStateAlloc, + VtStateConnected, + VtStateClosed, +}; + +/* auth state */ +enum { + VtAuthHello, + VtAuth0, + VtAuth1, + VtAuthOK, + VtAuthFailed, +}; + +struct VtAuth { + int state; + uchar client[VtScoreSize]; + uchar sever[VtScoreSize]; +}; + +struct VtSession { + VtLock *lk; + VtServerVtbl *vtbl; /* == nil means client side */ + int cstate; /* connection state */ + int fd; + char fderror[ERRMAX]; + + VtAuth auth; + + VtSha1 *inHash; + VtLock *inLock; + Packet *part; /* partial packet */ + + VtSha1 *outHash; + VtLock *outLock; + + int debug; + int version; + int ref; + char *uid; + char *sid; + int cryptoStrength; + int compression; + int crypto; + int codec; +}; + |