dynroot-allow-cell-aliases-20011101
[openafs.git] / src / config / venus.h
1 /*
2  * Copyright 2000, International Business Machines Corporation and others.
3  * All Rights Reserved.
4  * 
5  * This software has been released under the terms of the IBM Public
6  * License.  For details, see the LICENSE file in the top-level source
7  * directory or online at http://www.openafs.org/dl/license10.html
8  */
9
10 /* /usr/andrew/include/vice/ioctl.h
11
12 Definitions of Venus-specific ioctls for Venus 2.
13  */
14
15 #ifndef AFS_VENUS_H
16 #define AFS_VENUS_H
17
18 #if !defined(UKERNEL)
19
20 #ifndef _IOW
21 #include <sys/ioctl.h>
22 #endif
23
24 #ifndef _VICEIOCTL
25 #include <afs/vice.h>
26 #endif
27
28 /* some structures used with CM pioctls */
29
30 /* structs for Get/Set server preferences pioctl
31  */
32 struct spref {
33         struct in_addr server;
34         unsigned short rank;
35 };
36
37 struct sprefrequest_33 {
38         unsigned short offset;
39         unsigned short num_servers;
40 };
41
42 struct sprefrequest {             /* new struct for 3.4 */
43         unsigned short offset;
44         unsigned short num_servers;
45         unsigned short flags;
46 };
47 #define DBservers 1
48
49 struct sprefinfo {
50         unsigned short next_offset;
51         unsigned short num_servers;
52         struct spref servers[1];                /* we overrun this array intentionally...*/
53 };
54
55 struct setspref {
56         unsigned short flags;
57         unsigned short num_servers;
58         struct spref servers[1];                /* we overrun this array intentionally...*/
59 };
60 /* struct for GAG pioctl
61  */
62 struct gaginfo {
63         afs_uint32 showflags, logflags, logwritethruflag, spare[3];
64         unsigned char spare2[128];
65 };
66 #define GAGUSER    1
67 #define GAGCONSOLE 2
68 #define logwritethruON  1
69
70
71 struct rxparams {
72         afs_int32 rx_initReceiveWindow, rx_maxReceiveWindow,
73               rx_initSendWindow, rx_maxSendWindow, rxi_nSendFrags,
74               rxi_nRecvFrags, rxi_OrphanFragSize;
75         afs_int32 rx_maxReceiveSize, rx_MyMaxSendSize;
76         afs_uint32 spare[21];
77       };
78
79 /* struct for checkservers */
80
81 struct chservinfo
82 {
83         int magic;
84         char tbuffer[128];
85         int tsize;
86         afs_int32 tinterval;
87         afs_int32 tflags;
88 };
89
90 struct sbstruct {
91   int sb_thisfile;
92   int sb_default;
93 };
94  
95 /* CM inititialization parameters. What CM actually used after calculations
96  * based on passed in arguments.
97  */
98 #define CMI_VERSION 1 /* increment when adding new fields. */
99 struct cm_initparams {
100     int cmi_version;
101     int cmi_nChunkFiles;
102     int cmi_nStatCaches;
103     int cmi_nDataCaches;
104     int cmi_nVolumeCaches;
105     int cmi_firstChunkSize;
106     int cmi_otherChunkSize;
107     int cmi_cacheSize;  /* The original cache size, in 1K blocks. */
108     unsigned cmi_setTime:1;
109     unsigned cmi_memCache:1;
110     int spare[16-9]; /* size of struct is 16 * 4 = 64 bytes */
111 };
112
113 #endif /* !defined(UKERNEL) */
114                 
115 /* IOCTLS to Venus.  Apply these to open file decriptors. */
116 #define VIOCCLOSEWAIT           _VICEIOCTL(1)   /* Force close to wait for store */
117 #define VIOCABORT               _VICEIOCTL(2)   /* Abort close on this fd */
118 #define VIOCIGETCELL            _VICEIOCTL(3)   /* ioctl to get cell name */
119
120 /* PIOCTLS to Venus.  Apply these to path names with pioctl. */
121 #define VIOCSETAL               _VICEIOCTL(1)   /* Set access control list */
122 #define VIOCGETAL               _VICEIOCTL(2)   /* Get access control list */
123 #define VIOCSETTOK              _VICEIOCTL(3)   /* Set authentication tokens */
124 #define VIOCGETVOLSTAT          _VICEIOCTL(4)   /* Get volume status */
125 #define VIOCSETVOLSTAT          _VICEIOCTL(5)   /* Set volume status */
126 #define VIOCFLUSH               _VICEIOCTL(6)   /* Invalidate cache entry */
127 #define VIOCSTAT                _VICEIOCTL(7)   /* Get file status */
128 #define VIOCGETTOK              _VICEIOCTL(8)   /* Get authentication tokens */
129 #define VIOCUNLOG               _VICEIOCTL(9)   /* Invalidate tokens */
130 #define VIOCCKSERV              _VICEIOCTL(10)  /* Check that servers are up */
131 #define VIOCCKBACK              _VICEIOCTL(11)  /* Check backup volume mappings */
132 #define VIOCCKCONN              _VICEIOCTL(12)  /* Check connections for a user */
133 #define VIOCGETTIME             _VICEIOCTL(13)  /* Do a vice gettime for performance testing */
134 #define VIOCWHEREIS             _VICEIOCTL(14)  /* Find out where a volume is located */
135 #define VIOCPREFETCH            _VICEIOCTL(15)  /* Prefetch a file */
136 #define VIOCNOP                 _VICEIOCTL(16)  /* Do nothing (more preformance) */
137 #define VIOCENGROUP             _VICEIOCTL(17)  /* Enable group access for a group */
138 #define VIOCDISGROUP            _VICEIOCTL(18)  /* Disable group access */
139 #define VIOCLISTGROUPS          _VICEIOCTL(19)  /* List enabled and disabled groups */
140 #define VIOCACCESS              _VICEIOCTL(20)  /* Access using PRS_FS bits */
141 #define VIOCUNPAG               _VICEIOCTL(21)  /* Invalidate pag */
142 #define VIOCGETFID              _VICEIOCTL(22)  /* Get file ID quickly */
143 #define VIOCWAITFOREVER         _VICEIOCTL(23)  /* Wait for dead servers forever */
144 #define VIOCSETCACHESIZE        _VICEIOCTL(24)  /* Set venus cache size in 1k units */
145 #define VIOCFLUSHCB             _VICEIOCTL(25)  /* Flush callback only */
146 #define VIOCNEWCELL             _VICEIOCTL(26)  /* Configure new cell */
147 #define VIOCGETCELL             _VICEIOCTL(27)  /* Get cell info */
148 #define VIOC_AFS_DELETE_MT_PT   _VICEIOCTL(28)  /* [AFS] Delete mount point */
149 #define VIOC_AFS_STAT_MT_PT     _VICEIOCTL(29)  /* [AFS] Stat mount point */
150 #define VIOC_FILE_CELL_NAME     _VICEIOCTL(30)  /* Get cell in which file lives */
151 #define VIOC_GET_WS_CELL        _VICEIOCTL(31)  /* Get cell in which workstation lives */
152 #define VIOC_AFS_MARINER_HOST   _VICEIOCTL(32)  /* [AFS] Get/set mariner host */
153 #define VIOC_GET_PRIMARY_CELL   _VICEIOCTL(33)  /* Get primary cell for caller */
154 #define VIOC_VENUSLOG           _VICEIOCTL(34)  /* Enable/Disable venus logging */
155 #define VIOC_GETCELLSTATUS      _VICEIOCTL(35)  /* get cell status info */
156 #define VIOC_SETCELLSTATUS      _VICEIOCTL(36)  /* set corresponding info */
157 #define VIOC_FLUSHVOLUME        _VICEIOCTL(37)  /* flush whole volume's data */
158 #define VIOC_AFS_SYSNAME        _VICEIOCTL(38)  /* Change @sys value */
159 #define VIOC_EXPORTAFS          _VICEIOCTL(39)  /* Export afs to nfs clients */
160 #define VIOCGETCACHEPARMS       _VICEIOCTL(40)  /* Get cache stats */
161 #define VIOCGETVCXSTATUS        _VICEIOCTL(41)  
162 #define VIOC_SETSPREFS33        _VICEIOCTL(42)  /* Set server ranks */
163 #define VIOC_GETSPREFS          _VICEIOCTL(43)  /* Get server ranks */
164 #define VIOC_GAG                _VICEIOCTL(44)  /* silence CM */
165 #define VIOC_TWIDDLE            _VICEIOCTL(45)  /* adjust RX knobs */
166 #define VIOC_SETSPREFS          _VICEIOCTL(46)  /* Set server ranks */
167 #define VIOC_STORBEHIND         _VICEIOCTL(47)  /* adjust store asynchrony */
168 #define VIOC_GCPAGS             _VICEIOCTL(48)  /* disable automatic pag gc-ing */
169 #define VIOC_GETINITPARAMS      _VICEIOCTL(49)  /* get initial cm params */
170 #define VIOC_GETCPREFS          _VICEIOCTL(50)  /* Get client interface */
171 #define VIOC_SETCPREFS          _VICEIOCTL(51)  /* Set client interface */
172 #define VIOC_AFS_FLUSHMOUNT     _VICEIOCTL(52)  /* Flush mount symlink data */
173 #define VIOC_RXSTAT_PROC        _VICEIOCTL(53)  /* Control process RX stats */
174 #define VIOC_RXSTAT_PEER        _VICEIOCTL(54)  /* Control peer RX stats */
175 #define VIOC_GETRXKCRYPT        _VICEIOCTL(55)  /* Set rxkad enc flag */
176 #define VIOC_SETRXKCRYPT        _VICEIOCTL(56)  /* Set rxkad enc flag */
177 #define VIOC_PREFETCHTAPE       _VICEIOCTL(66)  /* MR-AFS prefetch from tape */
178 #define VIOC_RESIDENCY_CMD      _VICEIOCTL(67)  /* generic MR-AFS cmds */
179 #define VIOC_STATISTICS         _VICEIOCTL(68)  /* arla: fetch statistics */
180
181 /* Coordinated 'C' pioctl's */
182 #define VIOC_NEWALIAS           _VICEIOCTL2('C', 1) /* create new cell alias */
183 #define VIOC_GETALIAS           _VICEIOCTL2('C', 2) /* get alias info */
184
185 #endif /* AFS_VENUS_H */