tty-type
tty-type is a built-in function in `C source code
'.
(tty-type &optional TERMINAL)
Return the type of the tty device that TERMINAL uses.
Returns nil if TERMINAL is not on a tty device.
TERMINAL can be a terminal object, a frame, or nil (meaning the
selected frame's terminal).