OpenAFS
OpenAFS distributed network file system
|
00001 /* 00002 * Copyright 2000, International Business Machines Corporation and others. 00003 * All Rights Reserved. 00004 * 00005 * This software has been released under the terms of the IBM Public 00006 * License. For details, see the LICENSE file in the top-level source 00007 * directory or online at http://www.openafs.org/dl/license10.html 00008 */ 00009 00010 #ifndef _AFS_PROTOTYPES_H_ 00011 #define _AFS_PROTOTYPES_H_ 00012 00013 /* afs_analyze.c */ 00014 extern int afs_Analyze(struct afs_conn *aconn, struct rx_connection *rxconn, 00015 afs_int32 acode, struct VenusFid *afid, 00016 struct vrequest *areq, 00017 int op, afs_int32 locktype, struct cell *cellp); 00018 00019 /* afs_axscache.c */ 00020 extern afs_rwlock_t afs_xaxs; 00021 extern struct axscache *afs_SlowFindAxs(struct axscache **cachep, 00022 afs_int32 id); 00023 extern struct axscache *axs_Alloc(void); 00024 extern void afs_RemoveAxs(struct axscache **headp, struct axscache *axsp); 00025 extern void afs_FreeAllAxs(struct axscache **headp); 00026 extern void shutdown_xscache(void); 00027 00028 /* afs_buffer.c */ 00029 extern void shutdown_bufferpackage(void); 00030 00031 /* afs_call.c */ 00032 extern int afs_cold_shutdown; 00033 extern char afs_rootVolumeName[64]; 00034 extern void afs_shutdown(void); 00035 extern void afs_FlushCBs(void); 00036 extern int afs_CheckInit(void); 00037 extern void afs_shutdown(void); 00038 extern void shutdown_afstest(void); 00039 extern int afs_syscall_call(long parm, long parm2, long parm3, 00040 long parm4, long parm5, long parm6); 00041 #if defined(AFS_DARWIN100_ENV) 00042 extern int afs_syscall64_call(user_addr_t parm, user_addr_t parm2, 00043 user_addr_t parm3, user_addr_t parm4, 00044 user_addr_t parm5, user_addr_t parm6); 00045 #endif 00046 00047 00048 /* afs_callback.c */ 00049 extern afs_int32 afs_allCBs; 00050 extern afs_int32 afs_oddCBs; 00051 extern afs_int32 afs_evenCBs; 00052 extern afs_int32 afs_allZaps; 00053 extern afs_int32 afs_oddZaps; 00054 extern afs_int32 afs_evenZaps; 00055 extern afs_int32 afs_connectBacks; 00056 extern unsigned long lastCallBack_vnode; 00057 extern unsigned int lastCallBack_dv; 00058 extern osi_timeval_t lastCallBack_time; 00059 extern struct interfaceAddr afs_cb_interface; 00060 00061 extern int afs_RXCallBackServer(void); 00062 extern int SRXAFSCB_GetCE(struct rx_call *a_call, afs_int32 a_index, 00063 struct AFSDBCacheEntry *a_result); 00064 extern int SRXAFSCB_GetCE64(struct rx_call *a_call, afs_int32 a_index, 00065 struct AFSDBCacheEntry64 *a_result); 00066 extern int SRXAFSCB_GetLock(struct rx_call *a_call, afs_int32 a_index, 00067 struct AFSDBLock *a_result); 00068 extern int SRXAFSCB_CallBack(struct rx_call *a_call, 00069 struct AFSCBFids *a_fids, 00070 struct AFSCBs *a_callbacks); 00071 extern int SRXAFSCB_Probe(struct rx_call *a_call); 00072 extern int SRXAFSCB_InitCallBackState(struct rx_call *a_call); 00073 extern int SRXAFSCB_XStatsVersion(struct rx_call *a_call, 00074 afs_int32 * a_versionP); 00075 extern int SRXAFSCB_GetXStats(struct rx_call *a_call, 00076 afs_int32 a_clientVersionNum, 00077 afs_int32 a_collectionNumber, 00078 afs_int32 * a_srvVersionNumP, 00079 afs_int32 * a_timeP, AFSCB_CollData * a_dataP); 00080 extern int afs_RXCallBackServer(void); 00081 extern int shutdown_CB(void); 00082 extern int SRXAFSCB_InitCallBackState2(struct rx_call *a_call, 00083 struct interfaceAddr *addr); 00084 extern int SRXAFSCB_WhoAreYou(struct rx_call *a_call, 00085 struct interfaceAddr *addr); 00086 extern int SRXAFSCB_InitCallBackState3(struct rx_call *a_call, 00087 afsUUID * a_uuid); 00088 extern int SRXAFSCB_ProbeUuid(struct rx_call *a_call, afsUUID * a_uuid); 00089 extern int SRXAFSCB_GetServerPrefs(struct rx_call *a_call, afs_int32 a_index, 00090 afs_int32 * a_srvr_addr, 00091 afs_int32 * a_srvr_rank); 00092 extern int SRXAFSCB_GetCellServDB(struct rx_call *a_call, afs_int32 a_index, 00093 char **a_name, serverList * a_hosts); 00094 extern int SRXAFSCB_GetLocalCell(struct rx_call *a_call, char **a_name); 00095 extern int SRXAFSCB_GetCacheConfig(struct rx_call *a_call, 00096 afs_uint32 callerVersion, 00097 afs_uint32 * serverVersion, 00098 afs_uint32 * configCount, 00099 cacheConfig * config); 00100 extern int SRXAFSCB_FetchData(struct rx_call *rxcall, struct AFSFid *Fid, 00101 afs_int32 Fd, afs_int64 Position, 00102 afs_int64 Length, afs_int64 * TotalLength); 00103 extern int SRXAFSCB_StoreData(struct rx_call *rxcall, struct AFSFid *Fid, 00104 afs_int32 Fd, afs_int64 Position, 00105 afs_int64 Length, afs_int64 * TotalLength); 00106 00107 00108 /* afs_cbqueue.c */ 00109 extern afs_rwlock_t afs_xcbhash; 00110 extern void afs_QueueCallback(struct vcache *avc, unsigned int atime, 00111 struct volume *avp); 00112 extern void afs_CheckCallbacks(unsigned int secs); 00113 extern void afs_FlushCBs(void); 00114 extern void afs_FlushServerCBs(struct server *srvp); 00115 extern int afs_BumpBase(void); 00116 extern void afs_InitCBQueue(int doLockInit); 00117 extern void afs_DequeueCallback(struct vcache *avc); 00118 00119 /* afs_cell.c */ 00120 extern afs_int32 afs_cellindex; 00121 extern afs_rwlock_t afs_xcell; 00122 extern afs_rwlock_t afsdb_client_lock; 00123 extern afs_rwlock_t afsdb_req_lock; 00124 extern struct afs_q CellLRU; 00125 00126 extern void afs_CellInit(void); 00127 extern void shutdown_cell(void); 00128 extern int afs_cellname_init(afs_dcache_id_t *inode, int lookupcode); 00129 extern int afs_cellname_write(void); 00130 extern afs_int32 afs_NewCell(char *acellName, afs_int32 * acellHosts, 00131 int aflags, char *linkedcname, u_short fsport, 00132 u_short vlport, int timeout); 00133 extern afs_int32 afs_SetPrimaryCell(char *acellName); 00134 extern struct cell *afs_GetCell(afs_int32 acell, afs_int32 locktype); 00135 extern struct cell *afs_GetCellStale(afs_int32 acell, afs_int32 locktype); 00136 extern struct cell *afs_GetCellByHandle(void *handle, afs_int32 locktype); 00137 extern struct cell *afs_GetCellByIndex(afs_int32 cellidx, afs_int32 locktype); 00138 extern struct cell *afs_GetCellByName(char *acellName, afs_int32 locktype); 00139 extern struct cell *afs_GetPrimaryCell(afs_int32 locktype); 00140 extern afs_int32 afs_GetPrimaryCellNum(void); 00141 extern int afs_IsPrimaryCellNum(afs_int32 cellnum); 00142 extern int afs_IsPrimaryCell(struct cell *cell); 00143 extern void *afs_TraverseCells(void *(*cb) (struct cell *, void *), 00144 void *arg); 00145 extern int afs_CellOrAliasExists(char *aname); 00146 extern int afs_CellNumValid(afs_int32 cellnum); 00147 extern afs_int32 afs_NewCellAlias(char *alias, char *cell); 00148 extern struct cell_alias *afs_GetCellAlias(int index); 00149 extern void afs_PutCellAlias(struct cell_alias *a); 00150 extern int afs_AFSDBHandler(char *acellName, int acellNameLen, 00151 afs_int32 * kernelMsg); 00152 extern void afs_LookupAFSDB(char *acellName); 00153 extern void afs_StopAFSDB(void); 00154 extern void afs_RemoveCellEntry(struct server *srvp); 00155 00156 /* afs_chunk.c */ 00157 extern afs_int32 afs_FirstCSize; 00158 extern afs_int32 afs_OtherCSize; 00159 extern afs_int32 afs_LogChunk; 00160 00161 /* afs_cell.c */ 00162 extern struct cell *afs_GetRealCellByIndex(afs_int32 cellindex, 00163 afs_int32 locktype, 00164 afs_int32 refresh); 00165 00166 /* afs_conn.c */ 00167 extern afs_int32 cryptall; 00168 extern afs_rwlock_t afs_xinterface; 00169 extern afs_rwlock_t afs_xconn; 00170 extern struct afs_conn *afs_Conn(struct VenusFid *afid, 00171 struct vrequest *areq, 00172 afs_int32 locktype, 00173 struct rx_connection **rxconn); 00174 extern struct afs_conn *afs_ConnBySA(struct srvAddr *sap, unsigned short aport, 00175 afs_int32 acell, struct unixuser *tu, 00176 int force_if_down, afs_int32 create, 00177 afs_int32 locktype, afs_int32 replicated, 00178 struct rx_connection **rxconn); 00179 extern struct afs_conn *afs_ConnByMHosts(struct server *ahosts[], 00180 unsigned short aport, afs_int32 acell, 00181 struct vrequest *areq, 00182 afs_int32 locktype, 00183 afs_int32 replicated, 00184 struct rx_connection **rxconn); 00185 extern struct afs_conn *afs_ConnByHost(struct server *aserver, 00186 unsigned short aport, afs_int32 acell, 00187 struct vrequest *areq, int aforce, 00188 afs_int32 locktype, 00189 afs_int32 replicated, 00190 struct rx_connection **rxconn); 00191 extern void afs_PutConn(struct afs_conn *ac, struct rx_connection *rxconn, 00192 afs_int32 locktype); 00193 extern void afs_ReleaseConns(struct sa_conn_vector *tcv); 00194 extern void afs_ReleaseConnsUser(register struct unixuser *au); 00195 extern void ForceNewConnections(struct srvAddr *sap); 00196 00197 00198 /* afs_daemons.c */ 00199 extern afs_lock_t afs_xbrs; 00200 extern short afs_brsWaiters; 00201 extern short afs_brsDaemons; 00202 extern struct brequest afs_brs[NBRS]; 00203 extern struct afs_osi_WaitHandle AFS_WaitHandler, AFS_CSWaitHandler; 00204 extern afs_int32 afs_gcpags; 00205 extern afs_int32 afs_gcpags_procsize; 00206 extern afs_int32 afs_CheckServerDaemonStarted; 00207 extern afs_int32 afs_probe_interval; 00208 extern afs_int32 afs_preCache; 00209 00210 extern void afs_Daemon(void); 00211 extern struct brequest *afs_BQueue(short aopcode, 00212 struct vcache *avc, 00213 afs_int32 dontwait, afs_int32 ause, 00214 afs_ucred_t *acred, 00215 afs_size_t asparm0, afs_size_t asparm1, 00216 void *apparm0, void *apparm1, 00217 void *apparm2); 00218 extern void afs_SetCheckServerNATmode(int isnat); 00219 extern void afs_CheckServerDaemon(void); 00220 extern int afs_CheckRootVolume(void); 00221 extern void afs_BRelease(struct brequest *ab); 00222 extern int afs_BBusy(void); 00223 extern int afs_BioDaemon(afs_int32 nbiods); 00224 #ifdef AFS_NEW_BKG 00225 extern int afs_BackgroundDaemon(struct afs_uspc_param *uspc, void *param1, void *param2); 00226 #else 00227 extern void afs_BackgroundDaemon(void); 00228 #endif 00229 extern void shutdown_daemons(void); 00230 extern int afs_sgidaemon(void); 00231 00232 00233 /* afs_dcache.c */ 00234 extern u_int afs_min_cache; 00235 extern afs_int32 *afs_dvhashTbl; 00236 extern afs_int32 afs_dhashsize; 00237 extern afs_rwlock_t afs_xdcache; 00238 extern afs_size_t afs_vmMappingEnd; 00239 extern afs_int32 afs_blocksUsed; 00240 extern afs_int32 afs_blocksDiscarded; 00241 extern int afs_WaitForCacheDrain; 00242 extern int cacheDiskType; 00243 extern afs_uint32 afs_tpct1, afs_tpct2, splitdcache; 00244 extern unsigned char *afs_indexFlags; 00245 extern struct afs_cacheOps *afs_cacheType; 00246 extern afs_dcache_id_t cacheInode; 00247 extern struct osi_file *afs_cacheInodep; 00248 extern void afs_dcacheInit(int afiles, int ablocks, int aDentries, int achunk, 00249 int aflags); 00250 extern int afs_PutDCache(struct dcache *adc); 00251 extern void afs_FlushDCache(struct dcache *adc); 00252 extern void shutdown_dcache(void); 00253 extern void afs_CacheTruncateDaemon(void); 00254 extern afs_int32 afs_fsfragsize; 00255 extern struct dcache *afs_MemGetDSlot(afs_int32 aslot, int needvalid); 00256 extern struct dcache *afs_GetDCache(struct vcache *avc, 00257 afs_size_t abyte, 00258 struct vrequest *areq, 00259 afs_size_t * aoffset, afs_size_t * alen, 00260 int aflags); 00261 extern struct dcache *afs_FindDCache(struct vcache *avc, 00262 afs_size_t abyte); 00263 extern void afs_StoreWarn(afs_int32 acode, afs_int32 avolume, 00264 afs_int32 aflags); 00265 extern void afs_MaybeWakeupTruncateDaemon(void); 00266 extern void afs_CacheTruncateDaemon(void); 00267 extern void afs_AdjustSize(struct dcache *adc, 00268 afs_int32 newSize); 00269 extern int afs_HashOutDCache(struct dcache *adc, int zap); 00270 extern int afs_MaybeFreeDiscardedDCache(void); 00271 extern int afs_RefDCache(struct dcache *adc); 00272 extern void afs_TryToSmush(struct vcache *avc, 00273 afs_ucred_t *acred, int sync); 00274 extern void updateV2DC(int lockVc, struct vcache *v, struct dcache *d, 00275 int src); 00276 extern void afs_WriteThroughDSlots(void); 00277 extern struct dcache *afs_UFSGetDSlot(afs_int32 aslot, int needvalid); 00278 extern int afs_WriteDCache(struct dcache *adc, int atime); 00279 extern int afs_wakeup(struct vcache *avc); 00280 extern int afs_InitCacheFile(char *afile, ino_t ainode); 00281 extern int afs_DCacheMissingChunks(struct vcache *avc); 00282 extern struct dcache *afs_ObtainDCacheForWriting(struct vcache *avc, 00283 afs_size_t filePos, 00284 afs_size_t len, 00285 struct vrequest *areq, 00286 int noLock); 00287 extern void afs_PopulateDCache(struct vcache *avc, afs_size_t apos, 00288 struct vrequest *areq); 00289 00290 /* afs_disconnected.c */ 00291 00292 /* afs_dynroot.c */ 00293 extern int afs_IsDynrootFid(struct VenusFid *fid); 00294 extern int afs_IsDynrootMountFid(struct VenusFid *fid); 00295 extern int afs_IsDynrootAnyFid(struct VenusFid *fid); 00296 extern void afs_GetDynrootFid(struct VenusFid *fid); 00297 extern void afs_GetDynrootMountFid(struct VenusFid *fid); 00298 extern int afs_IsDynroot(struct vcache *avc); 00299 extern int afs_IsDynrootMount(struct vcache *avc); 00300 extern int afs_IsDynrootAny(struct vcache *avc); 00301 extern void afs_DynrootInvalidate(void); 00302 extern void afs_GetDynroot(char **dynrootDir, int *dynrootLen, 00303 struct AFSFetchStatus *status); 00304 extern void afs_GetDynrootMount(char **dynrootDir, int *dynrootLen, 00305 struct AFSFetchStatus *status); 00306 extern void afs_PutDynroot(void); 00307 extern int afs_DynrootNewVnode(struct vcache *avc, 00308 struct AFSFetchStatus *status); 00309 extern int afs_InitDynroot(void); 00310 extern int afs_SetDynrootEnable(int enable); 00311 extern int afs_GetDynrootEnable(void); 00312 extern int afs_DynrootVOPRemove(struct vcache *avc, afs_ucred_t *acred, 00313 char *aname); 00314 extern int afs_DynrootVOPSymlink(struct vcache *avc, afs_ucred_t *acred, 00315 char *aname, char *atargetName); 00316 00317 /* afs_error.c */ 00318 extern void init_et_to_sys_error(void); 00319 extern afs_int32 et_to_sys_error(afs_int32 in); 00320 extern void afs_FinalizeReq(struct vrequest *areq); 00321 extern int afs_CheckCode(afs_int32 acode, struct vrequest *areq, int where); 00322 extern void afs_CopyError(struct vrequest *afrom, 00323 struct vrequest *ato); 00324 extern void init_sys_error_to_et(void); 00325 00326 /* afs_exporter.c */ 00327 extern struct afs_exporter *root_exported; 00328 extern struct afs_exporter *exporter_find(int type); 00329 extern void shutdown_exporter(void); 00330 00331 /* afs_fetchstore.c */ 00332 extern int afs_UFSCacheFetchProc(struct rx_call *, struct osi_file *, 00333 afs_size_t, struct dcache *, 00334 struct vcache *, afs_size_t *, 00335 afs_size_t *, afs_int32); 00336 00337 extern int afs_UFSCacheStoreProc(struct rx_call *, struct osi_file *, 00338 afs_int32, struct vcache *, 00339 int *, afs_size_t *, 00340 afs_size_t *); 00341 00342 /* afs_icl.c */ 00343 extern struct afs_icl_set *afs_icl_allSets; 00344 extern int afs_icl_InitLogs(void); 00345 extern void shutdown_icl(void); 00346 extern int afs_icl_CreateLog(char *name, afs_int32 logSize, 00347 struct afs_icl_log **outLogpp); 00348 extern int afs_icl_CreateLogWithFlags(char *name, afs_int32 logSize, 00349 afs_uint32 flags, 00350 struct afs_icl_log **outLogpp); 00351 extern int afs_icl_CopyOut(struct afs_icl_log *logp, 00352 afs_int32 * bufferp, afs_int32 * bufSizep, 00353 afs_uint32 * cookiep, afs_int32 * flagsp); 00354 extern int afs_icl_GetLogParms(struct afs_icl_log *logp, afs_int32 * maxSizep, 00355 afs_int32 * curSizep); 00356 extern int afs_icl_LogHold(struct afs_icl_log *logp); 00357 extern int afs_icl_LogHoldNL(struct afs_icl_log *logp); 00358 extern int afs_icl_LogUse(struct afs_icl_log *logp); 00359 extern int afs_icl_LogFreeUse(struct afs_icl_log *logp); 00360 extern int afs_icl_LogSetSize(struct afs_icl_log *logp, 00361 afs_int32 logSize); 00362 extern int afs_icl_ZapLog(struct afs_icl_log *logp); 00363 extern int afs_icl_LogRele(struct afs_icl_log *logp); 00364 extern int afs_icl_LogReleNL(struct afs_icl_log *logp); 00365 extern int afs_icl_ZeroLog(struct afs_icl_log *logp); 00366 extern int afs_icl_LogFree(struct afs_icl_log *logp); 00367 extern struct afs_icl_log *afs_icl_FindLog(char *name); 00368 extern int 00369 afs_icl_EnumerateLogs(int (*aproc) 00370 00371 (char *name, char *arock, struct afs_icl_log * tp), 00372 char *arock); 00373 extern int afs_icl_CreateSet(char *name, struct afs_icl_log *baseLogp, 00374 struct afs_icl_log *fatalLogp, 00375 struct afs_icl_set **outSetpp); 00376 extern int afs_icl_CreateSetWithFlags(char *name, 00377 struct afs_icl_log *baseLogp, 00378 struct afs_icl_log *fatalLogp, 00379 afs_uint32 flags, 00380 struct afs_icl_set **outSetpp); 00381 extern int afs_icl_SetEnable(struct afs_icl_set *setp, afs_int32 eventID, 00382 int setValue); 00383 extern int afs_icl_GetEnable(struct afs_icl_set *setp, afs_int32 eventID, 00384 int *getValuep); 00385 extern int afs_icl_ZeroSet(struct afs_icl_set *setp); 00386 extern int 00387 afs_icl_EnumerateSets(int (*aproc) 00388 00389 (char *name, char *arock, struct afs_icl_log * tp), 00390 char *arock); 00391 extern int afs_icl_AddLogToSet(struct afs_icl_set *setp, 00392 struct afs_icl_log *newlogp); 00393 extern int afs_icl_SetSetStat(struct afs_icl_set *setp, int op); 00394 extern int afs_icl_SetHold(struct afs_icl_set *setp); 00395 extern int afs_icl_ZapSet(struct afs_icl_set *setp); 00396 extern int afs_icl_SetRele(struct afs_icl_set *setp); 00397 extern int afs_icl_SetFree(struct afs_icl_set *setp); 00398 extern struct afs_icl_set *afs_icl_FindSet(char *name); 00399 00400 extern int afs_icl_Event4(struct afs_icl_set *setp, 00401 afs_int32 eventID, afs_int32 lAndT, long p1, 00402 long p2, long p3, long p4); 00403 extern int afs_icl_Event3(struct afs_icl_set *setp, 00404 afs_int32 eventID, afs_int32 lAndT, long p1, 00405 long p2, long p3); 00406 extern int afs_icl_Event2(struct afs_icl_set *setp, 00407 afs_int32 eventID, afs_int32 lAndT, long p1, 00408 long p2); 00409 extern int afs_icl_Event1(struct afs_icl_set *setp, 00410 afs_int32 eventID, afs_int32 lAndT, long p1); 00411 extern int afs_icl_Event0(struct afs_icl_set *setp, 00412 afs_int32 eventID, afs_int32 lAndT); 00413 extern void afs_icl_AppendRecord(struct afs_icl_log *logp, 00414 afs_int32 op, afs_int32 types, long p1, 00415 long p2, long p3, long p4); 00416 #if defined(AFS_NBSD_ENV) 00417 extern int Afscall_icl(long opcode, long p1, long p2, long p3, long p4, 00418 register_t *retval); 00419 #else 00420 extern int Afscall_icl(long opcode, long p1, long p2, long p3, long p4, 00421 long *retval); 00422 #endif 00423 #ifdef AFS_DARWIN100_ENV 00424 extern int Afscall64_icl(int opcode, user_addr_t p1, user_addr_t p2, 00425 user_addr_t p3, user_addr_t p4, int *retval); 00426 #endif 00427 00428 /* afs_init.c */ 00429 extern struct cm_initparams cm_initParams; 00430 extern int afs_resourceinit_flag; 00431 extern afs_rwlock_t afs_puttofileLock; 00432 extern char *afs_sysname; 00433 extern char *afs_sysnamelist[MAXNUMSYSNAMES]; 00434 extern int afs_sysnamecount; 00435 extern int afs_sysnamegen; 00436 extern afs_int32 cacheInfoModTime; 00437 extern int afs_CacheInit(afs_int32 astatSize, afs_int32 afiles, 00438 afs_int32 ablocks, afs_int32 aDentries, 00439 afs_int32 aVolumes, afs_int32 achunk, 00440 afs_int32 aflags, afs_int32 ninodes, 00441 afs_int32 nusers, afs_int32 dynamic_vcaches); 00442 extern void afs_ComputeCacheParms(void); 00443 extern int afs_InitCacheInfo(char *afile); 00444 extern int afs_InitVolumeInfo(char *afile); 00445 extern int afs_InitCellInfo(char *afile); 00446 extern int afs_ResourceInit(int preallocs); 00447 extern void shutdown_cache(void); 00448 extern void shutdown_vnodeops(void); 00449 extern void shutdown_AFS(void); 00450 extern int afs_LookupInodeByPath(char *filename, afs_ufs_dcache_id_t *inode, 00451 struct vnode **fvpp); 00452 00453 /* afs_lock.c */ 00454 extern void Lock_Init(struct afs_lock *lock); 00455 extern void ObtainLock(struct afs_lock *lock, int how, 00456 unsigned int src_indicator); 00457 extern void ReleaseLock(struct afs_lock *lock, int how); 00458 extern int Afs_Lock_Trace(int op, struct afs_lock *alock, int type, 00459 char *file, int line); 00460 extern void Afs_Lock_Obtain(struct afs_lock *lock, int how); 00461 extern void Afs_Lock_ReleaseR(struct afs_lock *lock); 00462 extern void Afs_Lock_ReleaseW(struct afs_lock *lock); 00463 extern void afs_osi_SleepR(char *addr, 00464 struct afs_lock *alock); 00465 extern void afs_osi_SleepW(char *addr, 00466 struct afs_lock *alock); 00467 extern void afs_osi_SleepS(char *addr, 00468 struct afs_lock *alock); 00469 #ifdef AFS_BOZONLOCK_ENV 00470 extern void afs_BozonLock(struct afs_bozoLock *alock, struct vcache *avc); 00471 extern void afs_BozonUnlock(struct afs_bozoLock *alock, struct vcache *avc); 00472 extern void afs_BozonInit(struct afs_bozoLock *alock, struct vcache *avc); 00473 extern int afs_CheckBozonLock(struct afs_bozoLock *alock); 00474 extern int afs_CheckBozonLockBlocking(struct afs_bozoLock *alock); 00475 #endif 00476 00477 00478 00479 00480 /* afs_mariner.c */ 00481 extern afs_int32 afs_mariner; 00482 extern afs_int32 afs_marinerHost; 00483 extern struct rx_service *afs_server; 00484 extern int afs_AddMarinerName(char *aname, 00485 struct vcache *avc); 00486 extern char *afs_GetMariner(struct vcache *avc); 00487 extern void afs_MarinerLogFetch(struct vcache *avc, 00488 afs_int32 off, 00489 afs_int32 bytes, 00490 afs_int32 idx); 00491 extern void afs_MarinerLog(char *astring, 00492 struct vcache *avc); 00493 extern void shutdown_mariner(void); 00494 00495 /* afs_fetchstore.c */ 00496 extern int afs_CacheStoreVCache(struct dcache **dcList, struct vcache *avc, 00497 struct vrequest *areq, 00498 int sync, unsigned int minj, 00499 unsigned int high, unsigned int moredata, 00500 afs_hyper_t *anewDV, 00501 afs_size_t *amaxStoredLength); 00502 extern int afs_CacheFetchProc(struct afs_conn *tc, struct rx_connection *rxconn, 00503 struct osi_file *fP, 00504 afs_size_t abase, struct dcache *adc, 00505 struct vcache *avc, afs_int32 size, 00506 struct afs_FetchOutput *tsmall) 00507 AFS_NONNULL((5)); 00508 00509 /* afs_memcache.c */ 00510 extern int afs_InitMemCache(int blkCount, int blkSize, int flags); 00511 extern int afs_MemCacheClose(struct osi_file *file); 00512 extern void *afs_MemCacheOpen(afs_dcache_id_t *ainode); 00513 extern int afs_MemReadBlk(struct osi_file *fP, int offset, 00514 void *dest, int size); 00515 extern int afs_MemReadvBlk(struct memCacheEntry *mceP, int offset, 00516 struct iovec *iov, int nio, int size); 00517 extern int afs_MemReadUIO(afs_dcache_id_t *ainode, struct uio *uioP); 00518 extern int afs_MemWriteBlk(struct osi_file *fP, int offset, 00519 void *src, int size); 00520 extern int afs_MemWritevBlk(struct memCacheEntry *mceP, int offset, 00521 struct iovec *iov, int nio, int size); 00522 extern int afs_MemWriteUIO(struct vcache *, afs_dcache_id_t *, struct uio *); 00523 extern int afs_MemCacheTruncate(struct osi_file *fP, 00524 int size); 00525 extern void shutdown_memcache(void); 00526 00527 00528 /* afs_nfsclnt.c */ 00529 extern struct afs_exporter *afs_nfsexported; 00530 extern struct afs_exporter *afs_nfsexporter; 00531 extern void afs_nfsclient_init(void); 00532 extern int afs_nfsclient_reqhandler(struct afs_exporter *exporter, 00533 afs_ucred_t **cred, 00534 afs_uint32 host, afs_int32 *pagparam, 00535 struct afs_exporter **outexporter); 00536 extern void shutdown_nfsclnt(void); 00537 00538 /* afs_osi.c */ 00539 extern afs_lock_t afs_ftf; 00540 extern void afs_osi_Invisible(void); 00541 extern void afs_osi_Visible(void); 00542 extern void afs_osi_RxkRegister(void); 00543 extern void afs_osi_MaskSignals(void); 00544 extern void afs_osi_UnmaskRxkSignals(void); 00545 extern void afs_osi_MaskUserLoop(void); 00546 extern void osi_Init(void); 00547 extern void afs_osi_MaskSignals(void); 00548 extern void afs_osi_UnmaskRxkSignals(void); 00549 extern void afs_osi_RxkRegister(void); 00550 extern void afs_osi_Invisible(void); 00551 extern void shutdown_osi(void); 00552 extern void shutdown_osinet(void); 00553 extern void shutdown_osisleep(void); 00554 extern int afs_osi_suser(void *credp); 00555 extern void afs_osi_TraverseProcTable(void); 00556 #if defined(KERNEL) && !defined(UKERNEL) 00557 extern const afs_ucred_t *afs_osi_proc2cred(afs_proc_t * pr); 00558 #endif 00559 00560 /* afs_osi_alloc.c */ 00561 #ifndef AFS_PRIVATE_OSI_ALLOCSPACES 00562 extern afs_lock_t osi_fsplock; 00563 extern afs_lock_t osi_flplock; 00564 #endif 00565 00566 extern void *afs_osi_Alloc_debug(size_t x, char *func, int line); 00567 #ifndef afs_osi_Free 00568 extern void afs_osi_Free(void *x, size_t asize); 00569 #endif 00570 #if !defined(AFS_OBSD44_ENV) 00571 extern void afs_osi_FreeStr(char *x); 00572 #endif 00573 extern void osi_FreeLargeSpace(void *adata); 00574 extern void osi_FreeSmallSpace(void *adata); 00575 extern void *osi_AllocLargeSpace(size_t size); 00576 extern void *osi_AllocSmallSpace(size_t size); 00577 extern void shutdown_osinet(void); 00578 00579 /* afs_osi_pag.c */ 00580 #if defined(AFS_SUN5_ENV) 00581 extern int afs_setpag(afs_ucred_t **credpp); 00582 #elif defined(AFS_FBSD_ENV) 00583 extern int afs_setpag(struct thread *td, void *args); 00584 #elif defined(AFS_NBSD_ENV) 00585 extern int afs_setpag(afs_proc_t *p, const void *args, register_t *retval); 00586 #elif defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV) 00587 extern int afs_setpag(afs_proc_t *p, void *args, int *retval); 00588 #else 00589 extern int afs_setpag(void); 00590 #endif 00591 00592 extern afs_uint32 genpag(void); 00593 extern afs_uint32 getpag(void); 00594 #if defined(AFS_FBSD_ENV) 00595 extern int AddPag(struct thread *td, afs_int32 aval, afs_ucred_t **credpp); 00596 #elif defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV) 00597 extern int AddPag(afs_proc_t *p, afs_int32 aval, afs_ucred_t **credpp); 00598 #else 00599 extern int AddPag(afs_int32 aval, afs_ucred_t **credpp); 00600 #endif 00601 extern int afs_InitReq(struct vrequest *av, afs_ucred_t *acred); 00602 extern afs_uint32 afs_get_pag_from_groups(gid_t g0a, gid_t g1a); 00603 extern void afs_get_groups_from_pag(afs_uint32 pag, gid_t * g0p, gid_t * g1p); 00604 extern afs_int32 PagInCred(afs_ucred_t *cred); 00605 00606 /* afs_osi_uio.c */ 00607 #if !defined(AFS_DARWIN80_ENV) 00608 extern int afsio_copy(struct uio *ainuio, struct uio *aoutuio, 00609 struct iovec *aoutvec); 00610 extern int afsio_trim(struct uio *auio, afs_int32 asize); 00611 extern void afsio_free(struct uio *auio); 00612 #endif 00613 00614 extern struct uio* afsio_partialcopy(struct uio *auio, size_t size); 00615 extern int afsio_skip(struct uio *auio, afs_int32 asize); 00616 00617 /* afs_osi_vm.c */ 00618 extern int osi_Active(struct vcache *avc); 00619 extern void osi_FlushPages(struct vcache *avc, 00620 afs_ucred_t *credp); 00621 extern void osi_FlushText_really(struct vcache *vp); 00622 extern int osi_VMDirty_p(struct vcache *avc); 00623 #ifndef UKERNEL 00624 extern void osi_ReleaseVM(struct vcache *avc, afs_ucred_t *acred); 00625 #endif 00626 00627 00628 /* LINUX/osi_fetchstore.c */ 00629 #ifdef AFS_LINUX26_ENV 00630 extern int afs_linux_storeproc(struct storeOps *, void *, struct dcache *, 00631 int *, afs_size_t *); 00632 #endif 00633 00634 /* ARCH/osi_crypto.c */ 00635 extern int osi_readRandom(void *, afs_size_t); 00636 00637 /* ARCH/osi_misc.c */ 00638 extern void afs_osi_SetTime(osi_timeval_t * atv); 00639 00640 /* LINUX/osi_misc.c */ 00641 #ifdef AFS_LINUX20_ENV 00642 #ifdef AFS_LINUX24_ENV 00643 extern int osi_lookupname(char *aname, uio_seg_t seg, int followlink, 00644 struct dentry **dpp); 00645 extern int osi_InitCacheInfo(char *aname); 00646 extern int osi_rdwr(struct osi_file *osifile, struct uio *uiop, int rw); 00647 extern void setup_uio(struct uio *uiop, struct iovec *iovecp, const char *buf, 00648 afs_offs_t pos, int count, uio_flag_t flag, 00649 uio_seg_t seg); 00650 extern int uiomove(char *dp, int length, uio_flag_t rw, struct uio *uiop); 00651 extern void osi_linux_free_inode_pages(void); 00652 #endif 00653 extern void osi_linux_mask(void); 00654 extern void osi_linux_unmask(void); 00655 extern int setpag(cred_t ** cr, afs_uint32 pagvalue, afs_uint32 * newpag, 00656 int change_parent); 00657 #endif 00658 00659 00660 /* ARCH/osi_sleep.c */ 00661 extern void afs_osi_InitWaitHandle(struct afs_osi_WaitHandle *achandle); 00662 extern void afs_osi_CancelWait(struct afs_osi_WaitHandle *achandle); 00663 extern int afs_osi_Wait(afs_int32 ams, struct afs_osi_WaitHandle *ahandle, 00664 int aintok); 00665 extern int afs_osi_TimedSleep(void *event, afs_int32 ams, int aintok); 00666 #ifndef afs_osi_Wakeup 00667 extern int afs_osi_Wakeup(void *event); 00668 #endif 00669 #ifndef afs_osi_Sleep 00670 extern void afs_osi_Sleep(void *event); 00671 #endif 00672 #ifndef afs_osi_SleepSig 00673 extern int afs_osi_SleepSig(void *event); 00674 #endif 00675 00676 00677 /* ARCH/osi_inode.c */ 00678 #ifdef AFS_SUN5_ENV 00679 extern int afs_syscall_icreate(dev_t, long, long, long, long, long, 00680 rval_t *, afs_ucred_t *); 00681 extern int afs_syscall_iopen(dev_t, int, int, rval_t *, afs_ucred_t *); 00682 extern int afs_syscall_iincdec(dev_t, int, int, int, rval_t *, 00683 afs_ucred_t *); 00684 #elif defined(AFS_SGI65_ENV) 00685 extern int afs_syscall_icreate(afs_uint32, afs_uint32, afs_uint32, afs_uint32, afs_uint32, afs_uint32, rval_t *); 00686 extern int afs_syscall_iopen(int, ino_t, int, rval_t *); 00687 extern int afs_syscall_iincdec(int, int, int, int); 00688 #elif defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV) 00689 #if defined(AFS_NBSD_ENV) 00690 extern int afs_syscall_icreate(long, long, long, long, long, long, register_t *); 00691 extern int afs_syscall_iopen(int dev, int inode, int usrmod, register_t *); 00692 #else 00693 extern int afs_syscall_icreate(long, long, long, long, long, long, long*); 00694 extern int afs_syscall_iopen(int dev, int inode, int usrmod, long *retval); 00695 #endif 00696 extern int afs_syscall_iincdec(int dev, int inode, int inode_p1, int amount); 00697 #else 00698 extern int afs_syscall_icreate(long, long, long, long, long, long); 00699 extern int afs_syscall_iopen(int, int, int); 00700 extern int afs_syscall_iincdec(int, int, int, int); 00701 #endif 00702 00703 /* ARCH/osi_file.c */ 00704 extern int afs_osicred_initialized; 00705 extern void *osi_UFSOpen(afs_dcache_id_t *ainode); 00706 #if defined(AFS_LINUX22_ENV) 00707 extern void osi_get_fh(struct dentry *dp, afs_ufs_dcache_id_t *ainode); 00708 #endif 00709 extern int afs_osi_Stat(struct osi_file *afile, 00710 struct osi_stat *astat); 00711 extern int osi_UFSClose(struct osi_file *afile); 00712 extern int osi_UFSTruncate(struct osi_file *afile, afs_int32 asize); 00713 extern void osi_DisableAtimes(struct vnode *avp); 00714 extern int afs_osi_Read(struct osi_file *afile, int offset, 00715 void *aptr, afs_int32 asize); 00716 extern int afs_osi_Write(struct osi_file *afile, afs_int32 offset, 00717 void *aptr, afs_int32 asize); 00718 extern int afs_osi_MapStrategy(int (*aproc) (struct buf * bp), 00719 struct buf *bp); 00720 extern void shutdown_osifile(void); 00721 00722 00723 /* ARCH/osi_groups.c */ 00724 #if defined(UKERNEL) 00725 extern int usr_setpag(afs_ucred_t **cred, afs_uint32 pagvalue, 00726 afs_uint32 * newpag, int change_parent); 00727 #else 00728 # if defined AFS_XBSD_ENV 00729 # if !defined(AFS_DFBSD_ENV) 00730 # if defined(AFS_FBSD_ENV) 00731 extern int setpag(struct thread *td, struct ucred **cred, afs_uint32 pagvalue, 00732 afs_uint32 * newpag, int change_parent); 00733 00734 # elif defined(AFS_NBSD_ENV) 00735 extern int setpag(afs_proc_t *proc, afs_ucred_t **cred, afs_uint32 pagvalue, 00736 afs_uint32 * newpag, int change_parent); 00737 # else 00738 extern int setpag(afs_proc_t *proc, struct ucred **cred, afs_uint32 pagvalue, 00739 afs_uint32 * newpag, int change_parent); 00740 # endif /* AFS_FBSD_ENV */ 00741 # endif /* ! AFS_DFBSD_ENV */ 00742 # endif /* AFS_XBSD_ENV */ 00743 #endif /* UKERNEL */ 00744 00745 #if defined(AFS_LINUX26_ENV) 00746 extern afs_int32 osi_get_group_pag(afs_ucred_t *cred); 00747 #endif 00748 00749 00750 00751 /* ARCH/osi_vm.c */ 00752 extern int osi_VM_FlushVCache(struct vcache *avc, int *slept); 00753 extern void osi_VM_StoreAllSegments(struct vcache *avc); 00754 extern void osi_VM_TryToSmush(struct vcache *avc, afs_ucred_t *acred, 00755 int sync); 00756 extern void osi_VM_FlushPages(struct vcache *avc, afs_ucred_t *credp); 00757 #if !defined(AFS_NBSD_ENV) 00758 extern void osi_VM_Truncate(struct vcache *avc, int alen, afs_ucred_t *acred); 00759 #else 00760 extern void osi_VM_Truncate(struct vcache *avc, voff_t alen, afs_ucred_t *acred); 00761 #endif 00762 extern void osi_VM_TryReclaim(struct vcache *avc, int *slept); 00763 extern void osi_VM_NukePages(struct vnode *vp, off_t offset, off_t size); 00764 extern int osi_VM_Setup(struct vcache *avc, int force); 00765 00766 #ifdef AFS_SUN5_ENV 00767 extern int osi_VM_GetDownD(struct vcache *avc, struct dcache *adc); 00768 extern int osi_VM_MultiPageConflict(struct vcache *avc, struct dcache *adc); 00769 extern void osi_VM_PreTruncate(struct vcache *avc, int alen, 00770 afs_ucred_t *acred); 00771 #endif 00772 00773 00774 /* ARCH/osi_vnodeops.c */ 00775 extern struct vnodeops Afs_vnodeops; 00776 extern int afs_inactive(struct vcache *avc, afs_ucred_t *acred); 00777 00778 /* afs_osifile.c */ 00779 00780 /* afs_osi_pag.c */ 00781 extern afs_uint32 pag_epoch; 00782 extern afs_uint32 pagCounter; 00783 00784 /* OS/osi_vfsops.c */ 00785 #if defined(AFS_XBSD_ENV) || defined(AFS_DARWIN_ENV) 00786 extern struct mount *afs_globalVFS; 00787 #else 00788 extern struct vfs *afs_globalVFS; 00789 #endif 00790 extern struct vcache *afs_globalVp; 00791 #ifdef AFS_LINUX20_ENV 00792 extern void vcache2inode(struct vcache *avc); 00793 extern void vcache2fakeinode(struct vcache *rootvp, struct vcache *mpvp); 00794 #endif 00795 00796 #ifdef UKERNEL 00797 extern int afs_mount(struct vfs *afsp, char *path, void *data); 00798 extern int afs_root(OSI_VFS_DECL(afsp), struct vnode **avpp); 00799 extern int afs_unmount(struct vfs *afsp); 00800 #endif 00801 00802 /* afs_pag_call.c */ 00803 extern afs_int32 afs_nfs_server_addr; 00804 extern void afspag_Init(afs_int32 nfs_server_addr); 00805 extern void afspag_Shutdown(void); 00806 00807 /* afs_pag_cred.c */ 00808 extern afs_rwlock_t afs_xpagcell; 00809 extern afs_rwlock_t afs_xpagsys; 00810 extern int afspag_PUnlog(char *ain, afs_int32 ainSize, 00811 afs_ucred_t **acred); 00812 extern int afspag_PSetTokens(char *ain, afs_int32 ainSize, 00813 afs_ucred_t **acred); 00814 extern int afspag_PSetSysName(char *ain, afs_int32 ainSize, 00815 afs_ucred_t **acred); 00816 00817 /* afs_pioctl.c */ 00818 extern struct VenusFid afs_rootFid; 00819 extern afs_int32 afs_waitForever; 00820 extern short afs_waitForeverCount; 00821 extern afs_int32 afs_showflags; 00822 extern int afs_defaultAsynchrony; 00823 #if defined(AFS_DARWIN100_ENV) 00824 extern int afs_syscall64_pioctl(user_addr_t path, unsigned int com, 00825 user_addr_t cmarg, int follow, \ 00826 afs_ucred_t *credp); 00827 #endif 00828 #ifdef AFS_SUN5_ENV 00829 extern int afs_syscall_pioctl(char *path, unsigned int com, caddr_t cmarg, 00830 int follow, rval_t *rvp, afs_ucred_t *credp); 00831 #elif defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV) 00832 extern int afs_syscall_pioctl(char *path, unsigned int com, caddr_t cmarg, 00833 int follow, afs_ucred_t *credp); 00834 #else 00835 extern int afs_syscall_pioctl(char *path, unsigned int com, caddr_t cmarg, 00836 int follow); 00837 #endif 00838 extern int HandleIoctl(struct vcache *avc, afs_int32 acom, 00839 struct afs_ioctl *adata); 00840 00841 00842 /* afs_segments.c */ 00843 extern int afs_StoreAllSegments(struct vcache *avc, 00844 struct vrequest *areq, int sync); 00845 extern int afs_InvalidateAllSegments(struct vcache *avc); 00846 extern int afs_ExtendSegments(struct vcache *avc, 00847 afs_size_t alen, struct vrequest *areq); 00848 extern int afs_TruncateAllSegments(struct vcache *avc, 00849 afs_size_t alen, struct vrequest *areq, 00850 afs_ucred_t *acred); 00851 00852 /* afs_server.c */ 00853 extern afs_rwlock_t afs_xsrvAddr; 00854 extern afs_rwlock_t afs_xserver; 00855 extern afs_rwlock_t afs_icl_lock; 00856 extern struct srvAddr *afs_srvAddrs[NSERVERS]; 00857 extern struct server *afs_servers[NSERVERS]; 00858 extern int afs_totalServers; 00859 extern struct server *afs_FindServer(afs_int32 aserver, afs_uint16 aport, 00860 afsUUID * uuidp, afs_int32 locktype); 00861 extern struct server *afs_GetServer(afs_uint32 * aserver, afs_int32 nservers, 00862 afs_int32 acell, u_short aport, 00863 afs_int32 locktype, afsUUID * uuidp, 00864 afs_int32 addr_uniquifier, 00865 struct volume *tv); 00866 extern void afs_GetCapabilities(struct server *ts); 00867 extern void ForceAllNewConnections(void); 00868 extern void afs_MarkServerUpOrDown(struct srvAddr *sa, int a_isDown); 00869 extern afs_int32 afs_ServerDown(struct srvAddr *sa, int code); 00870 extern void afs_CountServers(void); 00871 extern void afs_CheckServers(int adown, struct cell *acellp); 00872 extern void afs_LoopServers(int adown, struct cell *acellp, int vlalso, 00873 void (*func1) (int nconns, struct rx_connection **rxconns, 00874 struct afs_conn **conns), 00875 void (*func2) (int nconns, struct rx_connection **rxconns, 00876 struct afs_conn **conns)); 00877 extern unsigned int afs_random(void); 00878 extern int afs_randomMod15(void); 00879 extern int afs_randomMod127(void); 00880 extern void afs_SortOneServer(struct server *asp); 00881 extern void afs_SortServers(struct server *aservers[], int count); 00882 extern void afs_ActivateServer(struct srvAddr *sap); 00883 #ifdef AFS_USERSPACE_IP_ADDR 00884 extern void afsi_SetServerIPRank(struct srvAddr *sa, afs_int32 addr, 00885 afs_uint32 subnetmask); 00886 #else 00887 #if (!defined(AFS_SUN5_ENV)) && defined(USEIFADDR) 00888 void afsi_SetServerIPRank(struct srvAddr *sa, struct in_ifaddr *ifa); 00889 #endif 00890 #endif 00891 extern int afs_HaveCallBacksFrom(struct server *aserver); 00892 extern void afs_RemoveAllConns(void); 00893 extern void afs_MarkAllServersUp(void); 00894 00895 /* afs_osidnlc.c */ 00896 extern int osi_dnlc_enter(struct vcache *adp, char *aname, struct vcache *avc, 00897 afs_hyper_t * avno); 00898 extern struct vcache *osi_dnlc_lookup(struct vcache *adp, char *aname, 00899 int locktype); 00900 extern int osi_dnlc_remove(struct vcache *adp, char *aname, 00901 struct vcache *avc); 00902 extern int osi_dnlc_purgedp(struct vcache *adp); 00903 extern int osi_dnlc_purgevp(struct vcache *avc); 00904 extern int osi_dnlc_purge(void); 00905 extern int osi_dnlc_purgevol(struct VenusFid *fidp); 00906 extern int osi_dnlc_init(void); 00907 extern int osi_dnlc_shutdown(void); 00908 00909 /* afs_pag_cred.c */ 00910 extern void afspag_SetPrimaryCell(char *acell); 00911 00912 /* afs_stat.c */ 00913 extern struct afs_CMStats afs_cmstats; 00914 extern struct afs_stats_CMPerf afs_stats_cmperf; 00915 extern struct afs_stats_CMFullPerf afs_stats_cmfullperf; 00916 extern afs_int32 afs_stats_XferSumBytes[AFS_STATS_NUM_FS_XFER_OPS]; 00917 extern void afs_InitStats(void); 00918 extern void afs_GetCMStat(char **ptr, unsigned *size); 00919 #ifndef AFS_NOSTATS 00920 extern void afs_AddToMean(struct afs_MeanStats *oldMean, afs_int32 newValue); 00921 #endif 00922 00923 /* afs_syscall.c */ 00924 #ifdef AFS_DARWIN100_ENV 00925 extern int copyin_afs_ioctl(user_addr_t cmarg, struct afs_ioctl *dst); 00926 #else 00927 extern int copyin_afs_ioctl(caddr_t cmarg, struct afs_ioctl *dst); 00928 #endif 00929 00930 #if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV) 00931 #ifdef AFS_DARWIN100_ENV 00932 extern int afs3_syscall(afs_proc_t *p, void *args, unsigned int *retval); 00933 #elif (defined(AFS_FBSD90_ENV) || defined(AFS_FBSD82_ENV)) && (__FreeBSD_version < 900044) 00934 /* afs3_syscall prototype is in sys/sysproto.h 00935 Yes, they put it in, then took it out again (renamed with a sys_ prefix) */ 00936 #elif defined(AFS_FBSD_ENV) 00937 extern int afs3_syscall(struct thread *p, void *args); 00938 #elif defined(AFS_NBSD50_ENV) 00939 extern int afs3_syscall(afs_proc_t *p, const void *args, register_t *retval); 00940 #elif defined(AFS_NBSD40_ENV) 00941 extern int afs3_syscall(struct lwp *p, void *args); 00942 #else 00943 extern int afs3_syscall(afs_proc_t *p, void *args, long *retval); 00944 #endif 00945 #endif 00946 00947 #ifdef UKERNEL 00948 extern int Afs_syscall(void); 00949 #endif 00950 00951 /* afs_tokens.c */ 00952 struct ktc_tokenUnion; 00953 struct ktc_setTokenData; 00954 00955 extern union tokenUnion *afs_FindToken(struct tokenJar *, rx_securityIndex); 00956 extern void afs_FreeTokens(struct tokenJar **); 00957 extern union tokenUnion *afs_AddToken(struct tokenJar **, rx_securityIndex); 00958 extern void afs_DiscardExpiredTokens(struct tokenJar **, afs_int32); 00959 extern int afs_HasValidTokens(struct tokenJar *, afs_int32); 00960 extern int afs_HasUsableTokens(struct tokenJar *, afs_int32); 00961 extern void afs_AddRxkadToken(struct tokenJar **, char *, int, 00962 struct ClearToken *); 00963 extern int afs_AddTokenFromPioctl(struct tokenJar **, struct ktc_tokenUnion *); 00964 extern int afs_ExtractTokensForPioctl(struct tokenJar *, time_t, 00965 struct ktc_setTokenData *); 00966 00967 /* UKERNEL/afs_usrops.c */ 00968 #ifdef UKERNEL 00969 extern void uafs_Shutdown(void); 00970 extern void osi_ReleaseVM(struct vcache *avc, int len, 00971 afs_ucred_t *credp); 00972 extern int osi_GetTime(struct timeval *tv); 00973 extern int iodone(struct usr_buf *bp); 00974 extern int usr_ioctl(void); 00975 extern int lookupname(char *fnamep, int segflg, int followlink, 00976 struct usr_vnode **compvpp); 00977 extern int usr_uiomove(char *kbuf, int n, int rw, struct usr_uio *uio); 00978 extern int afs_osi_VOP_RDWR(struct usr_vnode *vnodeP, struct usr_uio *uioP, 00979 int rw, int flags, afs_ucred_t *credP); 00980 00981 #endif 00982 00983 /* afs_user.c */ 00984 extern afs_rwlock_t afs_xuser; 00985 extern struct unixuser *afs_users[NUSERS]; 00986 extern struct unixuser *afs_FindUser(afs_int32 auid, afs_int32 acell, 00987 afs_int32 locktype); 00988 extern struct unixuser *afs_GetUser(afs_int32 auid, afs_int32 acell, 00989 afs_int32 locktype); 00990 extern void afs_LockUser(struct unixuser *au, afs_int32 locktype, 00991 unsigned int src_indicator); 00992 extern void afs_NotifyUser(struct unixuser *auser, int event); 00993 00994 #if AFS_GCPAGS 00995 extern afs_int32 afs_GCPAGs(afs_int32 * ReleasedCount); 00996 extern void afs_GCPAGs_perproc_func(afs_proc_t * pproc); 00997 #endif /* AFS_GCPAGS */ 00998 extern void afs_ComputePAGStats(void); 00999 extern void afs_PutUser(struct unixuser *au, afs_int32 locktype); 01000 extern void afs_GCUserData(int aforce); 01001 extern void afs_CheckTokenCache(void); 01002 extern void afs_ResetAccessCache(afs_int32 uid, int alock); 01003 extern void afs_ResetUserConns(struct unixuser *auser); 01004 extern void afs_SetPrimary(struct unixuser *au, int aflag); 01005 extern void afs_MarkUserExpired(afs_int32 pag); 01006 01007 /* afs_util.c */ 01008 extern afs_int32 afs_strtoi_r(const char *str, char **endptr, afs_uint32 *ret); 01009 extern afs_int32 afs_calc_inum(afs_int32 cell, afs_int32 volume, 01010 afs_int32 vnode); 01011 #ifndef afs_cv2string 01012 extern char *afs_cv2string(char *ttp, afs_uint32 aval); 01013 #endif 01014 #ifndef afs_strcasecmp 01015 extern int afs_strcasecmp(const char *s1, const char *s2); 01016 #endif 01017 #ifndef afs_strcat 01018 extern char *afs_strcat(char *s1, char *s2); 01019 #endif 01020 #ifdef AFS_OBSD34_ENV 01021 extern char *afs_strcpy(char *s1, char *s2); 01022 #endif 01023 #ifndef afs_strchr 01024 extern char *afs_strchr(char *s, int c); 01025 #endif 01026 #ifndef afs_strrchr 01027 extern char *afs_strrchr(char *s, int c); 01028 #endif 01029 extern char *afs_strdup(char *s); 01030 extern void print_internet_address(char *preamble, struct srvAddr *sa, 01031 char *postamble, int flag, int code); 01032 extern afs_int32 afs_data_pointer_to_int32(const void *p); 01033 01034 extern void afs_CheckLocks(void); 01035 extern int afs_badop(void); 01036 extern int afs_noop(void); 01037 extern afs_int32 afs_data_pointer_to_int32(const void *p); 01038 01039 /* afs_warn.c */ 01040 01041 #ifdef AFS_AIX_ENV 01042 /* AIX doesn't have usable va_args support in its kernel */ 01043 extern void afs_warn(); 01044 extern void afs_warnuser(); 01045 #else 01046 extern void afs_warn(char *fmt, ...) 01047 AFS_ATTRIBUTE_FORMAT(__printf__, 1, 2); 01048 extern void afs_warnuser(char *fmt, ...) 01049 AFS_ATTRIBUTE_FORMAT(__printf__, 1, 2); 01050 #endif 01051 01052 /* afs_vcache.c */ 01053 extern int afs_ShakeLooseVCaches(afs_int32 anumber); 01054 extern afs_int32 afs_maxvcount; 01055 extern afs_int32 afs_vcount; 01056 extern int afsvnumbers; 01057 extern afs_rwlock_t afs_xvreclaim; 01058 extern afs_rwlock_t afs_xvcache; 01059 extern afs_rwlock_t afs_xvcdirty; 01060 extern afs_lock_t afs_xvcb; 01061 extern struct afs_q VLRU; 01062 extern afs_int32 vcachegen; 01063 extern unsigned int afs_paniconwarn; 01064 extern struct afs_q afs_vhashTV[VCSIZE]; 01065 extern afs_int32 afs_bulkStatsLost; 01066 extern int afs_norefpanic; 01067 extern struct vcache *ReclaimedVCList; 01068 extern ino_t vcacheMetaInode; 01069 extern struct osi_file *afs_vcacheMetaInodep; 01070 01071 extern void afs_FlushReclaimedVcaches(void); 01072 void afs_vcacheInit(int astatSize); 01073 extern struct vcache *afs_FindVCache(struct VenusFid *afid, afs_int32 * retry, 01074 afs_int32 flag); 01075 extern void afs_BadFetchStatus(struct afs_conn *tc); 01076 extern int afs_CheckFetchStatus(struct afs_conn *tc, 01077 struct AFSFetchStatus *status); 01078 extern afs_int32 afs_FetchStatus(struct vcache *avc, struct VenusFid *afid, 01079 struct vrequest *areq, 01080 struct AFSFetchStatus *Outsp); 01081 01082 extern afs_int32 afs_FlushVCBs(afs_int32 lockit); 01083 extern void afs_InactiveVCache(struct vcache *avc, afs_ucred_t *acred); 01084 extern struct vcache *afs_LookupVCache(struct VenusFid *afid, 01085 struct vrequest *areq, 01086 afs_int32 * cached, struct vcache *adp, 01087 char *aname); 01088 extern void afs_FlushAllVCaches(void); 01089 extern int afs_FlushVCache(struct vcache *avc, int *slept); 01090 extern struct vcache *afs_GetRootVCache(struct VenusFid *afid, 01091 struct vrequest *areq, 01092 afs_int32 * cached, 01093 struct volume *tvolp); 01094 extern struct vcache *afs_NewVCache(struct VenusFid *afid, 01095 struct server *serverp); 01096 extern struct vcache *afs_NewBulkVCache(struct VenusFid *afid, 01097 struct server *serverp, int seq); 01098 extern int afs_VerifyVCache2(struct vcache *avc, struct vrequest *areq); 01099 extern struct vcache *afs_GetVCache(struct VenusFid *afid, 01100 struct vrequest *areq, afs_int32 * cached, 01101 struct vcache *avc); 01102 extern void afs_PutVCache(struct vcache *avc); 01103 extern int afs_RefVCache(struct vcache *avc); 01104 extern void afs_ProcessFS(struct vcache *avc, 01105 struct AFSFetchStatus *astat, 01106 struct vrequest *areq); 01107 extern struct afs_cbr *afs_AllocCBR(void); 01108 extern int afs_FreeCBR(struct afs_cbr *asp); 01109 extern void afs_RemoveVCB(struct VenusFid *afid); 01110 extern void afs_FlushActiveVcaches(afs_int32 doflocks); 01111 extern int afs_WriteVCache(struct vcache *avc, 01112 struct AFSStoreStatus *astatus, 01113 struct vrequest *areq); 01114 extern int afs_RemoteLookup(struct VenusFid *afid, 01115 struct vrequest *areq, char *name, 01116 struct VenusFid *nfid, 01117 struct AFSFetchStatus *OutStatusp, 01118 struct AFSCallBack *CallBackp, 01119 struct server **serverp, 01120 struct AFSVolSync *tsyncp); 01121 extern void afs_ResetVCache(struct vcache *, afs_ucred_t *, afs_int32 skipdnlc); 01122 extern afs_int32 afs_NFSFindVCache(struct vcache **avcp, 01123 struct VenusFid *afid); 01124 extern void afs_vcacheInit(int astatSize); 01125 extern void shutdown_vcache(void); 01126 extern void afs_DisconGiveUpCallbacks(void); 01127 extern void afs_ClearAllStatdFlag(void); 01128 01129 /* VNOPS/afs_vnop_access.c */ 01130 extern afs_int32 afs_GetAccessBits(struct vcache *avc, 01131 afs_int32 arights, 01132 struct vrequest *areq); 01133 extern int afs_AccessOK(struct vcache *avc, afs_int32 arights, 01134 struct vrequest *areq, afs_int32 check_mode_bits); 01135 #if defined(AFS_SUN5_ENV) || (defined(AFS_SGI_ENV) && !defined(AFS_SGI65_ENV)) 01136 extern int afs_access(OSI_VC_DECL(avc), afs_int32 amode, int flags, 01137 afs_ucred_t *acred); 01138 #else 01139 extern int afs_access(OSI_VC_DECL(avc), afs_int32 amode, 01140 afs_ucred_t *acred); 01141 #endif 01142 extern int afs_getRights(OSI_VC_DECL(avc), afs_int32 arights, 01143 afs_ucred_t *acred); 01144 01145 /* VNOPS/afs_vnop_attrs.c */ 01146 extern int afs_CopyOutAttrs(struct vcache *avc, 01147 struct vattr *attrs); 01148 #if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) 01149 extern int afs_getattr(OSI_VC_DECL(avc), struct vattr *attrs, int flags, 01150 afs_ucred_t *acred); 01151 #else 01152 extern int afs_getattr(OSI_VC_DECL(avc), struct vattr *attrs, 01153 afs_ucred_t *acred); 01154 #endif 01155 extern int afs_VAttrToAS(struct vcache *avc, 01156 struct vattr *av, 01157 struct AFSStoreStatus *as); 01158 #if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) 01159 extern int afs_setattr(OSI_VC_DECL(avc), struct vattr *attrs, 01160 int flags, afs_ucred_t *acred); 01161 #else 01162 extern int afs_setattr(OSI_VC_DECL(avc), struct vattr *attrs, 01163 afs_ucred_t *acred); 01164 #endif 01165 01166 /* VNOPS/afs_vnop_create.c */ 01167 #ifdef AFS_SGI64_ENV 01168 extern int afs_create(OSI_VC_DECL(adp), char *aname, struct vattr *attrs, 01169 int flags, int amode, struct vcache **avcp, 01170 afs_ucred_t *acred); 01171 #else /* AFS_SGI64_ENV */ 01172 extern int afs_create(OSI_VC_DECL(adp), char *aname, struct vattr *attrs, 01173 enum vcexcl aexcl, int amode, struct vcache **avcp, 01174 afs_ucred_t *acred); 01175 #endif /* AFS_SGI64_ENV */ 01176 extern int afs_LocalHero(struct vcache *avc, 01177 struct dcache *adc, 01178 AFSFetchStatus * astat, int aincr); 01179 01180 /* VNOPS/afs_vnop_dirops.c */ 01181 01182 extern int afs_mkdir(OSI_VC_DECL(adp), char *aname, struct vattr *attrs, 01183 struct vcache **avcp, afs_ucred_t *acred); 01184 #if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) 01185 extern int afs_rmdir(OSI_VC_DECL(adp), char *aname, struct vnode *cdirp, 01186 afs_ucred_t *acred); 01187 #else 01188 extern int afs_rmdir(OSI_VC_DECL(adp), char *aname, afs_ucred_t *acred); 01189 #endif 01190 01191 struct fid; 01192 /* VNOPS/afs_vnop_fid.c */ 01193 #ifdef AFS_AIX41_ENV 01194 int afs_fid(OSI_VC_DECL(avc), struct fid *fidpp, struct ucred *credp); 01195 #elif defined(AFS_SUN5_ENV) 01196 int afs_fid(OSI_VC_DECL(avc), struct fid *fidpp); 01197 #else 01198 int afs_fid(OSI_VC_DECL(avc), struct fid **fidpp); 01199 #endif /* AFS_AIX41_ENV */ 01200 01201 /* VNOPS/afs_vnop_flock.c */ 01202 extern afs_int32 lastWarnTime; 01203 01204 extern void lockIdSet(struct AFS_FLOCK *flock, struct SimpleLocks *slp, 01205 int clid); 01206 extern int HandleFlock(struct vcache *avc, int acom, 01207 struct vrequest *areq, pid_t clid, int onlymine); 01208 01209 #if defined(AFS_SGI_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV) 01210 extern int afs_lockctl(struct vcache * avc, struct AFS_FLOCK * af, int acmd, 01211 afs_ucred_t * acred, pid_t clid); 01212 #else 01213 extern int afs_lockctl(struct vcache * avc, struct AFS_FLOCK * af, int acmd, 01214 afs_ucred_t * acred); 01215 #endif 01216 01217 /* VNOPS/afs_vnop_link.c */ 01218 #if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) 01219 extern int afs_link(OSI_VC_DECL(adp), struct vcache *avc, char *aname, 01220 afs_ucred_t *acred); 01221 #else 01222 extern int afs_link(struct vcache *avc, OSI_VC_DECL(adp), char *aname, 01223 afs_ucred_t *acred); 01224 #endif 01225 01226 /* VNOPS/afs_vnop_lookup.c */ 01227 extern int EvalMountPoint(struct vcache *avc, struct vcache *advc, 01228 struct volume **avolpp, 01229 struct vrequest *areq); 01230 extern void afs_InitFakeStat(struct afs_fakestat_state *state); 01231 extern int afs_EvalFakeStat(struct vcache **avcp, 01232 struct afs_fakestat_state *state, 01233 struct vrequest *areq); 01234 extern int afs_TryEvalFakeStat(struct vcache **avcp, 01235 struct afs_fakestat_state *state, 01236 struct vrequest *areq); 01237 extern void afs_PutFakeStat(struct afs_fakestat_state *state); 01238 extern int afs_ENameOK(char *aname); 01239 extern void Check_AtSys(struct vcache *avc, const char *aname, 01240 struct sysname_info *state, struct vrequest *areq); 01241 extern int Next_AtSys(struct vcache *avc, struct vrequest *areq, 01242 struct sysname_info *state); 01243 extern int afs_DoBulkStat(struct vcache *adp, long dirCookie, 01244 struct vrequest *areqp); 01245 01246 #if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) 01247 extern int afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp, 01248 struct pathname *pnp, int flags, struct vnode *rdir, 01249 afs_ucred_t *acred); 01250 #elif defined(UKERNEL) 01251 extern int afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp, 01252 afs_ucred_t *acred, int flags); 01253 #else 01254 extern int afs_lookup(OSI_VC_DECL(adp), char *aname, struct vcache **avcp, 01255 afs_ucred_t *acred); 01256 #endif 01257 01258 /* VNOPS/afs_vnop_open.c */ 01259 #ifdef AFS_SGI64_ENV 01260 extern int afs_open(bhv_desc_t * bhv, struct vcache **avcp, afs_int32 aflags, 01261 afs_ucred_t *acred); 01262 #else 01263 extern int afs_open(struct vcache **avcp, afs_int32 aflags, 01264 afs_ucred_t *acred); 01265 #endif 01266 01267 01268 /* VNOPS/afs_vnop_read.c */ 01269 extern int afs_read(struct vcache *avc, struct uio *auio, 01270 afs_ucred_t *acred, int noLock); 01271 01272 extern int afs_UFSReadUIO(afs_dcache_id_t *cacheId, struct uio *tuiop); 01273 01274 extern void afs_PrefetchChunk(struct vcache *avc, struct dcache *adc, 01275 afs_ucred_t *acred, struct vrequest *areq); 01276 01277 01278 /* VNOPS/afs_vnop_readdir.c */ 01279 extern int afs_rd_stash_i; 01280 #if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV) 01281 extern int afs_readdir(OSI_VC_DECL(avc), struct uio *auio, 01282 afs_ucred_t *acred, int *eofp); 01283 #elif defined(AFS_HPUX100_ENV) 01284 extern int afs_readdir2(OSI_VC_DECL(avc), struct uio *auio, 01285 afs_ucred_t *acred); 01286 #else 01287 extern int afs_readdir(OSI_VC_DECL(avc), struct uio *auio, 01288 afs_ucred_t *acred); 01289 #endif 01290 01291 /* VNOPS/afs_vnop_remove.c */ 01292 extern int afsremove(struct vcache *adp, struct dcache *tdc, 01293 struct vcache *tvc, char *aname, 01294 afs_ucred_t *acred, struct vrequest *treqp); 01295 extern int afs_remunlink(struct vcache *avc, int doit); 01296 extern int afs_remove(OSI_VC_DECL(adp), char *aname, afs_ucred_t *acred); 01297 extern char *afs_newname(void); 01298 01299 /* VNOPS/afs_vnop_rename.c */ 01300 extern int afsrename(struct vcache *aodp, char *aname1, struct vcache *andp, 01301 char *aname2, afs_ucred_t *acred, 01302 struct vrequest *areq); 01303 #ifdef AFS_SGI_ENV 01304 extern int afs_rename(OSI_VC_DECL(aodp), char *aname1, struct vcache *andp, 01305 char *aname2, struct pathname *npnp, 01306 afs_ucred_t *acred); 01307 #else 01308 extern int afs_rename(OSI_VC_DECL(aodp), char *aname1, struct vcache *andp, 01309 char *aname2, afs_ucred_t *acred); 01310 #endif 01311 01312 /* VNOPS/afs_vnop_strategy.c */ 01313 #if defined(AFS_SUN5_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV) 01314 extern int afs_ustrategy(struct buf *adp, afs_ucred_t *credp); 01315 #else 01316 extern int afs_ustrategy(struct buf *adp); 01317 #endif 01318 01319 /* VNOPS/afs_vnop_symlink.c */ 01320 extern int afs_MemHandleLink(struct vcache *avc, 01321 struct vrequest *areq); 01322 extern int afs_UFSHandleLink(struct vcache *avc, 01323 struct vrequest *areq); 01324 extern int afs_symlink(OSI_VC_DECL(adp), char *aname, 01325 struct vattr *attrs, char *atargetName, 01326 afs_ucred_t *acred); 01327 extern int afs_readlink(OSI_VC_DECL(avc), struct uio *auio, 01328 afs_ucred_t *acred); 01329 01330 /* VNOPS/afs_vnop_write.c */ 01331 extern int afs_write(struct vcache *avc, struct uio *auio, int aio, 01332 afs_ucred_t *acred, int noLock); 01333 01334 extern int afs_UFSWriteUIO(struct vcache *, afs_dcache_id_t *, struct uio *); 01335 01336 extern int afs_StoreOnLastReference(struct vcache *avc, 01337 struct vrequest *treq); 01338 extern int afs_DoPartialWrite(struct vcache *avc, 01339 struct vrequest *areq); 01340 extern int afs_closex(struct file *afd); 01341 01342 #ifdef AFS_SGI65_ENV 01343 extern int afs_close(OSI_VC_DECL(avc), afs_int32 aflags, 01344 lastclose_t lastclose, afs_ucred_t *acred); 01345 #elif defined(AFS_SGI64_ENV) 01346 extern int afs_close(OSI_VC_DECL(avc), afs_int32 aflags, 01347 lastclose_t lastclose, off_t offset, 01348 afs_ucred_t *acred, struct flid *flp); 01349 #elif defined(AFS_SGI_ENV) 01350 extern int afs_close(OSI_VC_DECL(avc), afs_int32 aflags, 01351 lastclose_t lastclose, off_t offset, 01352 afs_ucred_t *acred); 01353 #elif defined(AFS_SUN5_ENV) 01354 extern int afs_close(OSI_VC_DECL(avc), afs_int32 aflags, int count, 01355 offset_t offset, afs_ucred_t *acred); 01356 #else 01357 extern int afs_close(OSI_VC_DECL(avc), afs_int32 aflags, 01358 afs_ucred_t *acred); 01359 #endif 01360 01361 #if defined(AFS_SGI65_ENV) 01362 extern int afs_fsync(OSI_VC_DECL(avc), int flags, afs_ucred_t *acred, 01363 off_t start, off_t stop); 01364 #elif defined(AFS_SGI_ENV) || defined(AFS_SUN5_ENV) 01365 extern int afs_fsync(OSI_VC_DECL(avc), int flag, afs_ucred_t *acred); 01366 #else 01367 extern int afs_fsync(OSI_VC_DECL(avc), afs_ucred_t *acred); 01368 #endif 01369 01370 01371 /* afs_volume.c */ 01372 extern afs_int32 afs_FVIndex; 01373 extern afs_int32 afs_volCounter; 01374 extern afs_rwlock_t afs_xvolume; 01375 extern struct volume *afs_volumes[NVOLS]; 01376 extern afs_dcache_id_t volumeInode; 01377 extern struct volume *afs_FindVolume(struct VenusFid *afid, 01378 afs_int32 locktype); 01379 extern struct volume *afs_freeVolList; 01380 extern afs_int32 fvTable[NFENTRIES]; 01381 extern void LockAndInstallVolumeEntry(struct volume *av, struct vldbentry *ve, 01382 int acell); 01383 extern void LockAndInstallNVolumeEntry(struct volume *av, struct nvldbentry *ve, 01384 int acell); 01385 extern void LockAndInstallUVolumeEntry(struct volume *av, struct uvldbentry *ve, 01386 int acell, struct cell *tcell, 01387 struct vrequest *areq); 01388 extern void afs_ResetVolumeInfo(struct volume *tv); 01389 extern struct volume *afs_MemGetVolSlot(void); 01390 extern void afs_ResetVolumes(struct server *srvp, struct volume *tv); 01391 extern struct volume *afs_GetVolume(struct VenusFid *afid, 01392 struct vrequest *areq, 01393 afs_int32 locktype); 01394 extern struct volume *afs_GetVolumeByName(char *aname, 01395 afs_int32 acell, int agood, 01396 struct vrequest *areq, 01397 afs_int32 locktype); 01398 extern struct volume *afs_UFSGetVolSlot(void); 01399 extern void afs_CheckVolumeNames(int flags); 01400 01401 /* Prototypes for generated files that aren't really in src/afs/ */ 01402 01403 /* afs_uuid.c */ 01404 extern afs_int32 afs_uuid_equal(afsUUID * u1, afsUUID * u2); 01405 extern afs_int32 afs_uuid_is_nil(afsUUID * u1); 01406 extern void afs_htonuuid(afsUUID * uuidp); 01407 extern void afs_ntohuuid(afsUUID * uuidp); 01408 extern afs_int32 afs_uuid_create(afsUUID * uuid); 01409 extern u_short afs_uuid_hash(afsUUID * uuid); 01410 01411 #if defined(AFS_SUN5_ENV) || defined(AFS_LINUX20_ENV) || defined(AFS_AIX_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_SGI62_ENV) || defined(UKERNEL) 01412 #include "osi_prototypes.h" 01413 #endif 01414 01415 #endif /* _AFS_PROTOTYPES_H_ */