From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f678f,8a0826014dfc742e X-Google-Attributes: gidf678f,public X-Google-ArrivalTime: 1993-06-08 18:46:21 PST Path: gmd.de!xlink.net!howland.reston.ans.net!usc!cs.utexas.edu!rutgers!rochester!news.crd.ge.com!sunblossom!knight.vf.ge.com!news.ge.com!psinntp!psinntp!ibism!gjb From: gjb@fig.citib.com (Greg Brail) Newsgroups: comp.unix.osf.misc Subject: Re: peer to peer impossible in dce? Message-ID: Date: 8 Jun 93 15:24:31 GMT References: <1993Jun7.151247.2332@walter.bellcore.com> Sender: news@fig.citib.com Organization: Citibank IBISM 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