Querying Server Configuration
Go Up to Querying the Services Manager
You can use the following items with isc_service_query()
to request information about the InterBase server configuration.
Server configuration items | Purpose | Return length |
Return value |
---|---|---|---|
|
The version of the Services Manager. |
4 bytes |
Unsigned long |
|
The version of the InterBase server. |
2 bytes + string |
String |
|
The implementation string, or platform, of the server; for example, |
2 bytes + string |
String |
|
All software activation certificate IDs and keys currently enabled on the server. |
See below |
See below |
|
A bitmask representing the software activation certificate options currently enabled on the server; reserved for future implementation. |
4 bytes |
Bitmask |
|
A bitmask representing the capabilities currently enabled on the server; reserved for future implementation. |
4 bytes |
Bitmask |
|
The parameters and values in the |
See below |
See below |
|
The location of the InterBase root directory on the server; this is the value of the |
2 bytes + string |
String |
|
The location of the InterBase lock manager file on the server; this is the value of the |
2 bytes + string |
String |
|
The location of the InterBase message file on the server; this is the value of the |
2 bytes + string |
String |
Services API queries: Services Manager version
. . .
case isc_info_svc_version: {
unsigned long svcversion;
p += sizeof (unsigned short);
svcversion = (unsigned long)
isc_portable_integer (p, sizeof(unsigned long));
printf ("Service Manager Version: %d\n", svcversion);
p += sizeof (unsigned long);
break;
}
. . .
Services API queries: server version
. . .
case isc_info_svc_server_version: {
path_length = (unsigned short)
isc_portable_integer (p, sizeof(unsigned short));
p += sizeof (unsigned short);
buffer = (char*) malloc (path_length);
strncpy (buffer, p, path_length);
buffer [path_length] = '\0';
printf ("Server version: %s\n", buffer);
p += path_length;
break;
}
. . .
Services API queries: server implementation
. . .
case isc_info_svc_implementation: {
path_length = (unsigned short)
isc_portable_integer (p, sizeof(unsigned short));
p += sizeof (unsigned short);
buffer = (char*) malloc (path_length);
strncpy (buffer, p, path_length);
buffer [path_length] = '\0';
printf ("Server implementation: %s\n", buffer);
p += path_length;
break;
}
. . .
Services API queries: license mask
. . .
case isc_info_svc_get_license_mask: {
unsigned long mask;
printf ("License Information:\n");
p += sizeof (unsigned short);
mask = (unsigned long)
isc_vax_integer (p, sizeof(unsigned long));
if (mask & LIC_S)
printf ("\tRemote Server Enabled\n");
p += sizeof (unsigned long);
break;
}
. . .
Querying using Services API: server capabilities
. . .
case isc_info_svc_capabilities: {
unsigned long capabilities;
printf ("Server Capabilities:\n");
p += sizeof (unsigned short);
capabilities = (unsigned long)
isc_vax_integer (p, sizeof(unsigned long));
if (capabilities & MULTI_CLIENT_SUPPORT)
printf ("\tSupports multiple clients\n");
p += sizeof (unsigned long);
break;
}
. . .
Querying using Services API: location of the server root directory
. . .
case isc_info_svc_get_env: {
path_length = (unsigned short)
isc_portable_integer (p, sizeof(unsigned short));
p += sizeof (unsigned short);
buffer = (char*) malloc (path_length);
strncpy (buffer, p, path_length);
buffer [path_length] = '\0';
printf ("Value of $InterBase: %s\n", buffer);
free(buffer);
p += path_length;
break;
}
. . .
Querying using Services API: location of the server lock file
. . .
case isc_info_svc_get_env_lock: {
path_length = (unsigned short)
isc_portable_integer (p, sizeof(unsigned short));
p += sizeof (unsigned short);
buffer = (char*) malloc (path_length);
strncpy (buffer, p, path_length);
buffer [path_length] = '\0';
printf ("Path to <hostname>.lck: %s\n", buffer);
free(buffer);
p += path_length;
break;
}
. . .
Querying the location of the message file using the Services API
. . .
case isc_info_svc_get_env_msg: {
path_length = (unsigned short)
isc_portable_integer (p, sizeof(unsigned short));
p += sizeof (unsigned short);
buffer = (char*) malloc (path_length);
strncpy (buffer, p, path_length);
buffer [path_length] = '\0';
printf ("Path to InterBase.MSG: %s\n", buffer);
p += path_length;
break;
}
. . .