#define LWP_STACK_SIZE (16 * 1024)
-/*
- * Routines we need that don't have explicit include file definitions.
- */
-extern char *hostutil_GetNameByINet(); /*Host parsing utility */
-
/*
* Exported variables.
*/
static int xstat_cm_initflag = 0; /*Was init routine called? */
static int xstat_cm_debug = 0; /*Debugging output enabled? */
static int xstat_cm_oneShot = 0; /*One-shot operation? */
-static int (*xstat_cm_Handler) (); /*Probe handler routine */
+static int (*xstat_cm_Handler) (void); /*Probe handler routine */
static PROCESS probeLWP_ID; /*Probe LWP process ID */
static int xstat_cm_numCollections; /*Number of desired collections */
static afs_int32 *xstat_cm_collIDP; /*Ptr to collection IDs desired */
*------------------------------------------------------------------------*/
static int
-xstat_cm_CleanupInit()
+xstat_cm_CleanupInit(void)
{
xstat_cm_ConnInfo = (struct xstat_cm_ConnectionInfo *)0;
xstat_cm_Results.probeNum = 0;
*------------------------------------------------------------------------*/
int
-xstat_cm_ForceProbeNow()
+xstat_cm_ForceProbeNow(void)
{
static char rn[] = "xstat_cm_ForceProbeNow"; /*Routine name */
/*
* ------------------------ Exported functions ------------------------
*/
-extern int xstat_cm_Init();
+extern int xstat_cm_Init(int, struct sockaddr_in *, int,
+ int (*a_ProbeHandler)(void),
+ int, int, afs_int32 *);
/*
* Summary:
* Initialize the xstat_cm module: set up Rx connections to the
* Error value otherwise.
*/
-extern int xstat_cm_ForceProbeNow();
+extern int xstat_cm_ForceProbeNow(void);
/*
* Summary:
* Force an immediate probe to the connected Cache Managers.
* Error value otherwise.
*/
-extern int xstat_cm_Cleanup();
+extern int xstat_cm_Cleanup(int);
/*
* Summary:
* Clean up our memory and connection state.
#include <cmd.h> /*Command line interpreter */
#include <time.h>
#include <string.h>
-
-/*
- * External routines that don't have explicit include file definitions.
- */
-extern struct hostent *hostutil_GetHostByName();
+#include <afs/afsutil.h>
/*
* Command line parameter indices.
*------------------------------------------------------------------------*/
void
-PrintCallInfo()
+PrintCallInfo(void)
{ /*PrintCallInfo */
- static char rn[] = "PrintCallInfo"; /*Routine name */
register int i; /*Loop variable */
int numInt32s; /*# int32words returned */
afs_int32 *currInt32; /*Ptr to current afs_int32 value */
/* Print detailed functional call statistics */
void
-print_cmCallStats()
+print_cmCallStats(void)
{
- static char rn[] = "print_cmCallStats"; /*Routine name */
char *printableTime; /*Ptr to printable time string */
struct afs_CMStats *cmp;
time_t probeTime = xstat_cm_Results.probeTime;
*------------------------------------------------------------------------*/
void
-PrintUpDownStats(a_upDownP)
- struct afs_stats_SrvUpDownInfo *a_upDownP; /*Ptr to server up/down info */
-
+PrintUpDownStats(struct afs_stats_SrvUpDownInfo *a_upDownP)
{ /*PrintUpDownStats */
/*
*------------------------------------------------------------------------*/
void
-PrintOverallPerfInfo(a_ovP)
- struct afs_stats_CMPerf *a_ovP;
-
+PrintOverallPerfInfo(struct afs_stats_CMPerf *a_ovP)
{ /*PrintOverallPerfInfo */
printf("\t%10d numPerfCalls\n", a_ovP->numPerfCalls);
*------------------------------------------------------------------------*/
void
-PrintPerfInfo()
+PrintPerfInfo(void)
{ /*PrintPerfInfo */
- static char rn[] = "PrintPerfInfo"; /*Routine name */
static afs_int32 perfInt32s = (sizeof(struct afs_stats_CMPerf) >> 2); /*Correct # int32s to rcv */
afs_int32 numInt32s; /*# int32words received */
struct afs_stats_CMPerf *perfP; /*Ptr to performance stats */
*------------------------------------------------------------------------*/
void
-PrintOpTiming(a_opIdx, a_opNames, a_opTimeP)
- int a_opIdx;
- char *a_opNames[];
- struct afs_stats_opTimingData *a_opTimeP;
-
+PrintOpTiming(int a_opIdx, char *a_opNames[],
+ struct afs_stats_opTimingData *a_opTimeP)
{ /*PrintOpTiming */
printf
*------------------------------------------------------------------------*/
void
-PrintXferTiming(a_opIdx, a_opNames, a_xferP)
- int a_opIdx;
- char *a_opNames[];
- struct afs_stats_xferData *a_xferP;
-
+PrintXferTiming(int a_opIdx, char *a_opNames[],
+ struct afs_stats_xferData *a_xferP)
{ /*PrintXferTiming */
printf
*------------------------------------------------------------------------*/
void
-PrintErrInfo(a_opIdx, a_opNames, a_opErrP)
- int a_opIdx;
- char *a_opNames[];
- struct afs_stats_RPCErrors *a_opErrP;
-
+PrintErrInfo(int a_opIdx, char *a_opNames[],
+ struct afs_stats_RPCErrors *a_opErrP)
{ /*PrintErrInfo */
printf
*------------------------------------------------------------------------*/
void
-PrintRPCPerfInfo(a_rpcP)
- struct afs_stats_RPCOpInfo *a_rpcP;
-
+PrintRPCPerfInfo(struct afs_stats_RPCOpInfo *a_rpcP)
{ /*PrintRPCPerfInfo */
int currIdx; /*Loop variable */
*------------------------------------------------------------------------*/
void
-PrintFullPerfInfo()
+PrintFullPerfInfo(void)
{ /*PrintFullPerfInfo */
struct afs_stats_AuthentInfo *authentP; /*Ptr to authentication stats */
struct afs_stats_AccessInfo *accessinfP; /*Ptr to access stats */
- struct afs_stats_AuthorInfo *authorP; /*Ptr to authorship stats */
static afs_int32 fullPerfInt32s = (sizeof(struct afs_stats_CMFullPerf) >> 2); /*Correct #int32s */
afs_int32 numInt32s; /*# int32s actually received */
struct afs_stats_CMFullPerf *fullP; /*Ptr to full perf info */
*------------------------------------------------------------------------*/
int
-CM_Handler()
+CM_Handler(void)
{ /*CM_Handler */
static char rn[] = "CM_Handler"; /*Routine name */
*------------------------------------------------------------------------*/
static int
-CountListItems(a_firstItem)
- struct cmd_item *a_firstItem;
-
+CountListItems(struct cmd_item *a_firstItem)
{ /*CountListItems */
int list_len; /*List length */
#include "AFS_component_version_number.c"
-
-main(argc, argv)
- int argc;
- char **argv;
-
+int
+main(int argc, char **argv)
{ /*Main routine */
static char rn[] = "xstat_cm_test"; /*Routine name */
#include <lwp.h> /*Lightweight process package */
#include <afs/afsutil.h>
+#include <afs/afscbint.h>
#include <string.h>
#define LWP_STACK_SIZE (16 * 1024)
-/*
- * Routines we need that don't have explicit include file definitions.
- */
-extern int RXAFSCB_ExecuteRequest(); /*AFS callback dispatcher */
-extern char *hostutil_GetNameByINet(); /*Host parsing utility */
-
-/*
- * Help out the linker by explicitly importing the callback routines
- * File Servers may be lobbing at us.
- */
-extern afs_int32 SRXAFSCB_CallBack();
-extern afs_int32 SRXAFSCB_InitCallBackState3();
-extern afs_int32 SRXAFSCB_Probe();
-extern afs_int32 SRXAFSCB_ProbeUUID();
-extern afs_int32 SRXAFSCB_GetCE();
-extern afs_int32 SRXAFSCB_GetLock();
+/* This should really be in a header file */
+extern int RXAFSCB_ExecuteRequest(struct rx_call *z_call);
/*
* Exported variables.
static int xstat_fs_initflag = 0; /*Was init routine called? */
static int xstat_fs_debug = 0; /*Debugging output enabled? */
static int xstat_fs_oneShot = 0; /*One-shot operation? */
-static int (*xstat_fs_Handler) (); /*Probe handler routine */
+static int (*xstat_fs_Handler) (void); /*Probe handler routine */
static PROCESS probeLWP_ID; /*Probe LWP process ID */
static int xstat_fs_numCollections; /*Number of desired collections */
static afs_int32 *xstat_fs_collIDP; /*Ptr to collection IDs desired */
*------------------------------------------------------------------------*/
static int
-xstat_fs_CleanupInit()
+xstat_fs_CleanupInit(void)
{
afs_int32 code; /*Return code from callback stubs */
struct rx_call *rxcall; /*Bogus param */
afs_int32 numColls; /*Number of collections to get */
afs_int32 *currCollIDP; /*Curr collection ID desired */
- static afs_int32 xstat_VersionNumber; /*Version # of server */
-
/*
* Set up some numbers we'll need.
*/
int
xstat_fs_Init(int a_numServers, struct sockaddr_in *a_socketArray,
- int a_ProbeFreqInSecs, int (*a_ProbeHandler) (), int a_flags,
+ int a_ProbeFreqInSecs, int (*a_ProbeHandler) (void), int a_flags,
int a_numCollections, afs_int32 * a_collIDP)
{
static char rn[] = "xstat_fs_Init"; /*Routine name */
malloc(a_numServers * sizeof(struct xstat_fs_ConnectionInfo));
if (xstat_fs_ConnInfo == (struct xstat_fs_ConnectionInfo *)0) {
fprintf(stderr,
- "[%s] Can't allocate %d connection info structs (%d bytes)\n",
+ "[%s] Can't allocate %d connection info structs (%lu bytes)\n",
rn, a_numServers,
(a_numServers * sizeof(struct xstat_fs_ConnectionInfo)));
return (-1); /*No cleanup needs to be done yet */
*------------------------------------------------------------------------*/
int
-xstat_fs_ForceProbeNow()
+xstat_fs_ForceProbeNow(void)
{
static char rn[] = "xstat_fs_ForceProbeNow"; /*Routine name */
/*
* ------------------------ Exported functions ------------------------
*/
-extern int xstat_fs_Init();
+extern int xstat_fs_Init(int, struct sockaddr_in *, int, int (*)(void),
+ int, int, afs_int32 *);
/*
* Summary:
* Initialize the xstat_fs module: set up Rx connections to the
* int a_numServers : Num. servers to connect.
* struct sockaddr_in *a_socketArray : Array of server sockets.
* int a_ProbeFreqInSecs : Probe frequency in seconds.
- * int (*a_ProbeHandler)() : Ptr to probe handler fcn.
+ * int (*a_ProbeHandler)(void) : Ptr to probe handler fcn.
* int a_flags : Various flags.
* int a_numCollections : Number of collections desired.
* afs_int32 *a_collIDP : Ptr to collection IDs.
* Error value otherwise.
*/
-extern int xstat_fs_ForceProbeNow();
+extern int xstat_fs_ForceProbeNow(void);
/*
* Summary:
* Force an immediate probe to the connected File Servers.
* Error value otherwise.
*/
-extern int xstat_fs_Cleanup();
+extern int xstat_fs_Cleanup(int);
/*
* Summary:
* Clean up our memory and connection state.
#include <string.h>
#include <afs/afscbint.h> /*Callback interface defs */
+#include <afs/afsutil.h>
int afs_cb_inited = 0;
struct interfaceAddr afs_cb_interface;
* Initialize the callback interface structure
*/
static int
-init_afs_cb()
+init_afs_cb(void)
{
int count;
return 0;
}
-/*
- * Routines we need that don't have explicit include file definitions.
- */
-extern char *hostutil_GetNameByINet(); /*Host parsing utility */
-
+#if XSTAT_FS_CALLBACK_VERBOSE
static char mn[] = "xstat_fs_callback"; /*Module name */
+#endif
/*------------------------------------------------------------------------
* SRXAFSCB_CallBack
afs_int32
SRXAFSCB_WhoAreYou(struct rx_call * rxcall, struct interfaceAddr * addr)
{
- int code = 0;
-
#if XSTAT_FS_CALLBACK_VERBOSE
static char rn[] = "SRXAFSCB_WhoAreYou"; /*Routine name */
char hostName[256]; /*Host name buffer */
struct interfaceAddr * addr,
Capabilities * capabilites)
{
- int code = 0;
-
#if XSTAT_FS_CALLBACK_VERBOSE
static char rn[] = "SRXAFSCB_TellMeAboutYourself"; /*Routine name */
char hostName[256]; /*Host name buffer */
return (0);
}
-int SRXAFSCB_GetDE(a_call, a_index, addr, inode, flags, time, fileName)
- struct rx_call *a_call;
- afs_int32 a_index;
- afs_int32 addr;
- afs_int32 inode;
- afs_int32 flags;
- afs_int32 time;
- char ** fileName;
+int SRXAFSCB_GetDE(struct rx_call *a_call, afs_int32 a_index, afs_int32 addr,
+ afs_int32 inode, afs_int32 flags, afs_int32 time,
+ char **fileName)
{
return RXGEN_OPCODE;
}
#include <cmd.h> /*Command line interpreter */
#include <time.h>
#include <string.h>
-
-/*
- * External routines that don't have explicit include file definitions.
- */
-extern struct hostent *hostutil_GetHostByName();
+#include <afs/afsutil.h>
/*
* Command line parameter indices.
*------------------------------------------------------------------------*/
void
-PrintCallInfo()
+PrintCallInfo(void)
{ /*PrintCallInfo */
-
- static char rn[] = "PrintCallInfo"; /*Routine name */
register int i; /*Loop variable */
int numInt32s; /*# int32words returned */
afs_int32 *currInt32; /*Ptr to current afs_int32 value */
*------------------------------------------------------------------------*/
void
-PrintFullPerfInfo()
+PrintFullPerfInfo(void)
{
- static char rn[] = "PrintFullPerfInfo"; /*Routine name */
static afs_int32 fullPerfInt32s = (sizeof(struct fs_stats_FullPerfStats) >> 2); /*Correct # int32s to rcv */
afs_int32 numInt32s; /*# int32words received */
struct fs_stats_FullPerfStats *fullPerfP; /*Ptr to full perf stats */
*------------------------------------------------------------------------*/
void
-PrintPerfInfo()
+PrintPerfInfo(void)
{
- static char rn[] = "PrintPerfInfo"; /*Routine name */
static afs_int32 perfInt32s = (sizeof(struct afs_PerfStats) >> 2); /*Correct # int32s to rcv */
afs_int32 numInt32s; /*# int32words received */
struct afs_PerfStats *perfP; /*Ptr to performance stats */
void
-PrintCbCounters() {
+PrintCbCounters(void) {
int numInt32s = sizeof(CbCounterStrings)/sizeof(char *);
int i;
afs_uint32 *val=xstat_fs_Results.data.AFS_CollData_val;
*------------------------------------------------------------------------*/
int
-FS_Handler()
+FS_Handler(void)
{
static char rn[] = "FS_Handler"; /*Routine name */
*------------------------------------------------------------------------*/
int
-RunTheTest(struct cmd_syndesc *a_s)
+RunTheTest(struct cmd_syndesc *a_s, void *dummy)
{
static char rn[] = "RunTheTest"; /*Routine name */
int code; /*Return code */