Apparently there is no problem with the way the NetBios name is being passed to TCPX, but the sock=-2 code indicates that the gethostbyname() function failed to return a name:
xcall TCPX,F[9],F[-1],X4096,F[31515],F[1],B4[2000],S40[stephen-laptop]
tcpx: op=9, flags=1, sock=31515, timer=2000, sockary=0
tcpx rtn: status=0,
sock=-2According to the
gethostbyname() man page:
The domain name queries carried out by gethostbyname() and gethostbyaddr() use a combination of any or all of the name server named(8), a broken out line from /etc/hosts, and the Network Information Service (NIS or YP), depending upon the contents of the order line in /etc/host.conf. The default action is to query named(8), followed by /etc/hosts.
You can try using the Linux
dig command to try to debug the name resolution process.
Unfortunately, TCPX doesn't give you very much additional information about the error, although it's not clear there is much more to give, besides "name not found".
However, if your ASHLPD server is actually on the same machine that you are telnetting from, which is how it appears from your ashlog.log entry, then you can use an alternate form of the SERVER= specification in the ASHLPR.INI:
SERVER=TELNET
or
SERVER=TELNET:
It will translate "TELNET" to your own client IP address, which not only allows the IP to be determined at connection time, but also allows several people to share a single ASHLPR.INI but each with their own ASHLPD print server.