Usenet comp.unix.osf.misc (1992-2004)
 help / color / mirror / Atom feed
From: gjb@fig.citib.com (Greg Brail)
Subject: Re: peer to peer impossible in dce?
Date: 8 Jun 93 15:24:31 GMT	[thread overview]
Message-ID: <C8B6sv.DFL@fig.citib.com> (raw)
In-Reply-To: 1993Jun7.151247.2332@walter.bellcore.com

In article <1993Jun7.151247.2332@walter.bellcore.com> grd@scherzo.bellcore.com (Glen Diener) writes:
>There is a very simple peer to peer communication situation
>which I haven't been able to implement in DCE RPC, and
>I'm wondering if anyone else has tried anything similar:
>
>Suppose we have two processes, X and Y, and one rpc procedure
>called ping().  X wants to send ping()'s to Y, and also to reply to
>incoming ping()'s from Y.  This means that X needs to be both 
>client--to send the ping()'s, and server--to reply to the ping()'s.

To do this, you must define your own "manager entry point vector", or
mepv. This is a structure that contains a function pointer to each
server-side function. The RPC runtime uses this data structure to
determine which functions to call for each server-side RPC. It'll call
whatever function each function pointer points to. The definition of
your interface's mepv will be in the .h file generated by idl. It has
"epv_t" at the end of its name, so if your server's interface handle
is Server_v1_0_s_ifspec, the mepv is Server_v1_0_epv_t.

You must allocate one of these structures and make the function
pointers in it point to your server functions. To make this work, you
give your server functions different names than the names you
specified in the IDL file. 

The third parameter of rpc_server_register_if is a pointer to an
rpc_mgr_epv_t, which is what you want. Normally one passes NULL to
this parameter, but in this case, pass a pointer to your mepv
structure.

Also, you must run IDL with the -no_mepv option if you want to do this.
Otherwise, IDL generates an mepv for you that just calls the server
functions with "regular" names. (Consequently, if you run IDL with
no_mepv and you don't create your own mepv, all your RPC calls will
crash your server.)

Now, you call the "normal" RPC function when you want to talk to
another RPC server. When you want to call one of your server
functions, you use the function name you assigned to the mepv structure.

				greg
-- 
Greg Brail ------------------ Citibank -------------------- gjb@fig.citib.com


      parent reply	other threads:[~1993-06-08 15:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-06-07 15:12 peer to peer impossible in dce? Glen Diener
1993-06-07 19:28 ` Rich Salz
1993-06-08 15:24 ` Greg Brail [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox