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