OSF DCE Application Development Guide--Core Components
Using the DCE Serviceability Application Interface
structure by calling one of the DCE DTS utc_...( )
routines.
const char *argtypes The format-specifier string for the message.
unsigned32 table_index sams file in Section 4.1.2.1.
unsigned32 attributes Message attributes, ORed together.
unsigned32 message_index Index number of the message in the message table
(for example, hel_s_hello in the example at the
beginning of this chapter).
char *format Format argument values for the message.
const char *file Filename string identifying the file to which the
message is to be output.
char progname[dce_svc_c_progname_buffsize]
Program name string, set by the application’s call to
dce_svc_set_progname().
int line Line number in file from where the message was
printed.
pthread_t thread_id ID of the application thread that is causing the
message to be output.
The filter remote control routine is part of the remote serviceability interface, which is
described in detail in Section 4.3.14. Its operation is simple. If filter remote control is
desired, the filter routine should be coded so that its operation can be switched to the
various desired alternatives by the values of static variables to which it has access.
These variables are also accessible to the remote control routine, and can be changed by
it. The filter routine receives an argument string (which it uses to set the variables)
whose contents are entirely application defined.
The following code fragments show a skeleton filter that can be added to the hello_svc.c
example at the beginning of this chapter:
#include <stdarg.h>
#include <dce/svcfilter.h>
<. . .>
/*****
* Filter routine-- once installed, this routine will be called
* automatically every time a serviceability
* routine (in our case, dce_svc_printf()) is
* called to write a message.
*****/
boolean hel_filter(dce_svc_prolog_t prolog,
va_list args)
{
/* Code could be inserted here to test the values of static
variables that would control the operation of the filter,
124245 Tandem Computers Incorporated 4− 31