tc= in remote(5) example

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

tc= in remote(5) example

Jan Stary
/etc/examples/remote contains the following stanzas:

        unixhost:\
                :br#9600:

        cua00|For i386,macppc:\
                :dv=/dev/cua00:tc=unixhost:

        cuaa|For sparc:\
                :dv=/dev/cuaa:tc=unixhost:


The remote(5) manpage describes br, dc, dv
but not tc, which seems to be used here as an include.
Is it described elsewhere or is that an omission?

        Jan

Reply | Threaded
Open this post in threaded view
|

Re: tc= in remote(5) example

trondd-2
On Thu, February 18, 2021 11:38 am, Jan Stary wrote:

> /etc/examples/remote contains the following stanzas:
>
> unixhost:\
> :br#9600:
>
> cua00|For i386,macppc:\
> :dv=/dev/cua00:tc=unixhost:
>
> cuaa|For sparc:\
> :dv=/dev/cuaa:tc=unixhost:
>
>
> The remote(5) manpage describes br, dc, dv
> but not tc, which seems to be used here as an include.
> Is it described elsewhere or is that an omission?
>
> Jan
>

References are at the top of the example file.  The most complete
description of tc is probably in cgetcap(3).

Reply | Threaded
Open this post in threaded view
|

Re: tc= in remote(5) example

Theo de Raadt-2
In reply to this post by Jan Stary
Jan Stary <[hidden email]> wrote:

> /etc/examples/remote contains the following stanzas:
>
> unixhost:\
> :br#9600:
>
> cua00|For i386,macppc:\
> :dv=/dev/cua00:tc=unixhost:
>
> cuaa|For sparc:\
> :dv=/dev/cuaa:tc=unixhost:
>
>
> The remote(5) manpage describes br, dc, dv
> but not tc, which seems to be used here as an include.
> Is it described elsewhere or is that an omission?

The second sentence of the manual page is:

    It is an ASCII file structured somewhat like the termcap(5) file.

That is slightly erroneous.  It is not "somewhat like", but "precisely like".

Around 4.4BSD this format was generalized for other purposes also, and
renamed "capability database", with cap_mkdb(1) and cgetent(3)
functions.

Thus, the cu(1) code uses the cgetent(3) family of library functions,
and thus gains the "tc" capability, which is similar to cpp "include".

Other "capability database" format details not documented in remote(5)
percolate up (for example, the behaviour of '\' is not entirely
intuitive), and these narrow details are not documented in remote(5)
either... how far should this go?

As to where "tc" is documented:

In termcap(5), "tc" is explained thus:

     tc       str              Entry of similar terminal; must be last.

I'll admit that is poor and vague.

It is explained carefully in the cgetent(3) manual page, in the
subsection "Capability database semantics", but that page isn't Xr'd,
and the subsection is so far down the page I am not sure a reader would
scan far enough down to learn anything.

I don't know what precisely should be done.