dir.x revision 1905
1/* @(#)dir.x	2.1 88/08/02 4.0 RPCSRC */
2/*
3 * dir.x: Remote directory listing protocol
4 */
5const MAXNAMELEN = 255;		/* maximum length of a directory entry */
6
7typedef string nametype<MAXNAMELEN>;	/* a directory entry */
8
9typedef struct namenode *namelist;	/* a link in the listing */
10
11/*
12 * A node in the directory listing
13 */
14struct namenode {
15	nametype name;		/* name of directory entry */
16	namelist next;		/* next entry */
17};
18
19/*
20 * The result of a READDIR operation.
21 */
22union readdir_res switch (int errno) {
23case 0:
24	namelist list;	/* no error: return directory listing */
25default:
26	void;		/* error occurred: nothing else to return */
27};
28
29/*
30 * The directory program definition
31 */
32program DIRPROG {
33	version DIRVERS {
34		readdir_res
35		READDIR(nametype) = 1;
36	} = 1;
37} = 76;
38