API Guide
601355 Rev A API Functions 2-1011
Functins
11 ****************************************
*********/
12 #ifdef ANSI_C
13 VST_BOOLEAN vst_ping( void )
14 #else
15 VST_BOOLEAN vst_ping()
16 #endif
17 {
18 VST_BOOLEAN rc = VSE_FALSE;
19 VST_COMMAND_HANDLE cmd;
20
21 printf(“*** Pinging VolServ ***\n” );
22
23 /* create the command handle */
24 cmd = VS_Command_Create();
25 if ( cmd != (VST_COMMAND_HANDLE)
NULL)
26 {
27 /* Send the command to the VolServ
software. */
28 /* This will try to “ping” the
VolServ */
29 /* software at the host name and
program */
30 /* number set in VS_Initialize */
31 rc = VSCMD_Ping(cmd);
32 vst_print_command(cmd);
33 if (rc)
34 {
35 printf(“The VolServ software
is active.\n”);
36 }
37 else
38 {
39 printf(“The VolServ software
is down.\n”);
40 }
41 }
42 vst_print_error(VSG_Error);
43 return ( rc );
44 }