Host name syntax

From The x3270 Wiki
Jump to navigation Jump to search

Note: This special syntax is generally not used from the user interfaces of wc3270 or wx3270, except in scripts or at the x3270> prompt. Those user interfaces allow these options to be specified separately, and construct a properly-formatted host name from them.

Basic syntax

The basic syntax is:

[prefix:...] host [:port] [=accept-name]

Prefixes

An optional prefix is a single letter and a colon character (:). Multiple prefixes can be specified. Prefixes are listed here.

Host

The host is either a fully-qualified domain name (e.g., foo.bar.com) or a numeric address in either IPv4 dotted-decimal or IPv6 hexadecimal format. A numeric IPv6 addres must be surrounded by square-bracket characters, e.g., [100:200::1], to keep the colon characters from being misinterpreted.

Port

The optional port is a number separated from the host name by a colon. It overrides the default value of 23 (the TELNET port).

Accept name

The optional accept name is separated from the host and optional port by an equals sign (=). It overrides the value of the acceptHostname resource, specifying a name to match against the host's TLS certificate.

Examples

Connect to foo.bar.com without a TLS tunnel, on port 23.

foo.bar.com

Connect to foo.bar.com with a TLS tunnel but not verifying the host certificate, on port 9100.

L:Y:foo.bar.com:9100

Connect to IPv4 address 1.2.3.4 on port 23.

1.2.3.4

Connect to IPv6 address 100:200::1 on port 23.

[100:200::1]

Connect to IPv6 address 100:200::1 on port 9100 with a TLS tunnel, using myhost to match the name from the host's TLS certificate.

L:[100:200::1]:9100=myhost