Repository navigation
Expand file tree
/
Copy pathsession.h
More file actions
81 lines (62 loc) · 1.91 KB
/
Copy pathsession.h
File metadata and controls
81 lines (62 loc) · 1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#ifndef SESSION_H
#define SESSION_H
#include <types.h>
#include <appletalk.h>
#include "dsiproto.h"
#include "atipmapping.h"
/* Common portion of records for the various SP... commands */
typedef struct SPCommandRec {
Byte async;
Byte command;
Word result;
/* Below are in records for several ASP commands, but not all. */
LongWord completionPtr;
Byte refNum;
} SPCommandRec;
typedef enum DSISessionStatus {
unused = 0,
awaitingHeader,
awaitingPayload,
error,
needsReset /* set after control-reset in P8 mode */
} DSISessionStatus;
typedef struct FPZzzzzRec {
Word CommandCode; /* includes pad byte */
LongWord Flag;
} FPZzzzzRec;
typedef struct Session {
/* Marinetti TCP connection status */
Word ipid;
Boolean tcpLoggedIn;
DSISessionStatus dsiStatus;
/* Information on command currently being processed, if any. */
Boolean commandPending;
SPCommandRec *spCommandRec;
DSIRequestHeader request;
DSIReplyHeader reply;
Word nextRequestID;
/* Buffer to hold reply payload data */
void *replyBuf;
Word replyBufLen;
/* Buffer to hold unusable payload data that doesn't fit in replyBuf */
void *junkBuf;
/* ReadTCP status */
LongWord readCount;
Byte *readPtr;
/* Set by DSIAttention */
Word attentionCode;
/* Marinetti error codes, both the tcperr* value and any tool error */
Word tcperr;
Word toolerr;
/* AppleTalk<->IP address mapping used for this session */
ATIPMapping atipMapping;
/* Attention routine header (followed by the routine) */
ASPAttentionHeaderRec *attention;
/* Is this session successfully logged in? */
Boolean loggedIn;
/* Records for sending (fake) sleep messages to server */
ASPCommandRec sleepCommandRec;
FPZzzzzRec fpZzzzzRec;
Byte fpZzzzzResponseRec[4];
} Session;
#endif