|
|
1.1 root 1: /* new netfs headers, adjusted to 8 byte boundaries */
2: #define NETB 2
3: struct sendb {
4: char version; /* 1 mostly */
5: char cmd; /* see below */
6: char flags; /* see below, for nami mostly */
7: char rsvd; /* space */
8: long trannum; /* uniq transaction id */
9:
10: long len; /* including this struct and any data */
11: long tag; /* who it is about */
12: };
13:
14: /* additional structures for each message type, adjusted to 8 bytes */
15: /* put nothing */
16: /* get nothing, never sent */
17: struct snbstat { /* get */
18: time_t ta; /* synchronization */
19: long rsvd; /* padding */
20: };
21: /* free nothing, and no message either */
22: struct snbup { /* update, rather overloaded */
23: long rsvd2; /* the server's handle */
24: short uid, gid; /* for the inode */
25:
26: unsigned short mode;
27: dev_t rdvdd;
28: long rsvd; /* alignment space */
29:
30: long ta;
31: long tm; /* access and modified times */
32: };
33: struct snbread {
34: long len; /* how much */
35: long offset; /* starting where */
36: };
37: struct snbwrite {
38: long len; /* how much (redundant) */
39: long offset;
40: };
41: /* trunc doesn't need any */
42: struct snbnami {
43: long rsvd; /* of current directory for request */
44: short uid, gid; /* for permissions and creating */
45:
46: short mode; /* for creating, if any */
47: dev_t dev;
48: long ino; /* ino and dev for linking */
49: };
50:
51: /* expected responses */
52: struct recvb { /* common header */
53: long trannum; /* sanity */
54: short errno; /* error messages */
55: char flags; /* and comments */
56: char rsvd;
57:
58: long len; /* total length, including this struct */
59: long rsvd2;
60: };
61: /* additional responses per command */
62: /* put nothing */
63: struct rnbget {
64: short mode;
65: short uid, gid;
66: short nlink;
67:
68: long tag;
69: long size;
70: };
71: /* free nothing */
72: /* updat server may disagree with changes, but resetting might not
73: be a good idea, so nothing */
74: struct rnbstat {
75: long ino;
76: dev_t dev;
77: short mode;
78:
79: short nlink;
80: short uid, gid;
81: dev_t rdev; /* is this useful? */
82:
83: long size;
84: time_t ta;
85:
86: time_t tm;
87: time_t tc;
88: };
89: /* read nothing (would a redundant len be useful?) */
90: /* write ditto */
91: struct rnbnami { /* include enough so the next stat can be avoided */
92: long tag;
93: long ino;
94:
95: dev_t dev;
96: short mode;
97: long used; /* chars of name used if recvb.flags == NROOT */
98:
99: short nlink;
100: short uid, gid;
101: dev_t rdev; /* is this useful? */
102:
103: long size;
104: time_t ta;
105:
106: time_t tm;
107: time_t tc;
108: };
109:
110: /* commands */
111: #define NBPUT 1
112: #define NBGET 2
113: #define NBUPD 3
114: #define NBREAD 4
115: #define NBWRT 5
116: #define NBNAMI 6
117: #define NBSTAT 7
118: #define NBIOCTL 8
119: #define NBTRNC 9
120: /* response flags */
121: #define NBROOT 1
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.