Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

This system will self-destruct in five minutes.


computers / comp.sys.tandem / Re: PATHSEND/SERVERCLASS SEND procedure from C

Re: PATHSEND/SERVERCLASS SEND procedure from C

<6ea7d7cf-ee30-4a22-ac79-a302d5d84b13n@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=176&group=comp.sys.tandem#176

  copy link   Newsgroups: comp.sys.tandem
X-Received: by 2002:ae9:ef55:: with SMTP id d82mr254697qkg.3.1622735510301;
Thu, 03 Jun 2021 08:51:50 -0700 (PDT)
X-Received: by 2002:a25:b34c:: with SMTP id k12mr894792ybg.6.1622735510105;
Thu, 03 Jun 2021 08:51:50 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.sys.tandem
Date: Thu, 3 Jun 2021 08:51:49 -0700 (PDT)
In-Reply-To: <s9aqo4$vie$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=98.42.228.104; posting-account=Lua_ZwoAAADivbVXQF8uKE7dZSUNm9vj
NNTP-Posting-Host: 98.42.228.104
References: <5be026f4-cadf-46c5-b40d-8d16f689cdc4n@googlegroups.com>
<b0i2bg1gapv2mahulce8cab2qdlcrpht0c@4ax.com> <94ebc487-3d70-4424-a339-5dfc7604a0a5n@googlegroups.com>
<828d83e3-fdd2-4095-9641-ebdbfe13999an@googlegroups.com> <fvfabghrs9m70j629fs6lsj2df9l8lt7uu@4ax.com>
<34f0e5fb-cf04-4b4c-804d-5d9453a8f795n@googlegroups.com> <5a57cdcd-079b-4b84-80ac-e30337104bc3n@googlegroups.com>
<09b4463e-7df3-4a59-a62c-6040a6f29082n@googlegroups.com> <s98kmb$2li$1@dont-email.me>
<74247541-a672-4653-9eae-a3007a8b9b21n@googlegroups.com> <s9aqo4$vie$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6ea7d7cf-ee30-4a22-ac79-a302d5d84b13n@googlegroups.com>
Subject: Re: PATHSEND/SERVERCLASS SEND procedure from C
From: rkd...@gmail.com (Keith Dick)
Injection-Date: Thu, 03 Jun 2021 15:51:50 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Keith Dick - Thu, 3 Jun 2021 15:51 UTC

On Thursday, June 3, 2021 at 7:59:18 AM UTC-7, JShepherd wrote:
> In article <74247541-a672-4653...@googlegroups.com>,
> uros....@gmail.com says...
> >
> >sreda, 02. junij 2021 ob 21:03:41 UTC+2 je oseba JShepherd napisala:
> >> In article <09b4463e-7df3-4a59...@googlegroups.com>,
> >> uros....@gmail.com says...
> >> >
> >> >sreda, 02. junij 2021 ob 10:54:14 UTC+2 je oseba uros kusar napisala:
> >> >> torek, 01. junij 2021 ob 14:10:00 UTC+2 je oseba Dave Bossi napisala:
> >> >> > On Monday, May 31, 2021 at 3:59:31 PM UTC-4, Bill Honaker wrote:=20
> >> >> > > On Mon, 31 May 2021 04:07:05 -0700 (PDT), uros kusar
> <uros....@gmail.=
> >> >com> wrote:=20
> >> >> > >=20
> >> >> > > >petek, 28. maj 2021 ob 22:22:59 UTC+2 je oseba rkd...@gmail.com
> napi=
> >> >sala:=20
> >> >> > > >> On Friday, May 28, 2021 at 12:49:03 PM UTC-7, Bill Honaker
> wrote:=
> >> >=20
> >> >> > > >> > On Fri, 28 May 2021 00:06:17 -0700 (PDT), uros kusar
> <uros....@g=
> >> >mail.com> wrote:=20
> >> >> > > >> >=20
> >> >> > > >> > >Hi,=20
> >> >> > > >> > >I'm writing C program that would get the status of the xpnet
> ob=
> >> >jects (stations,processes,node...). I'm using procedures described in the
> H=
> >> >P manuals(Pathsend and Server programming Manual, C/C++ programmer's
> Guide.=
> >> >..) but I can't get anyting from Pathway except errors. Can you tell me
> wha=
> >> >t am I doing wrong?=20
> >> >> > > >> > >=20
> >> >> > > >> > >This is the code that I'm working on:=20
> >> >> > > >> >
> >---------------------------------------------------------------=
> >> >-------------------------------------------------=20
> >> >> > > >> > >include <stdlib.h>=20
> >> >> > > >> > >#include <stdio.h>=20
> >> >> > > >> > >#include <string.h>=20
> >> >> > > >> > >#include <cextdecs (SERVERCLASS_SEND_,
> SERVERCLASS_SEND_INFO_)>=
> >> > nolist=20
> >> >> > > >> > >#include <tal.h>=20
> >> >> > > >> > >=20
> >> >> > > >> > >main()=20
> >> >> > > >> > >{=20
> >> >> > > >> > >short error, error2,pserror, fserror,countread;=20
> >> >> > > >> > >char *pmon;=20
> >> >> > > >> > >char *buffer;=20
> >> >> > > >> > >char *sname;=20
> >> >> > > >> > >=20
> >> >> > > >> > >pmon =3D"$D1MN";=20
> >> >> > > >> > >sname =3D "SERVER-NCPI-1A";=20
> >> >> > > >> > >buffer =3D"STATUS PROCESS P1A^BICUNI1";=20
> >> >> > > >> > >=20
> >> >> > > >> > >error =3D SERVERCLASS_SEND_ (pmon,=20
> >> >> > > >> > > (short) strlen(pmon), /* pathmon */=20
> >> >> > > >> > > sname,=20
> >> >> > > >> > > (short) strlen(sname), /* server class */=20
> >> >> > > >> > > buffer,=20
> >> >> > > >> > > (short) strlen(buffer),=20
> >> >> > > >> > > 200,=20
> >> >> > > >> > > &countread,=20
> >> >> > > >> > > -1); /* timeout =3D forever */=20
> >> >> > > >> > >=20
> >> >> > > >> > >if (error !=3D 0)=20
> >> >> > > >> > > {=20
> >> >> > > >> > > error2 =3D SERVERCLASS_SEND_INFO_ (&pserror, &fserror);=20
> >> >> > > >> > > printf ("\nSERVERCLASS_SEND_ error =3D %d, pathsend error
> =3D =
> >> >%d, fs error =3D %d\n", error, pserror, fserror);=20
> >> >> > > >> > > exit (1);=20
> >> >> > > >> > > }=20
> >> >> > > >> > >else=20
> >> >> > > >> > > {=20
> >> >> > > >> > > buffer [countread] =3D 0;=20
> >> >> > > >> > > printf ("\nReply =3D %s\n", buffer);=20
> >> >> > > >> > > }=20
> >> >> > > >> > >}=20
> >> >> > > >> >
> >---------------------------------------------------------------=
> >> >-------------------------------------------------=20
> >> >> > > >> > >Response:=20
> >> >> > > >> > >SERVERCLASS_SEND_ error =3D 233, pathsend error =3D 904, fs
> err=
> >> >or =3D 12=20
> >> >> > > >> > >=20
> >> >> > > >> > >Best Regards,=20
> >> >> > > >> > >Uros=20
> >> >> > > >> > Uros,=20
> >> >> > > >> >=20
> >> >> > > >> > Keith and Randall gave very valuable responses.=20
> >> >> > > >> >=20
> >> >> > > >> > Also one other possibility is that, in creating the link, the
> PA=
> >> >THMON tried to start a server process.=20
> >> >> > > >> > If that server process has a fixed PROCESS NAME for each
> isntanc=
> >> >e, and if there is already a running process with that name,=20
> >> >> > > >> > the attempt to start the process would get an error 12. Look
> at =
> >> >the info ("PATHCOM $D1MN;INFO SERVER-NCPI-1A") and=20
> >> >> > > >> > check what is in the "PROCESS". If it's present, there will
> eith=
> >> >er be one process name, or a list in paraentheses.=20
> >> >> > > >> > From a TACL prompt, issue a status command for each process in
> t=
> >> >he list.=20
> >> >> > > >> >=20
> >> >> > > >> > Bill=20
> >> >> > > >> Bill,=20
> >> >> > > >>=20
> >> >> > > >> Very good remembering that filesystem error 12 is used for
> attempt=
> >> >ing to start a process with a name that already exists. I should have
> remem=
> >> >bered that myself. Unless Pathway's link management also uses filesystem
> er=
> >> >ror 12 for other problems, I'd say a duplicate process name is likely to
> be=
> >> > the explanation for this problem. Perhaps Uros has set up a test
> environme=
> >> >nt by duplicating the configuration of an existing environment and did
> not =
> >> >know to change the configured fixed server process names.=20
> >> >> > > >Hi,=20
> >> >> > > >=20
> >> >> > > >Thank you all for your help.=20
> >> >> > > >=20
> >> >> > > >I changed the code:=20
> >> >> > > >1) I added SERVERCLASS_SEND_INFO output error number to see if
> comma=
> >> >nd was succsesfully processed.=20
> >> >> > > >2) I changed the buffer to a 200-byte array.=20
> >> >> > > >3) I find some tal example of a similar program and I noticed that
> t=
> >> >his tal program, sends the command to a different pathway server. I send
> it=
> >> > to the SERVER-NCPI-1A server, which is a server for P1A^NODE. But the
> tal =
> >> >program sends the command to the server SERVER-NCP, which sees all "node"
> s=
> >> >ervers.=20
> >> >> > > >=20
> >> >> > > >It is interesting because if I send a command to SERVER-NCP I get
> a =
> >> >different error code.=20
> >> >> > > >SERVER-NCP:=20
> >> >> > > >SERVERCLASS_SEND_ error =3D 233, pathsend error =3D 904, fs error
> =
> >> >=3D 21=20
> >> >> > > >=20
> >> >> > > >SERVER-NCP-1A:=20
> >> >> > > >SERVERCLASS_SEND_ error =3D 233, pathsend error =3D 904, fs error
> =
> >> >=3D 12=20
> >> >> > > >=20
> >> >> > > >I think that the correct server is a SERVER-NCP.=20
> >> >> > > >=20
> >> >> > >
> >--------------------------------------------------------------------=
> >>
> >-------------------------------------------------------------------------=
> >> >=20
> >> >> > > >Pahway server configuration:=20
> >> >> > > >MAXLINKMONS 20 [CURRENTLY 2]=20
> >> >> > > >=20
> >> >> > > >SERVER SERVER-NCPI-1A=20
> >> >> > > >LINKDEPTH 1=20
> >> >> > > >MAXLINKS 32=20
> >> >> > > >MAXSERVERS 3=20
> >> >> > > >PROCESS $D1AU (ASSOCIATIVE ON)=20
> >> >> > > >=20
> >> >> > > >SERVER SERVER-NCP=20
> >> >> > > > LINKDEPTH 32=20
> >> >> > > > MAXLINKS 32=20
> >> >> > > > MAXSERVERS 3=20
> >> >> > > > PROCESS $D1C1=20
> >> >> > > > PROCESS $D1C2=20
> >> >> > > > PROCESS $D1C3=20
> >> >> > >
> >--------------------------------------------------------------------=
> >>
> >-------------------------------------------------------------------------=
> >> >=20
> >> >> > > >code:=20
> >> >> > > >#include <stdlib.h>=20
> >> >> > > >#include <stdio.h>=20
> >> >> > > >#include <string.h>=20
> >> >> > > >#include <tal.h>=20
> >> >> > > >#include <cextdecs (SERVERCLASS_SEND_, SERVERCLASS_SEND_INFO_)>
> noli=
> >> >st=20
> >> >> > > >main()=20
> >> >> > > >{=20
> >> >> > > >short error, error2, pserror, fserror,countread;=20
> >> >> > > >char *pmon;=20
> >> >> > > >char buffer [200]=3D{0};=20
> >> >> > > >char *sname;=20
> >> >> > > >=20
> >> >> > > >pmon =3D"$D1MN";=20
> >> >> > > >sname =3D "SERVER-NCP";=20
> >> >> > > >strcpy(buffer,"STATUS PROCESS P1A^BICUNI1");=20
> >> >> > > >=20
> >> >> > > >error =3D SERVERCLASS_SEND_ (pmon,=20
> >> >> > > > (short)strlen(pmon), /* pathmon */=20
> >> >> > > > sname,=20
> >> >> > > > (short)strlen(sname), /* server class */=20
> >> >> > > > buffer,=20
> >> >> > > > (short)strlen(buffer),=20
> >> >> > > > 200,=20
> >> >> > > > &countread,=20
> >> >> > > > -1); /* timeout =3D forever */=20
> >> >> > > >if (error !=3D 0)=20
> >> >> > > > {=20
> >> >> > > > error2 =3D SERVERCLASS_SEND_INFO_ (&pserror, &fserror);=20
> >> >> > > > printf("\nSERVERCLASS_SEND_INFO error =3D %d \nSERVERCLASS_SEND_
> er=
> >> >ror =3D %d, pathsend error =3D %d, fs error =3D %d\n",error2, error,
> pserro=
> >> >r, fserror);=20
> >> >> > > > printf("\nBuffer size =3D %d\n", strlen(buffer));=20
> >> >> > > >=20
> >> >> > > > int i;=20
> >> >> > > > for(i=3D0; i<strlen(buffer); i++)=20
> >> >> > > > {=20
> >> >> > > > printf("%c",buffer[i]);=20
> >> >> > > > }=20
> >> >> > > > printf("\n\n\n");=20
> >> >> > > > exit (1);=20
> >> >> > > > }=20
> >> >> > > >else=20
> >> >> > > > {=20
> >> >> > > > buffer [countread] =3D 0;=20
> >> >> > > > printf ("\nReply =3D %s\n", buffer);=20
> >> >> > > > }=20
> >> >> > > >}=20
> >> >> > > I see the original server was setup with 'Asoociative On' It's
> possib=
> >> >le the open table in the server can't accept another open.=20
> >> >> > >=20
> >> >> > > Can't explain the error 21.=20
> >> >> > I would try changing PMON and SNAME from pointers to arrays and see
> if =
> >> >it doesn't help with the error 21.=20
> >> >> >
> >> >> > char pmon[] =3D "$D1MN";
> >> >> > char sname[] =3D "SERVER-NCP";=20
> >> >> >=20
> >> >> > Dave
> >> >> Hi,=20
> >> >>=20
> >> >> Keith, I don't find anything in the manuals, that would show me what to
> s=
> >> >end to the server.=20
> >> >>=20
> >> >> I did not post the complete output to make this thread readable as
> possib=
> >> >le. The SERVERCLASS_SEND_INFO returns 0(OK) and I tried different data
> type=
> >> >s, also arrays instead of pointers. The result is the same. I'm almost
> sure=
> >> > that I need to send command to the SERVER-NCP server instead the
> SERVER-NC=
> >> >PI-1A.=20
> >> >>=20
> >> >> Currently I'm using arrays:=20
> >> >>=20
> >> >> char pmon[5]=3D{0};
> >> >> char buffer [200]=3D{0};
> >> >> char sname[20]=3D{0};=20
> >> >>=20
> >> >> strcpy(pmon,"$D1MN");=20
> >> >> strcpy(sname,"SERVER-NCP");
> >> >> strcpy(buffer,"STATUS PROCESS P1A^BICUNI1");=20
> >> >>=20
> >> >> error =3D SERVERCLASS_SEND_ (pmon,=20
> >> >> (short)strlen(pmon), /* pathmon */=20
> >> >> sname,=20
> >> >> (short)strlen(sname), /* server class */=20
> >> >> buffer,=20
> >> >> (short)strlen(buffer),=20
> >> >> 200,=20
> >> >> &countread,=20
> >> >> -1); /* timeout =3D forever */
> >> >> OUTPUT:=20
> >> >> SERVERCLASS_SEND_INFO error =3D 0
> >> >> SERVERCLASS_SEND_ error =3D 233, pathsend error =3D 904, fs error =3D
> 21
> >> >> Buffer size =3D 26=20
> >> >> STATUS PROCESS P1A^BICUNI1=20
> >> >>=20
> >> >>=20
> >> >> EMS messages:=20
> >> >>=20
> >> >> 21-06-02;10:03:23.101 \PERUN.$D1MN TANDEM.PATHWAY.L01 3116=20
> >> >> \PERUN.$D1MN: ERROR - *3116* LINKMON L\PERUN.$ZP01,=20
> >> >> ERROR DURING SERVER I/O (21) - SERVER SERVER-NCP=20
> >> >>=20
> >> >> 21-06-02;10:03:23.102 \PERUN.$D1SUD TANDEM.VHS.L01 6=20
> >> >> DEV1VHS:=20
> >> >> 02JUN21,10:03 $D1MN: ERROR - *3116* LINKMON L\PERUN.$ZP01, ERROR=20
> >> >> DURING SERVER I/O (21) - SERVER SERVER-NCP. Display text received=20
> >> >> from process $D1MN. Program file \PERUN.$SYSTEM.SYSTEM.PATHMON.=20
> >> >> Primary log file \PERUN.$DATA01.DEV1VHS.LOG0000.=20
> >> >>=20
> >> >> I'm losing ideas what else to try.=20
> >> >>=20
> >> >> Uros
> >> >
> >> >I just notice another EMS error in collector $0
> >> >
> >> > 21-06-02;11:39:59.662 \PERUN.$ZL01 TANDEM.APPCLSTR.L01 1038
> >> > WARNING 1038 - Server \PERUN.$D1MN.SERVER-NCP file
> >> > operation ACS_FS_PSWRITEREAD_() failed, process
> >> > \PERUN.$D1C1:115841149, file \PERUN.$D1C1, error 21
> >> >
> >> >Uros
> >> Are you sure that server accepts a command line text buffer as input ?
> >> Maybe it requires a structured message.
> >>
> >>
> >>
> >> =status SERVER-NCPI-1A
> >> SERVER-NCPI-1A 1
> >>
> >> PROCESS STATE ERROR INFO #LINKS WEIGHT
> >> $S1AU RUNNING 1 3
> >>
> >> 10> wake /highpin off/ $s1au
> >> WRITE error 21 on $S1AU
> >>
> >> 11> wake /highpin off/ $s1au send STATUS
> >> WRITE error 21 on $S1AU
> >
> >
> >Hi,
> >
> >I'm still trying to understand why my code doesn't work. I think that
> something
> >is wrong with the structures.
> >
> >This tal program was written by my coworker.
> >
> >Uros
>
>
>
> From that code it looks like you have to correctly populate the
> request struct and send it
> struct .ncp^rqst( ncp^lex^struct^def );
>
> Then handle the potentially multi-item response coming back
>
> int .ncp^resp( ncp^resp^struct^def ),
>
>
> You will need C versions of all those TAL structs or
> do it in TAL

As JShepherd notes, the TAL code indicates that the request and response messages are not simple text strings, but moderately complex structures. Your coworker had some instructions about how to construct and interpret those structures. If that coworker is still around, ask where he or she got the instructions. If he or she is not still around, you might find some documentation in a file in the subvolume $DATA02.ACIUTILS, or in some other location that contains files from ACI. If you are lucky, ACI provided some documentation and the structure declarations suitable for writing the program in C. If they supplied only help for TAL programmers, you will have a bit of a difficult time if you don't know TAL.

SubjectRepliesAuthor
o PATHSEND/SERVERCLASS SEND procedure from C

By: uros kusar on Fri, 28 May 2021

24uros kusar
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor