Usenet comp.unix.osf.misc (1992-2004)
 help / color / mirror / Atom feed
* DCE rpc error athwart
@ 1994-03-16 21:08 Steven Noyd Jones
  1994-03-17 18:07 ` Greg Brail
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Steven Noyd Jones @ 1994-03-16 21:08 UTC (permalink / raw)


I'm porting an rpc client and server from NCS to DCE and have 
run into a problem I can't see anyway around.  I've got 
my rpcd, secd, cdsd, nsid, gdad and other friends running
so I'm assuming the the DCE products are installed correctly on my
OSF 1.3A system.  
 
I am using the IDL compiler to generate the stubs, and that 
works well enough, though I needed to seperate the "main()" from
rpc called routines in order to include the IDL generated include
file.

When I run the client, the "rpc_call_start()" routine in the client 
stub returns with the error status 0x16c9a042, and triggers a core 
dump.  When I run the server, the "rpc_server_listen()" routine in my 
server "main()" program returns with the error status 0x16c9a042 and 
continues.  
 
I've been unable to locate any documented reference to this error
code or code type.  I've reduced the client/server to the most
simple case to no effect; the code is simple enough, but I can't help
but think I'm overlooking something especially basic to the
DCE RPC initialization.    

Any assistance or examples of working programs using well known
endpoints would be appreciated.  Many thanks!

-Steve Jones <noyd@u.washington.edu>
 University of Washington, Seattle  (206) 543-5852
 
** The build procedure:  *********************************************
#!/bin/sh
/usr/bin/idl -no_warn -keep all x.idl
cc -c -g main.c
cc -c -g x.c
cc -c -g -I. x_cstub.c
cc -c -g -I. x_sstub.c
cc -c -g client.c
cc -o client client.o x_cstub.o -ldce -lpthreads  -lc_r -lmach
cc -o server main.o x.o x_sstub.o -ldce -lpthreads  -lc_r -lmach

** The x.idl file:     ************************************************
 
[ 
uuid(5DBA73AC-264D-0000-028C-8E3802000000),
version(1),
endpoint("ncacn_ip_udp:[617]")
] 
interface x {
 
[idempotent]
long int xx(
  [in] handle_t h
);
 
} 
 
** The client.c client main program:    *******************************
#include <stdio.h>
#include <rpc/rpc.h>
#include <dce/rpc.h>
#include <dce/dce_error.h>
 
main(int argc,char **argv)
{ 
  long int rc;
  rpc_binding_handle_t h;
 
  unsigned32 s1,s2;
 
  dce_error_string_t line;
 
  s1 = 0;
  rc = 0;
 
  strcpy(line,"ncacn_ip_tcp:goren1.u.washington.edu[endpoint=617]");
  rpc_binding_from_string_binding(line,&h,&s1);
 
  if (  s1 != rpc_s_ok) {
    dce_error_inq_text(s1,line,&s2);
    fputs("Cannot generate binding handle.\n",stderr);
    exit(0);
  }
 
  rc = xx(h);
  exit(rc);
} 
 
** The main.c server main program:    *********************************
#include <stdio.h>
 
#include <rpc/rpc.h>
#include <exc_handling.h>
#include <dce/rpc.h>
#include <dce/dce_error.h>
#include <dce/rpcexc.h>
 
/* IDL generated include file */
#include "x.h"
 
main(int argc, char **argv)
{ 
  unsigned32 s1,s2;
  dce_error_string_t line;
  
  s1 = 0;
 
/* register the server with the rpc runtime */
  rpc_server_register_if(x_v1_0_s_ifspec,NULL,NULL,&s1);
 
  if (s1 != rpc_s_ok ) {
    dce_error_inq_text(s1,line,&s2);
    fprintf(stderr,"%s\n",line);
    exit(1);
  }
 
/* enable use of protocols and defined well known end points */
  rpc_server_use_all_protseqs_if(rpc_c_protseq_max_reqs_default,
                        x_v1_0_s_ifspec,&s1);
  if (s1 != rpc_s_ok) {
    dce_error_inq_text(s1,line,&s2);
    fprintf(stderr,"%s\n",line);
    exit(1);
  }
 
  rpc_server_listen(1,&s1);
  
  dce_error_inq_text(s1,line,&s2);
  fprintf(stderr,"%s\n",line);
  exit(0);
} 
 
** The x.c server rpc function:       ********************************
long int xx(rpc_binding_handle_t h)
{ 
  return(1);
} 
-- 
--
  Steven Jones
  Computing & Communications JE-30,  University of Washington
  E-mail:  noyd@cac.washington.edu    Phone:  (206) 543-5852


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1994-03-25 14:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-03-16 21:08 DCE rpc error athwart Steven Noyd Jones
1994-03-17 18:07 ` Greg Brail
1994-03-17 20:44 ` Henry Lee
1994-03-18  0:15 ` DCE rpc error athwart (summary) Steven Noyd Jones
1994-03-22 18:33   ` Steven Noyd Jones
1994-03-25 14:23     ` Dave Skeen

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