#ifndef ADG_HEADER_H #define ADG_HEADER_H /************************************************************************************** * Copyright 1998 Compaq Computer Corporation. * Restricted Rights: Use, duplication, or disclosure by the U.S. Government * is subject to restrictions as set forth in subparagraph (c) (1) (ii) of * DFARS 252.227-7013, or in FAR 52.227-19, or in FAR 52.227-14 Alt. III, as * applicable. * This software is proprietary to and embodies the confidential technology of * Compaq Computer Corporation. Possession, use, of copying of this software * and media is authorized only pursuant to a valid written license from Compaq, * Digital or an authorized sublicensor. ***************************************************************************************/ /************************************************************************************** * APPLICATION: RTR Sample Application * MODULE NAME: ADG_HEADER.H * AUTHOR : Compaq Computer Corporation * DESCRIPTION: This header file is to be used with ADG_SERVER.C, * ADG_CLIENT.H, and ADG_SHARED.C. * DATE : Oct 22, 1998 ***************************************************************************************/ /* Header file for ADG_client.c and ADG_server.c */ #include #include /* exit() */ #include #include #include "rtr.h" #define FACILITY_NAME "DESIGN" typedef char String31[31+1]; typedef char String200[199+1]; typedef struct { rtr_uns_8_t routing_key; rtr_uns_32_t server_number; rtr_uns_32_t client_number; rtr_uns_32_t sequence_number; String31 text; } message_data_t; #define MESSAGE_DATA_MSGFMT "%UB%3UL%32C" typedef union { message_data_t receive_data_msg; rtr_status_data_t receive_status_msg; } receive_msg_t; typedef struct { rtr_uns_32_t low; rtr_uns_32_t high; rtr_uns_32_t expected ; rtr_tid_t prior_txn; rtr_uns_32_t prior_seqno; } boundaries_t; /* Function prototype section */ void check_status( const char *call, rtr_status_t status ); void get_client_parameters ( int argc, char *argv[], message_data_t *o_msg, int *txn_cnt); void get_server_parameters ( int argc, char *argv[], message_data_t *o_msg); rtr_status_t send_reply ( const message_data_t *o_msg, rtr_channel_t channel); void close_channel ( rtr_channel_t channel ); void fprint_tid (FILE *fpLog, const rtr_tid_t *tid ); /* External section */ extern String200 Errormsg; extern time_t time_val; extern boundaries_t txn_range[10]; extern char TxnLog[]; extern char SvrLog[]; extern rtr_uns_32_t msg_cnt; extern FILE* fpLog; #endif /* ADG_HEADER_H */