Thread View: comp.lang.misc
1 messages
1 total messages
Started by Keith Gemeinhart
Tue, 08 Aug 1995 13:24
Help with RPC programming
Author: Keith Gemeinhart
Date: Tue, 08 Aug 1995 13:24
Date: Tue, 08 Aug 1995 13:24
40 lines
1898 bytes
1898 bytes
XDR unions are discriminated unions allowing different results to be returned
on a conditional basis. The conditional variable is part of the generated data
structure which is used as the case discriminator in switch statements in the
automatically generated source files. The entire discriminated union data
structure is given an identifier in the RPCL protocol definition file which
is used as both a structure tag-name and defined type.
The member name for the union component of this data structure is appended with
"_u" in the output C header file.
I would like to define an additional identifier or tag-name for this union so
that I can then define it as an independent data type. Is there any way to
accomplish this through the existing RPCL without manual modification of the
output header file or duplicating the union specification?
Example:
struct VIEW_ARG {
VIEW_EVENT_TYPE type;
union {
int a;
int b;
int c;
int d;
int e;
} VIEW_ARG_u;
};
typedef struct VIEW_ARG VIEW_ARG;
bool_t xdr_VIEW_ARG();
I would like to be able to reference the VIEW_ARG_u union.
Thank you,
Keith Gemeinhart
--
Keith Gemeinhart (keithg@tsc.com) | Voice: (812) 336 - 7576
Technology Service Corp. | Fax: (812) 336 - 7735
Bloomington, IN | WWW: http://www.tsc.com/css
--
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads