Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Biology grows on you.


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

Re: PATHSEND/SERVERCLASS SEND procedure from C

<1a7dcef9-8005-486e-88d0-d440c6403019n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.sys.tandem
X-Received: by 2002:ac8:5d8f:: with SMTP id d15mr16156445qtx.350.1622485665945; Mon, 31 May 2021 11:27:45 -0700 (PDT)
X-Received: by 2002:a25:9a01:: with SMTP id x1mr32945560ybn.269.1622485665720; Mon, 31 May 2021 11:27:45 -0700 (PDT)
Path: i2pn2.org!i2pn.org!news.uzoreto.com!tr2.eu1.usenetexpress.com!feeder.usenetexpress.com!tr1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.sys.tandem
Date: Mon, 31 May 2021 11:27:45 -0700 (PDT)
In-Reply-To: <ea5ae019-55da-45a7-9e84-073f11f65915n@googlegroups.com>
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> <eb9b8c4a-8083-431f-8a50-953b928db360n@googlegroups.com> <ea5ae019-55da-45a7-9e84-073f11f65915n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <1a7dcef9-8005-486e-88d0-d440c6403019n@googlegroups.com>
Subject: Re: PATHSEND/SERVERCLASS SEND procedure from C
From: rkd...@gmail.com (Keith Dick)
Injection-Date: Mon, 31 May 2021 18:27:45 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 215
 by: Keith Dick - Mon, 31 May 2021 18:27 UTC

On Monday, May 31, 2021 at 10:37:22 AM UTC-7, Randall wrote:
> On Monday, May 31, 2021 at 9:57:15 a.m. UTC-4, rkd...@gmail.com wrote:
> > On Monday, May 31, 2021 at 4:07:06 AM UTC-7, uros kusar wrote:
> > > petek, 28. maj 2021 ob 22:22:59 UTC+2 je oseba rkd...@gmail.com napisala:
> > > > On Friday, May 28, 2021 at 12:49:03 PM UTC-7, Bill Honaker wrote:
> > > > > On Fri, 28 May 2021 00:06:17 -0700 (PDT), uros kusar <uros....@gmail.com> wrote:
> > > > >
> > > > > >Hi,
> > > > > >I'm writing C program that would get the status of the xpnet objects (stations,processes,node...). I'm using procedures described in the HP 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 what am I doing wrong?
> > > > > >
> > > > > >This is the code that I'm working on:
> > > > > >----------------------------------------------------------------------------------------------------------------
> > > > > >include <stdlib.h>
> > > > > >#include <stdio.h>
> > > > > >#include <string.h>
> > > > > >#include <cextdecs (SERVERCLASS_SEND_, SERVERCLASS_SEND_INFO_)> nolist
> > > > > >#include <tal.h>
> > > > > >
> > > > > >main()
> > > > > >{
> > > > > >short error, error2,pserror, fserror,countread;
> > > > > >char *pmon;
> > > > > >char *buffer;
> > > > > >char *sname;
> > > > > >
> > > > > >pmon ="$D1MN";
> > > > > >sname = "SERVER-NCPI-1A";
> > > > > >buffer ="STATUS PROCESS P1A^BICUNI1";
> > > > > >
> > > > > >error = SERVERCLASS_SEND_ (pmon,
> > > > > > (short) strlen(pmon), /* pathmon */
> > > > > > sname,
> > > > > > (short) strlen(sname), /* server class */
> > > > > > buffer,
> > > > > > (short) strlen(buffer),
> > > > > > 200,
> > > > > > &countread,
> > > > > > -1); /* timeout = forever */
> > > > > >
> > > > > >if (error != 0)
> > > > > > {
> > > > > > error2 = SERVERCLASS_SEND_INFO_ (&pserror, &fserror);
> > > > > > printf ("\nSERVERCLASS_SEND_ error = %d, pathsend error = %d, fs error = %d\n", error, pserror, fserror);
> > > > > > exit (1);
> > > > > > }
> > > > > >else
> > > > > > {
> > > > > > buffer [countread] = 0;
> > > > > > printf ("\nReply = %s\n", buffer);
> > > > > > }
> > > > > >}
> > > > > >----------------------------------------------------------------------------------------------------------------
> > > > > >Response:
> > > > > >SERVERCLASS_SEND_ error = 233, pathsend error = 904, fs error = 12
> > > > > >
> > > > > >Best Regards,
> > > > > >Uros
> > > > > Uros,
> > > > >
> > > > > Keith and Randall gave very valuable responses.
> > > > >
> > > > > Also one other possibility is that, in creating the link, the PATHMON tried to start a server process.
> > > > > If that server process has a fixed PROCESS NAME for each isntance, and if there is already a running process with that name,
> > > > > the attempt to start the process would get an error 12. Look at the info ("PATHCOM $D1MN;INFO SERVER-NCPI-1A") and
> > > > > check what is in the "PROCESS". If it's present, there will either be one process name, or a list in paraentheses.
> > > > > From a TACL prompt, issue a status command for each process in the list.
> > > > >
> > > > > Bill
> > > > Bill,
> > > >
> > > > Very good remembering that filesystem error 12 is used for attempting to start a process with a name that already exists. I should have remembered that myself. Unless Pathway's link management also uses filesystem error 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 environment by duplicating the configuration of an existing environment and did not know to change the configured fixed server process names.
> > > Hi,
> > >
> > > Thank you all for your help.
> > >
> > > I changed the code:
> > > 1) I added SERVERCLASS_SEND_INFO output error number to see if command was succsesfully processed.
> > > 2) I changed the buffer to a 200-byte array.
> > > 3) I find some tal example of a similar program and I noticed that this 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" servers.
> > >
> > > It is interesting because if I send a command to SERVER-NCP I get a different error code.
> > > SERVER-NCP:
> > > SERVERCLASS_SEND_ error = 233, pathsend error = 904, fs error = 21
> > >
> > > SERVER-NCP-1A:
> > > SERVERCLASS_SEND_ error = 233, pathsend error = 904, fs error = 12
> > > I think that the correct server is a SERVER-NCP.
> > >
> > > ---------------------------------------------------------------------------------------------------------------------------------------------
> > > Pahway server configuration:
> > > MAXLINKMONS 20 [CURRENTLY 2]
> > >
> > > SERVER SERVER-NCPI-1A
> > > LINKDEPTH 1
> > > MAXLINKS 32
> > > MAXSERVERS 3
> > > PROCESS $D1AU (ASSOCIATIVE ON)
> > >
> > > SERVER SERVER-NCP
> > > LINKDEPTH 32
> > > MAXLINKS 32
> > > MAXSERVERS 3
> > > PROCESS $D1C1
> > > PROCESS $D1C2
> > > PROCESS $D1C3
> > > ---------------------------------------------------------------------------------------------------------------------------------------------
> > > code:
> > > #include <stdlib.h>
> > > #include <stdio.h>
> > > #include <string.h>
> > > #include <tal.h>
> > > #include <cextdecs (SERVERCLASS_SEND_, SERVERCLASS_SEND_INFO_)> nolist
> > > main()
> > > {
> > > short error, error2, pserror, fserror,countread;
> > > char *pmon;
> > > char buffer [200]={0};
> > > char *sname;
> > >
> > > pmon ="$D1MN";
> > > sname = "SERVER-NCP";
> > > strcpy(buffer,"STATUS PROCESS P1A^BICUNI1");
> > >
> > > error = SERVERCLASS_SEND_ (pmon,
> > > (short)strlen(pmon), /* pathmon */
> > > sname,
> > > (short)strlen(sname), /* server class */
> > > buffer,
> > > (short)strlen(buffer),
> > > 200,
> > > &countread,
> > > -1); /* timeout = forever */
> > > if (error != 0)
> > > {
> > > error2 = SERVERCLASS_SEND_INFO_ (&pserror, &fserror);
> > > printf("\nSERVERCLASS_SEND_INFO error = %d \nSERVERCLASS_SEND_ error = %d, pathsend error = %d, fs error = %d\n",error2, error, pserror, fserror);
> > > printf("\nBuffer size = %d\n", strlen(buffer));
> > >
> > > int i;
> > > for(i=0; i<strlen(buffer); i++)
> > > {
> > > printf("%c",buffer[i]);
> > > }
> > > printf("\n\n\n");
> > > exit (1);
> > > }
> > > else
> > > {
> > > buffer [countread] = 0;
> > > printf ("\nReply = %s\n", buffer);
> > > }
> > > }
> > Filesystem error 21 usually means an illegal count was specified. That might mean that either the length of the buffer you are sending is wrong or the maximum reply size (200 in this case) is wrong. It might mean something else, since I don't know anything about XPNET.
> >
> > Pathway servers usually take input as data structures with fixed-length fields, not a text string like you would type to a command interpreter. Are you sure that the server you are sending to is expected a text string as its input? Do you have any documentation of what this server's interface is?
> >
> > I notice that, although you show a new program that displays the value of error2, the output that you show does not include the line that would show the value of error2. Did you omit showing it because its value was 0, or are you showing output from a different version of your program?
> I too do not remember much about XPNet, but I thought it was not SERVERCLASS_SEND_ compatible - in particular, does not require a qualified name on the Open, like $XPN.#XPNET?

Given that Uros' most recent post shows a Pathway configuration, whatever he is trying to communicate with appears to be a Pathway serverclass and so should be able to accept a request sent by SEVERCLASS_SEND_. Pathway servers usually don't accept free format text strings as request messages, but I don't immediately recall anything that would prevent one from being written to accept that. I believe the reply messages must have a 16-bit reply code as the first two bytes, at least if it is to be usable from Screen COBOL, but i don't believe there is any similar constraint on the request messages.

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