From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f678f,61e56fbd3397cdc0,start X-Google-Attributes: gidf678f,public X-Google-ArrivalTime: 1994-03-16 13:08:41 PST Path: gmd.de!newsserver.jvnc.net!netnews.upenn.edu!msuinfo!agate!howland.reston.ans.net!cs.utexas.edu!swrinde!sgiblab!cs.uoregon.edu!reuter.cse.ogi.edu!netnews.nwnet.net!news.u.washington.edu!noyd From: noyd@u.washington.edu (Steven Noyd Jones) Newsgroups: comp.unix.osf.misc Subject: DCE rpc error athwart Followup-To: comp.unix.osf.misc Date: 16 Mar 1994 21:08:41 GMT Organization: University of Washington Message-ID: <2m7sgp$23u@news.u.washington.edu> NNTP-Posting-Host: carson3.u.washington.edu Summary: Exception: status 0x16c9a042 (dce / rpc) Keywords: DCE RPC 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 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 #include #include #include 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 #include #include #include #include #include /* 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