[Info-vax] WASD demo issues
Mark Daniel
mark.daniel at wasd.vsm.com.au
Fri Jan 28 22:16:59 EST 2022
On 28/1/22 9:54 am, issinoho wrote:
> On Thursday, 27 January 2022 at 13:31:29 UTC, issinoho wrote:
>> On Tuesday, 25 January 2022 at 21:59:16 UTC, Mark Daniel wrote:
>>> On 26/1/22 3:53 am, issinoho wrote:
8< snip 8<
> Ok, the root cause of the issue seems to be in the host name resolution, specifically with regard to case sensitivity. Setting an alias with the specific case that WASD is expecting solves the problem.
Confirmed via a little code (see below) and some local database fiddles.
WASD establishes the primary server host name using gethostname(). This
always is returned as lower case regardless of the host name database entry.
All upper or lower case host name works. Does not work with mixed-case.
$ tcpip show host /local
LOCAL database
Host address Host name
127.0.0.1 LOCALHOST, localhost
192.168.1.2 gort.lan
192.168.1.3 klaatu.lan
192.168.1.254 router.lan
$ mcr []lookup "klaatu.lan"
gethostname() klaatu.lan 0
gethostbyname() klaatu.lan %X00061578
$QIO() klaatu.lan %X00000001 %X00000001
$ tcpip show host /local
LOCAL database
Host address Host name
192.168.1.3 KLAATU.LAN
127.0.0.1 LOCALHOST, localhost
192.168.1.2 gort.lan
192.168.1.254 router.lan
192.168.1.86 x86vms.lan
$ mcr []lookup "klaatu.lan"
gethostname() klaatu.lan 0
gethostbyname() klaatu.lan %X00061578
$QIO() klaatu.lan %X00000001 %X00000001
$ tcpip show host /local
LOCAL database
Host address Host name
127.0.0.1 LOCALHOST, localhost
192.168.1.2 gort.lan
192.168.1.3 klAAtu.lan
192.168.1.254 router.lan
192.168.1.86 x86vms.lan
$ mcr []lookup "klaatu.lan"
gethostname() klaatu.lan 0
gethostbyname() klaatu.lan %X00000000
$QIO() klaatu.lan %X00000001 %X00000870
$ mcr []lookup "klAAtu.lan"
gethostname() klaatu.lan 0
gethostbyname() klAAtu.lan %X00061578
$QIO() klAAtu.lan %X00000001 %X00000001
/*****************************************************************************/
#include<ints.h>
#include<stdlib.h>
#include<stdio.h>
#include<string.h>
#include<in.h>
#include<netdb.h>
#include<iodef.h>
#include<iosbdef.h>
#include<efndef.h>
#include<starlet.h>
#include<descrip.h>
#define INETACP_FUNC$C_GETHOSTBYNAME 1
int main (int argc, char *argv[])
{
static $DESCRIPTOR (TcpIpDeviceDsc, "TCPIP$DEVICE");
static $DESCRIPTOR (HostNameDsc, "");
static $DESCRIPTOR (HostAddressDsc, "");
static char SubFunction [4] =
{ INETACP_FUNC$C_GETHOSTBYNAME, 0, 0, 0 };
static struct dsc$descriptor SubFunctionDsc =
{ sizeof(SubFunction), DSC$K_DTYPE_T, DSC$K_CLASS_S, SubFunction };
int status;
short chan;
char hname [128];
unsigned char ipaddr [16];
struct _iosb IOsb;
struct hostent *heptr;
status = gethostname (hname, sizeof(hname));
printf ("gethostname() %s %d\n", hname, status);
heptr = gethostbyname (argv[1]);
printf ("gethostbyname() %s %%X%08.08X\n", argv[1], heptr);
HostNameDsc.dsc$a_pointer = argv[1];
HostNameDsc.dsc$w_length = strlen(argv[1]);
HostAddressDsc.dsc$a_pointer = (char*)ipaddr;
HostAddressDsc.dsc$w_length = sizeof(ipaddr);
status = sys$assign (&TcpIpDeviceDsc, &chan, 0, 0);
if (!(status & 1)) exit (status);
status = sys$qiow (EFN$C_ENF, chan, IO$_ACPCONTROL,
&IOsb, 0, 0,
&SubFunctionDsc,
&HostNameDsc, 0,
&HostAddressDsc, 0, 0);
printf ("$QIO() %s %%X%08.08X %%X%08.08X\n",
HostNameDsc.dsc$a_pointer, status, IOsb.iosb$w_status);
}
/*****************************************************************************/
--
Anyone, who using social-media, forms an opinion regarding anything
other than the relative cuteness of this or that puppy-dog, needs
seriously to examine their critical thinking.
More information about the Info-vax
mailing list