Guardian Application Conversion Guide

Being Opened by and Communicating With a High-PIN Requester
Converting C Applications
096047 Tandem Computers Incorporated 5–31
Replying to System Message -103 (Process Open). The D-series system supports returning a
label value in the reply to a system message -103 (Process open). Typically, an opener-
table index gets sent in this way. This label then appears in the
open_label
field of
future FILE_GETRECEIVEINFO_ procedure calls that provide information about
messages received from the same requester. To support this feature, the file system
expects a reply buffer with a length of 0 to 4 bytes; otherwise, the open in the requester
returns an error.
Your server might reply to an Open message as follows:
write_count = any_valid_integer;
status = REPLYX(reply_buffer,
write_count,
/* count_written */ ,
/* message_tag */ ,
error_return);
To make use of the
open_label
field in the FILE_GETRECEIVEINFO_ procedure,
you must convert your code to reply to the Open message as follows:
reply_buffer[0] = -103;
reply_buffer[1] = open_label_value;
write_count = 4;
status = REPLYX (reply_buffer,
write_count,
/* count_written */ ,
/* message_tag */ ,
error_return);
If you do not want to use the
open_label
field, you still need to be sure that the
reply buffer has a length of 0 to 4 bytes. Convert your server as follows:
write_count = 0;
status = REPLYX (reply_buffer,
write_count,
/* count_written */ ,
/* message_tag */ ,
error_return);
Replying to an Unknown System Message. Your server should be able to handle an
unknown system message. If the first word of a message contains an unknown
message number, call the REPLY[X] procedure with an error indication of 2 (invalid
operation):
status = REPLYX (/* reply_buffer */ ,
/* write_count */ ,
/* count_written */ ,
/* message_tag */ ,
invalid_operation); /* Value is 2 */