The Linux null-modem emulator (tty0tty) is a kernel-module virtual serial port driver for Linux. This create virtual tty ports pairs and use any pair to connect one tty serial port based application to another.
There are a version using pseudo-terminal (UNIX 98 style).