mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 15:30:14 +00:00
viced-prototypes-20090315
LICENSE IPL10 FIXES 124251 prototype the viced directory
This commit is contained in:
parent
d5158b2ccb
commit
596614dd76
@ -124,7 +124,10 @@ RCSID
|
||||
|
||||
extern afsUUID FS_HostUUID;
|
||||
extern int hostCount;
|
||||
|
||||
#ifndef INTERPRET_DUMP
|
||||
static int ShowProblems = 1;
|
||||
#endif
|
||||
|
||||
struct cbcounters cbstuff;
|
||||
|
||||
@ -153,7 +156,9 @@ static int TimeOuts[] = {
|
||||
}; /* Anything more: MinTimeOut */
|
||||
|
||||
/* minimum time given for a call back */
|
||||
#ifndef INTERPRET_DUMP
|
||||
static int MinTimeOut = (7 * 60);
|
||||
#endif
|
||||
|
||||
/* Heads of CB queues; a timeout index is 1+index into this array */
|
||||
static afs_uint32 timeout[CB_NUM_TIMEOUT_QUEUES];
|
||||
@ -168,6 +173,8 @@ struct object {
|
||||
|
||||
/* Prototypes for static routines */
|
||||
static struct FileEntry *FindFE(register AFSFid * fid);
|
||||
|
||||
#ifndef INTERPRET_DUMP
|
||||
static struct CallBack *iGetCB(register int *nused);
|
||||
static int iFreeCB(register struct CallBack *cb, register int *nused);
|
||||
static struct FileEntry *iGetFE(register int *nused);
|
||||
@ -188,11 +195,12 @@ static void MultiBreakCallBack_r(struct cbstruct cba[], int ncbas,
|
||||
static int MultiBreakVolumeCallBack_r(struct host *host, int isheld,
|
||||
struct VCBParams *parms, int deletefe);
|
||||
static int MultiBreakVolumeCallBack(struct host *host, int isheld,
|
||||
struct VCBParams *parms);
|
||||
void *rock);
|
||||
static int MultiBreakVolumeLaterCallBack(struct host *host, int isheld,
|
||||
struct VCBParams *parms);
|
||||
void *rock);
|
||||
static int GetSomeSpace_r(struct host *hostp, int locked);
|
||||
static int ClearHostCallbacks_r(struct host *hp, int locked);
|
||||
#endif
|
||||
|
||||
#define GetCB() ((struct CallBack *)iGetCB(&cbstuff.nCBs))
|
||||
#define GetFE() ((struct FileEntry *)iGetFE(&cbstuff.nFEs))
|
||||
@ -1157,9 +1165,10 @@ MultiBreakVolumeCallBack_r(struct host *host, int isheld,
|
||||
** isheld is 1 if the host is held in BreakVolumeCallBacks
|
||||
*/
|
||||
static int
|
||||
MultiBreakVolumeCallBack(struct host *host, int isheld,
|
||||
struct VCBParams *parms)
|
||||
MultiBreakVolumeCallBack(struct host *host, int isheld, void *rock)
|
||||
{
|
||||
struct VCBParams *parms = (struct VCBParams *) rock;
|
||||
|
||||
int retval;
|
||||
H_LOCK;
|
||||
retval = MultiBreakVolumeCallBack_r(host, isheld, parms, 1);
|
||||
@ -1172,9 +1181,9 @@ MultiBreakVolumeCallBack(struct host *host, int isheld,
|
||||
** isheld is 1 if the host is held in BreakVolumeCallBacks
|
||||
*/
|
||||
static int
|
||||
MultiBreakVolumeLaterCallBack(struct host *host, int isheld,
|
||||
struct VCBParams *parms)
|
||||
MultiBreakVolumeLaterCallBack(struct host *host, int isheld, void *rock)
|
||||
{
|
||||
struct VCBParams *parms = (struct VCBParams *)rock;
|
||||
int retval;
|
||||
H_LOCK;
|
||||
retval = MultiBreakVolumeCallBack_r(host, isheld, parms, 0);
|
||||
@ -1243,7 +1252,7 @@ BreakVolumeCallBacks(afs_uint32 volume)
|
||||
henumParms.fid = &fid;
|
||||
henumParms.thead = tthead;
|
||||
H_UNLOCK;
|
||||
h_Enumerate(MultiBreakVolumeCallBack, (char *)&henumParms);
|
||||
h_Enumerate(MultiBreakVolumeCallBack, &henumParms);
|
||||
H_LOCK;
|
||||
if (henumParms.ncbas) { /* do left-overs */
|
||||
struct AFSCBFids tf;
|
||||
@ -1471,9 +1480,9 @@ static int lih_host_held;
|
||||
* are held by other threads.
|
||||
*/
|
||||
static int
|
||||
lih0_r(register struct host *host, register int held,
|
||||
register struct host *hostp)
|
||||
lih0_r(register struct host *host, register int held, void *rock)
|
||||
{
|
||||
struct host *hostp = (struct host *) rock;
|
||||
if (host->cblist
|
||||
&& (hostp && host != hostp)
|
||||
&& (!held && !h_OtherHolds_r(host))
|
||||
@ -1495,9 +1504,10 @@ lih0_r(register struct host *host, register int held,
|
||||
* prevent held hosts from being selected.
|
||||
*/
|
||||
static int
|
||||
lih1_r(register struct host *host, register int held,
|
||||
register struct host *hostp)
|
||||
lih1_r(register struct host *host, register int held, void *rock)
|
||||
{
|
||||
struct host *hostp = (struct host *) rock;
|
||||
|
||||
if (host->cblist
|
||||
&& (hostp && host != hostp)
|
||||
&& (!lih_host || host->ActiveCall < lih_host->ActiveCall)
|
||||
|
@ -117,7 +117,7 @@ static void h_TossStuff_r(register struct host *host);
|
||||
|
||||
/* get a new block of CEs and chain it on CEFree */
|
||||
static void
|
||||
GetCEBlock()
|
||||
GetCEBlock(void)
|
||||
{
|
||||
register struct CEBlock *block;
|
||||
register int i;
|
||||
@ -142,7 +142,7 @@ GetCEBlock()
|
||||
|
||||
/* get the next available CE */
|
||||
static struct client *
|
||||
GetCE()
|
||||
GetCE(void)
|
||||
{
|
||||
register struct client *entry;
|
||||
|
||||
@ -199,7 +199,7 @@ struct HTBlock { /* block of HTSPERBLOCK file entries */
|
||||
|
||||
/* get a new block of HTs and chain it on HTFree */
|
||||
static void
|
||||
GetHTBlock()
|
||||
GetHTBlock(void)
|
||||
{
|
||||
register struct HTBlock *block;
|
||||
register int i;
|
||||
@ -234,7 +234,7 @@ GetHTBlock()
|
||||
|
||||
/* get the next available HT */
|
||||
static struct host *
|
||||
GetHT()
|
||||
GetHT(void)
|
||||
{
|
||||
register struct host *entry;
|
||||
|
||||
@ -267,8 +267,6 @@ hpr_Initialize(struct ubik_client **uclient)
|
||||
struct rx_connection *serverconns[MAXSERVERS];
|
||||
struct rx_securityClass *sc[3];
|
||||
struct afsconf_dir *tdir;
|
||||
char tconfDir[100] = "";
|
||||
char tcell[64] = "";
|
||||
struct ktc_token ttoken;
|
||||
afs_int32 scIndex;
|
||||
struct afsconf_cell info;
|
||||
@ -1066,7 +1064,7 @@ h_TossStuff_r(register struct host *host)
|
||||
* released, 1 if it should be held after enumeration.
|
||||
*/
|
||||
void
|
||||
h_Enumerate(int (*proc) (), char *param)
|
||||
h_Enumerate(int (*proc) (struct host*, int, void *), void *param)
|
||||
{
|
||||
register struct host *host, **list;
|
||||
register int *held;
|
||||
@ -1120,7 +1118,8 @@ h_Enumerate(int (*proc) (), char *param)
|
||||
* be held after enumeration.
|
||||
*/
|
||||
void
|
||||
h_Enumerate_r(int (*proc) (), struct host *enumstart, char *param)
|
||||
h_Enumerate_r(int (*proc) (struct host *, int, void *),
|
||||
struct host *enumstart, void *param)
|
||||
{
|
||||
register struct host *host, *next;
|
||||
int held = 0;
|
||||
@ -1975,7 +1974,7 @@ int num_lrealms = -1;
|
||||
|
||||
/* not reentrant */
|
||||
void
|
||||
h_InitHostPackage()
|
||||
h_InitHostPackage(void)
|
||||
{
|
||||
memset(&nulluuid, 0, sizeof(afsUUID));
|
||||
afsconf_GetLocalCell(confDir, localcellname, PR_MAXNAMELEN);
|
||||
@ -2459,7 +2458,7 @@ h_UserName(struct client *client)
|
||||
|
||||
|
||||
void
|
||||
h_PrintStats()
|
||||
h_PrintStats(void)
|
||||
{
|
||||
ViceLog(0,
|
||||
("Total Client entries = %d, blocks = %d; Host entries = %d, blocks = %d\n",
|
||||
@ -2469,8 +2468,9 @@ h_PrintStats()
|
||||
|
||||
|
||||
static int
|
||||
h_PrintClient(register struct host *host, int held, StreamHandle_t * file)
|
||||
h_PrintClient(register struct host *host, int held, void *rock)
|
||||
{
|
||||
StreamHandle_t *file = (StreamHandle_t *)rock;
|
||||
register struct client *client;
|
||||
int i;
|
||||
char tmpStr[256];
|
||||
@ -2531,7 +2531,7 @@ h_PrintClient(register struct host *host, int held, StreamHandle_t * file)
|
||||
* if known
|
||||
*/
|
||||
void
|
||||
h_PrintClients()
|
||||
h_PrintClients(void)
|
||||
{
|
||||
time_t now;
|
||||
char tmpStr[256];
|
||||
@ -2558,8 +2558,10 @@ h_PrintClients()
|
||||
|
||||
|
||||
static int
|
||||
h_DumpHost(register struct host *host, int held, StreamHandle_t * file)
|
||||
h_DumpHost(register struct host *host, int held, void *rock)
|
||||
{
|
||||
StreamHandle_t *file = (StreamHandle_t *)rock;
|
||||
|
||||
int i;
|
||||
char tmpStr[256];
|
||||
char hoststr[16];
|
||||
@ -2607,7 +2609,7 @@ h_DumpHost(register struct host *host, int held, StreamHandle_t * file)
|
||||
|
||||
|
||||
void
|
||||
h_DumpHosts()
|
||||
h_DumpHosts(void)
|
||||
{
|
||||
time_t now;
|
||||
StreamHandle_t *file = STREAM_OPEN(AFSDIR_SERVER_HOSTDUMP_FILEPATH, "w");
|
||||
@ -3376,7 +3378,7 @@ static struct AFSFid zerofid;
|
||||
* from other events.
|
||||
*/
|
||||
static int
|
||||
CheckHost(register struct host *host, int held)
|
||||
CheckHost(register struct host *host, int held, void *rock)
|
||||
{
|
||||
register struct client *client;
|
||||
struct rx_connection *cb_conn = NULL;
|
||||
@ -3787,9 +3789,9 @@ printInterfaceAddr(struct host *host, int level)
|
||||
if (host->interface) {
|
||||
/* check alternate addresses */
|
||||
number = host->interface->numberOfInterfaces;
|
||||
if (number == 0)
|
||||
if (number == 0) {
|
||||
ViceLog(level, ("no-addresses "));
|
||||
else {
|
||||
} else {
|
||||
for (i = 0; i < number; i++)
|
||||
ViceLog(level, ("%s:%d ", afs_inet_ntoa_r(host->interface->interface[i].addr, hoststr),
|
||||
ntohs(host->interface->interface[i].port)));
|
||||
|
@ -232,24 +232,24 @@ extern struct host *h_Alloc_r(register struct rx_connection *r_con);
|
||||
extern int h_Lookup_r(afs_uint32 hostaddr, afs_uint16 hport,
|
||||
int *heldp, struct host **hostp);
|
||||
extern struct host *h_LookupUuid_r(afsUUID * uuidp);
|
||||
extern void h_Enumerate(int (*proc) (), char *param);
|
||||
extern void h_Enumerate_r(int (*proc) (), struct host *enumstart, char *param);
|
||||
extern void h_Enumerate(int (*proc) (struct host *, int, void *), void *param);
|
||||
extern void h_Enumerate_r(int (*proc) (struct host *, int, void *), struct host *enumstart, void *param);
|
||||
extern struct host *h_GetHost_r(struct rx_connection *tcon);
|
||||
extern struct client *h_FindClient_r(struct rx_connection *tcon);
|
||||
extern int h_ReleaseClient_r(struct client *client);
|
||||
extern struct client *h_ID2Client(afs_int32 vid);
|
||||
extern int GetClient(struct rx_connection *tcon, struct client **cp);
|
||||
extern int PutClient(struct client **cp);
|
||||
extern void h_PrintStats();
|
||||
extern void h_PrintClients();
|
||||
extern void h_GetWorkStats();
|
||||
extern void h_PrintStats(void);
|
||||
extern void h_PrintClients(void);
|
||||
extern void h_GetWorkStats(int *, int *, int *, afs_int32);
|
||||
extern void h_flushhostcps(register afs_uint32 hostaddr,
|
||||
register afs_uint16 hport);
|
||||
extern void h_GetHostNetStats(afs_int32 * a_numHostsP, afs_int32 * a_sameNetOrSubnetP,
|
||||
afs_int32 * a_diffSubnetP, afs_int32 * a_diffNetworkP);
|
||||
extern int h_NBLock_r(register struct host *host);
|
||||
extern void h_DumpHosts();
|
||||
extern void h_InitHostPackage();
|
||||
extern void h_DumpHosts(void);
|
||||
extern void h_InitHostPackage(void);
|
||||
extern void h_CheckHosts();
|
||||
struct Interface *MultiVerifyInterface_r();
|
||||
extern int initInterfaceAddr_r(struct host *host, struct interfaceAddr *interf);
|
||||
|
@ -1298,7 +1298,7 @@ ParseArgs(int argc, char *argv[])
|
||||
rxMaxMTU, RX_MIN_PACKET_SIZE,
|
||||
RX_MAX_PACKET_DATA_SIZE);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
} else if (!strcmp(argv[i], "-realm")) {
|
||||
extern char local_realms[AFS_NUM_LREALMS][AFS_REALM_SZ];
|
||||
extern int num_lrealms;
|
||||
|
Loading…
Reference in New Issue
Block a user