Operating System - OpenVMS
1752808 Members
6008 Online
108789 Solutions
New Discussion юеВ

Re: TCP/IP Ignores/Accepts Odd Characters...

 
Robert Atkinson
Respected Contributor

TCP/IP Ignores/Accepts Odd Characters...

Here's an intriguing one! TCP/IP doesn't seem to care about the backslash. Do you think this is by design?

GAMMA_ROB$$$ telnet delt\a
%TELNET-I-TRYING, Trying ... 192.168.242.204
%TELNET-I-SESSION, Session 01, host delt\a, port 23
-TELNET-I-ESCAPE, Escape character is ^]

Username: Exit
Error reading command input
End of file detected
%TELNET-S-REMCLOSED, Remote connection closed
-TELNET-I-SESSION, Session 01, host delt\a, port 23
GAMMA_ROB$$$ nslookup delt\a
Server: codc-1.uk.randomhouse.com
Address: 10.112.19.4

Name: delta.uk.randomhouse.com
Address: 192.168.242.204

GAMMA_ROB$$$
5 REPLIES 5
Wim Van den Wyngaert
Honored Contributor

Re: TCP/IP Ignores/Accepts Odd Characters...

Robert,

Must be Unix indication that the character following the \ must be taken as it is.
In any case, it doesn't work on my 7.3 system with a simple host file.

Wim
Wim
Bojan Nemec
Honored Contributor

Re: TCP/IP Ignores/Accepts Odd Characters...

Robert,

I came to the same results as Wim. If the host is defined in my DNS server which runs on Linux I can use the \. If the host is only localy defined in TCPIP I receive the error:
%TELNET-E-IVHOST, Invalid or unknown host be\ta

I also tested with a simple program which calls gethostbyname (). The results are same.

So this must be a DNS thing.

Bojan
Antoniov.
Honored Contributor

Re: TCP/IP Ignores/Accepts Odd Characters...

Robert,
does it work with other od charactes?
For examaple sharp, percent?
Backslash is escape character in C language, so backslash followed by another char means something.
\n is newline
\t is HT
\b is backspace
\\ is backslash
\xhh is hex rappresentation
Only for fun you can try something like
$ telnet delt\x41

Cheers
Antonio Vigliotti
Antonio Maria Vigliotti
Willem Grooters
Honored Contributor

Re: TCP/IP Ignores/Accepts Odd Characters...

I just checked it out.
It seems that if the name fits without \ it's taken, but the next character must NOT be a digit.

I did this for a number of special characters under 7.3-1 - see attached procedure (not a very nice one but it works).
It seems any character is valid, except the obvious % and * (wildcard characters); you may need to do something special (put the name in quotes, for instance).

It might well be quit normal. Unix (where TCPIP comes from) will probably accept a lot of characters as valid - whether it makes sense or not. I have no facilities to see how Unix would behave in cases like this.

Willem Grooters
OpenVMS Developer & System Manager
Garry Fruth
Trusted Contributor

Re: TCP/IP Ignores/Accepts Odd Characters...

I suspect "telnet delt\065" will work. A similar variant worked on my system here.