HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

Source of TT_ACCPORNAM?

 
Stephen Daddona
Frequent Advisor

Source of TT_ACCPORNAM?

We use the Reflection terminal emulator software to connect to our Alphas (VMS v8.2), and sometimes we need to have an application get the info from TT_ACCPORNAM. And since all of our interactive sessions are TELNET, tt_accpornam is usually computername.sierracollege.edu. I just ran into a situation where I changed the computer name in Control Panel/System and the name in tt_accpornam is different. And, it's different for two different Alphas (not clustered). Does the name that tt_accpornam sees come from a DNS server? Somewhere else?

Thanks in advance!
9 REPLIES
Dale A. Marcy
Trusted Contributor

Re: Source of TT_ACCPORNAM?

I can say definitely, but based on experience, I believe it comes from doing a dns lookup on the IP address. I have seen weird strings for this value when the X-terminal is not defined in the DNS.
Dale A. Marcy
Trusted Contributor

Re: Source of TT_ACCPORNAM?

Oops, I meant to say that I cannot say definitely.
Robert Brooks_1
Honored Contributor

Re: Source of TT_ACCPORNAM?

To answer the question literally, there is a cell in the terminal's UCB (unit control block) that points to a counted string.

From $UCBDEF in sys$library:lib.req

macro UCB$L_TT_ACCPORNAM = 440,0,32,1 %; ! Address of counted string describing the port
typicall LAT server name / and port name or number

From the $GETDVI documentation . . .

Returns the name of the remote access port associated with a channel number or with a physical or virtual terminal device number. If you specify a device that is not a remote terminal or a remote type that does not support this feature, $GETDVI returns a null string. The $GETDVI service returns the access port name as a 64-byte, zero-filled string.

The $GETDVI service returns the name in the format of the remote system. If the remote system is a LAT terminal server, $GETDVI returns the name as server_name/port_name. The names are separated by the slash (/) character. If the remote system is an X.29 terminal, the name is returned as network.remote_DTE.

When writing applications, you should use the string returned by DVI$_ACCPORNAM, instead of the physical device name, to identify remote terminals.

I'm pretty sure that's the string returned by $GETDVI. It would be up to the telnet server for the TCP/IP stack to determine how that string is formed. Obviously, the help text should be updated to mention telnet . . .

The point is, however, that $GETDVI almost certainly just grabs the string at the address in the UCB cell; $GETDVI certainly does not do anything exotic like a DNS lookup on an address before returning the info.

I'm not in the office now to verify the above, but I do know that $GETDVI mostly grabs data out of static cells and returns that for the vast majority of item codes.

-- Rob (VMS Engineering)
Jim_McKinney
Honored Contributor

Re: Source of TT_ACCPORNAM?

> Does the name that tt_accpornam sees come from a DNS server?

The server responsible for handling telnet connections populates the TT_ACCPORNAM field in the terminal device's UCB. Which server that is depends upon the TCP stack that you're running on that system. Regardless, the server attempts a DNS lookup of the source IP address. If an A(ddress) record is returned that value is placed into the field - else the numeric IP address is placed there.
Steven Schweda
Honored Contributor

Re: Source of TT_ACCPORNAM?

Who else thinks that it would be handy to
have a way to get the IP address itself,
rather than a reverse DNS look-up thereof?
Benjamin Levy
Frequent Advisor

Re: Source of TT_ACCPORNAM?

With respect to Steven's comment, I think the command

TCPIP SET SERVICE TELNET/LOG_OPT=[NO]ADDRESS

controls if the source is displayed as an address or a name.
Steven Schweda
Honored Contributor

Re: Source of TT_ACCPORNAM?

> TCPIP SET SERVICE TELNET/LOG_OPT=[NO]ADDRESS

Hmmm. I seem to have done this for FTP and
SMTP, but not for other services. The HELP
discusses log files, not TT_ACCPORNAM, but it
was a valuable reminder, irregardful. Thanks.

And a quick test on Telnet suggests that this
does the job. Well, I'm happy, anyway.
Antoniov.
Honored Contributor

Re: Source of TT_ACCPORNAM?

Hi,
what does happen when you issue
$ TCPIP SH HOST
AFAIK the remote name is not issued by remote host but from local database.
You can chage the client PC address using an unamed address. After connection TT_ACCPORNAM will say you "Host xxx.xxx.xxx.xx" because there is no name in local server database.

Antonio
http://it.openvms.org
Antonio Maria Vigliotti
Stephen Daddona
Frequent Advisor

Re: Source of TT_ACCPORNAM?

Thanks for all the responses. I hae a greater understanding of what's going on.

I'll still take this up with our network guy, but I put the name and IP address in the TCPIP service's local host database, and the SHOW TERMINAL now shows the name that I want.