rmtaccess.h
1.55 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
/*
* Copyright (C) 1996-1998 by the Board of Trustees
* of Leland Stanford Junior University.
*
* This file is part of the SimOS distribution.
* See LICENSE file for terms of the license.
*
*/
/*
* rmtaccess.h --
*
* Interface to the remote access server.
*
* This file is shared by SimOS and the remote access server!!!!
*
*/
#ifndef _RMTACCESS_H
#define _RMTACCESS_H
#define RMTACCESS_MAGIC 0xC01
typedef enum {SIMRMT_OPEN = 1, SIMRMT_ACCESS = 2, SIMRMT_DISKINIT = 3} Rmtaccess_op;
typedef struct RmtAccessStartRequest {
int magic; /* Better be RMTACCESS_MAGIC */
Rmtaccess_op cmd;
int arglen;
} RmtAccessStartRequest;
typedef struct DiskFileInfo {
char filename[128];
off_t fileSize;
time_t modifyTime;
int fd;
} DiskFileInfo;
/*
* Remote access to the checkpoint disk
*/
#define NETDISK_MAX_REQUEST_SIZE (4*1024*1024)
#define NETDISK_MAX_DISKS (SIM_DISK_DEV_MAX_UNIT*SIM_DISK_DEV_MAX_CTRL)
#define BitsPerByte 8
typedef enum {NETDISK_PROBE, NETDISK_READ, NETDISK_WRITE,
NETDISK_ATTACH } DiskOp;
typedef struct NetDiskHdr {
DiskOp op;
int node; /* Node number */
int ctrl; /* Controller number */
int unit; /* Unit number */
int64 sectorNum; /* Disk sector number. */
int64 sizeInBytes; /* Requests size. */
int reqnum; /* Sequence number */
int64 retVal; /* Return value */
double aligner;
} NetDiskHdr;
#ifdef RMTACCESS
extern void CPUError(char* string, ...);
extern void CPUWarning( char *text,...);
#endif
#endif /* _RMTACCESS_H */