#!/bin/more

Andrew L. Sandoval
sandoval@perigee.net
8/21/97

This directory contains a very simple (easy) DCE application.  One of my
biggest frustrations as I began learning DCE was in finding a simple
application that taught the basics (i.e. Hello World) of DCE programming.  I
finally found the "context_app" that was contained in the OSF DCE 1.2.2
examples.tar.gz file.  "context_app" was extremely simple and compares
fairly well to "easy" with one major exception: there is no attempt in
"easy" to export bindings to the CDS.

Well, since there is no CDS for Linux YET(and since I have not yet figured out
how to use the Transarc/Solaris CDS with a Linux RPC server) there is no
point trying to include related code in this example.

This example assumes that you have already started rpcd { cd
/opt/dcelocal/bin; (rm ../var/rpc/*.dat if needed); rpcd }.  It also assumes
that you are indeed on a machine with LinuxThreads 0.6 installed and a
COMPATIBLE version of libc, and that you have a WORKING ethernet interface.

What it does:  Nothing special.  The server has two calls in the interface. 
One that lets you write a message to a log file (the server calls syslog),
and another that let's you see what the last message written was.

How to Start it:

Starting the Server is simple.  AS OF 8/21/97 I have not got UDP working,
so, you should have set the following environment variables (prior to
starting rpcd):
1) export NLSPATH=$NLSPATH:/opt/dcelocal/NLS/%L/%N
2) export LANG=C
3) export RPC_SUPPORTED_PROTSEQS="ncacn_ip_tcp"

Then start the server with:
./easy_server

To keep it running in the foreground use the +f flag.  For full DCE debug
messages use +d (which also keeps the server in the foreground).  To specify
that the server SHOULD NOT register with the endpoint map use the -e flag.

To run the Client type:
./easy_client -s "your ip address"

If you used the -e flag when starting the server, you must specify the port
number when starting the client, like this:
./easy_client -s 192.168.1.21 -# 1032

(assuming the server showed ncacn_ip_tcp:192.168.1.21[1032] for it's binding)
or:
./easy_client -p "ncacn_ip_tcp" -s 192.168.1.21 -# 1032

NOTE: If the -# flag is used to specify the port, the endpoint map will not
be consulted.

BUILDING:

To build the whole thing type:
make

CONCLUSION:
I hope this example is easy to follow to get the beginner started on DCE
programming.  For the experienced I hope this will save you some time in
putting together a test for your work with Linux DCE RPC.


