#define _AFS_PROTOTYPES_H_
/* afs_analyze.c */
-extern int afs_Analyze(struct afs_conn *aconn, afs_int32 acode,
- struct VenusFid *afid, struct vrequest *areq,
+extern int afs_Analyze(struct afs_conn *aconn, struct rx_connection *rxconn,
+ afs_int32 acode, struct VenusFid *afid,
+ struct vrequest *areq,
int op, afs_int32 locktype, struct cell *cellp);
/* afs_axscache.c */
extern struct cell *afs_GetCellByIndex(afs_int32 cellidx, afs_int32 locktype);
extern struct cell *afs_GetCellByName(char *acellName, afs_int32 locktype);
extern struct cell *afs_GetPrimaryCell(afs_int32 locktype);
+extern afs_int32 afs_GetPrimaryCellNum(void);
extern int afs_IsPrimaryCellNum(afs_int32 cellnum);
extern int afs_IsPrimaryCell(struct cell *cell);
extern void *afs_TraverseCells(void *(*cb) (struct cell *, void *),
extern afs_rwlock_t afs_xconn;
extern struct afs_conn *afs_Conn(struct VenusFid *afid,
struct vrequest *areq,
- afs_int32 locktype);
+ afs_int32 locktype,
+ struct rx_connection **rxconn);
extern struct afs_conn *afs_ConnBySA(struct srvAddr *sap, unsigned short aport,
afs_int32 acell, struct unixuser *tu,
int force_if_down, afs_int32 create,
- afs_int32 locktype);
+ afs_int32 locktype,
+ struct rx_connection **rxconn);
extern struct afs_conn *afs_ConnByMHosts(struct server *ahosts[],
unsigned short aport, afs_int32 acell,
struct vrequest *areq,
- afs_int32 locktype);
+ afs_int32 locktype,
+ struct rx_connection **rxconn);
extern struct afs_conn *afs_ConnByHost(struct server *aserver,
unsigned short aport, afs_int32 acell,
struct vrequest *areq, int aforce,
- afs_int32 locktype);
-extern void afs_PutConn(struct afs_conn *ac, afs_int32 locktype);
+ afs_int32 locktype,
+ struct rx_connection **rxconn);
+extern void afs_PutConn(struct afs_conn *ac, struct rx_connection *rxconn,
+ afs_int32 locktype);
+extern void afs_ReleaseConns(struct sa_conn_vector *tcv);
+extern void afs_ReleaseConnsUser(register struct unixuser *au);
extern void ForceNewConnections(struct srvAddr *sap);
unsigned int high, unsigned int moredata,
afs_hyper_t *anewDV,
afs_size_t *amaxStoredLength);
-extern int afs_CacheFetchProc(struct afs_conn *tc, struct osi_file *fP,
+extern int afs_CacheFetchProc(struct afs_conn *tc, struct rx_connection *rxconn,
+ struct osi_file *fP,
afs_size_t abase, struct dcache *adc,
struct vcache *avc, afs_int32 size,
struct afs_FetchOutput *tsmall);
void *src, int size);
extern int afs_MemWritevBlk(struct memCacheEntry *mceP, int offset,
struct iovec *iov, int nio, int size);
-extern int afs_MemWriteUIO(afs_dcache_id_t *ainode, struct uio *uioP);
+extern int afs_MemWriteUIO(struct vcache *, afs_dcache_id_t *, struct uio *);
extern int afs_MemCacheTruncate(struct osi_file *fP,
int size);
extern void shutdown_memcache(void);
#endif
/* afs_osi_alloc.c */
-#ifndef AFS_FBSD_ENV
+#ifndef AFS_PRIVATE_OSI_ALLOCSPACES
extern afs_lock_t osi_fsplock;
extern afs_lock_t osi_flplock;
#endif
extern void *afs_osi_Alloc_debug(size_t x, char *func, int line);
-#ifndef afs_osi_Alloc_NoSleep
-extern void *afs_osi_Alloc_NoSleep(size_t x);
-#endif
#ifndef afs_osi_Free
extern void afs_osi_Free(void *x, size_t asize);
#endif
int *, afs_size_t *);
#endif
+/* ARCH/osi_crypto.c */
+extern int osi_readRandom(void *, afs_size_t);
+
/* ARCH/osi_misc.c */
extern void afs_osi_SetTime(osi_timeval_t * atv);
extern afs_int32 afs_ServerDown(struct srvAddr *sa);
extern void afs_CountServers(void);
extern void afs_CheckServers(int adown, struct cell *acellp);
+extern void afs_LoopServers(int adown, struct cell *acellp, int vlalso,
+ void (*func1) (struct rx_connection **rxconns,
+ int nconns, int nservers,
+ struct afs_conn **conns,
+ struct srvAddr **addrs),
+ void (*func2) (struct rx_connection **rxconns,
+ int nconns, int nservers,
+ struct afs_conn **conns,
+ struct srvAddr **addrs));
extern unsigned int afs_random(void);
extern int afs_randomMod15(void);
extern int afs_randomMod127(void);
#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
#ifdef AFS_DARWIN100_ENV
extern int afs3_syscall(afs_proc_t *p, void *args, unsigned int *retval);
+#elif defined(AFS_FBSD90_ENV) || defined(AFS_FBSD82_ENV)
+/* afs3_syscall prototype is in sys/sysproto.h */
#elif defined(AFS_FBSD_ENV)
extern int afs3_syscall(struct thread *p, void *args);
#elif defined(AFS_NBSD40_ENV)
extern int Afs_syscall(void);
#endif
+/* afs_tokens.c */
+struct ktc_tokenUnion;
+struct ktc_setTokenData;
+
+extern union tokenUnion *afs_FindToken(struct tokenJar *, rx_securityIndex);
+extern void afs_FreeTokens(struct tokenJar **);
+extern union tokenUnion *afs_AddToken(struct tokenJar **, rx_securityIndex);
+extern void afs_DiscardExpiredTokens(struct tokenJar **, afs_int32);
+extern int afs_HasValidTokens(struct tokenJar *, afs_int32);
+extern int afs_HasUsableTokens(struct tokenJar *, afs_int32);
+extern void afs_AddRxkadToken(struct tokenJar **, char *, int,
+ struct ClearToken *);
+extern int afs_AddTokenFromPioctl(struct tokenJar **, struct ktc_tokenUnion *);
+extern int afs_ExtractTokensForPioctl(struct tokenJar *, time_t,
+ struct ktc_setTokenData *);
+
/* UKERNEL/afs_usrops.c */
#ifdef UKERNEL
extern void uafs_Shutdown(void);
struct vrequest *areq,
afs_int32 * cached, struct vcache *adp,
char *aname);
+extern void afs_FlushAllVCaches(void);
extern int afs_FlushVCache(struct vcache *avc, int *slept);
extern struct vcache *afs_GetRootVCache(struct VenusFid *afid,
struct vrequest *areq,
/* VNOPS/afs_vnop_read.c */
-extern int afs_MemRead(struct vcache *avc, struct uio *auio,
- afs_ucred_t *acred, daddr_t albn,
- struct buf **abpp, int noLock);
-extern int afs_UFSRead(struct vcache *avc, struct uio *auio,
- afs_ucred_t *acred, daddr_t albn,
- struct buf **abpp, int noLock);
+extern int afs_read(struct vcache *avc, struct uio *auio,
+ afs_ucred_t *acred, int noLock);
+
+extern int afs_UFSReadUIO(afs_dcache_id_t *cacheId, struct uio *tuiop);
+
extern void afs_PrefetchChunk(struct vcache *avc, struct dcache *adc,
afs_ucred_t *acred, struct vrequest *areq);
afs_ucred_t *acred);
/* VNOPS/afs_vnop_write.c */
-extern int afs_MemWrite(struct vcache *avc, struct uio *auio,
- int aio, afs_ucred_t *acred, int noLock);
+extern int afs_write(struct vcache *avc, struct uio *auio, int aio,
+ afs_ucred_t *acred, int noLock);
+
+extern int afs_UFSWriteUIO(struct vcache *, afs_dcache_id_t *, struct uio *);
+
extern int afs_StoreOnLastReference(struct vcache *avc,
struct vrequest *treq);
-extern int afs_UFSWrite(struct vcache *avc, struct uio *auio,
- int aio, afs_ucred_t *acred, int noLock);
extern int afs_DoPartialWrite(struct vcache *avc,
struct vrequest *areq);
extern int afs_closex(struct file *afd);