#include <inet/ip.h>
#endif
-/* Imported variables */
-/* these are for storing alternate interface addresses - from afs_callback.c */
-extern struct interfaceAddr afs_cb_interface;
-
-
-/* Imported functions. */
-struct rx_securityClass *rxnull_NewClientSecurityObject();
-struct rx_securityClass *rxkad_NewClientSecurityObject();
-
/* Exported variables */
afs_rwlock_t afs_xconn; /* allocation lock for new things */
afs_rwlock_t afs_xinterface; /* for multiple client address */
-
-/* Local variables */
-afs_int32 cryptall = 0;
+afs_int32 cryptall = 0; /* encrypt all communications */
unsigned int VNOSERVERS = 0;
-struct conn *afs_Conn(afid, areq, locktype)
- register struct VenusFid *afid;
- register struct vrequest *areq;
- afs_int32 locktype;
+struct conn *afs_Conn(register struct VenusFid *afid,
+ register struct vrequest *areq, afs_int32 locktype)
{
u_short fsport=AFS_FSPORT;
struct volume *tv;
- struct conn *tconn = (struct conn *)0;
- struct srvAddr *lowp= (struct srvAddr *)0;
+ struct conn *tconn = NULL;
+ struct srvAddr *lowp= NULL;
struct unixuser *tu;
int notbusy;
int i;
afs_FinalizeReq(areq);
areq->volumeError = 1;
}
- return (struct conn *) 0;
+ return NULL;
}
if (tv->serverHost[0] && tv->serverHost[0]->cell) {
if (!sap || ((sap->sa_flags & SRVR_ISDOWN) && !force_if_down)) {
/* sa is known down, and we don't want to force it. */
- return (struct conn *)0;
+ return NULL;
}
ObtainSharedLock(&afs_xconn,15);
if (!tc && !create) {
ReleaseSharedLock(&afs_xconn);
- return (struct conn *)0;
+ return NULL;
}
if (!tc) {
* Having force... true and UTokensBad true simultaneously means that the tokens
* went bad and we're supposed to create a new, unauthenticated, connection.
*/
-struct conn *afs_ConnByHost(aserver, aport, acell, areq, aforce, locktype)
- struct server *aserver;
- afs_int32 acell;
- unsigned short aport;
- struct vrequest *areq;
- int aforce;
- afs_int32 locktype;
-{ /*afs_ConnByHost*/
-
+struct conn *afs_ConnByHost(struct server *aserver, unsigned short aport,
+ afs_int32 acell, struct vrequest *areq, int aforce, afs_int32 locktype)
+{
struct unixuser *tu;
struct conn *tc=0;
struct srvAddr *sa=0;
} /*afs_ConnByHost*/
-struct conn *afs_ConnByMHosts(ahosts, aport, acell, areq, locktype)
- struct server *ahosts[];
- afs_int32 acell;
- unsigned short aport;
- register struct vrequest *areq;
- afs_int32 locktype;
+struct conn *afs_ConnByMHosts(struct server *ahosts[], unsigned short aport,
+ afs_int32 acell, register struct vrequest *areq, afs_int32 locktype)
{
register afs_int32 i;
register struct conn *tconn;
/* try to find any connection from the set */
AFS_STATCNT(afs_ConnByMHosts);
for (i=0;i<MAXCELLHOSTS;i++) {
- if ((ts = ahosts[i]) == (struct server *) 0) break;
+ if ((ts = ahosts[i]) == NULL) break;
tconn = afs_ConnByHost(ts, aport, acell,
areq, 0, locktype);
if (tconn) {
return tconn;
}
}
- return (struct conn *) 0;
+ return NULL;
} /*afs_ConnByMHosts*/
-void afs_PutConn(ac, locktype)
- register struct conn *ac;
- afs_int32 locktype;
+void afs_PutConn(register struct conn *ac, afs_int32 locktype)
{
AFS_STATCNT(afs_PutConn);
ac->refCount--;
client network interface going down. We need to reopen new
connections in this case
*/
-ForceNewConnections(sap)
-struct srvAddr *sap;
+void ForceNewConnections(struct srvAddr *sap)
{
struct conn *tc=0;