NMDM(4)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1, nixpkgs unstable

✨ NAME ✨

nmdm β€” nullmodem terminal driver. Okay so this is the NMDM(4) page from the Kernel Interfaces Manual, and it is literally that driver, no cap. πŸ’…

πŸ› οΈ SYNOPSIS πŸ› οΈ

To compile this driver into the kernel, place the following line in your kernel configuration file:

device nmdm

Alternatively, to load the driver as a module at boot time, place the following line in loader.conf(5):

nmdm_load="YES"

Slay. That's the whole setup. ✨

πŸ’» DESCRIPTION πŸ’»

The nmdm driver provides two tty(4) devices connected by a virtual β€œnull modem” cable. It's giving two besties holding hands through a cable energy, but make it kernel. 🫢

If either of the two tty devices have the CDSR_OFLOW bit β€” yes, the β€œstty dsrflow” one β€” set in their line discipline, the nmdm device will emulate the speed configured in the termios(4) settings. The speed emulation works independently in the two directions, controlled by the slower end's termios settings (c_ispeed, c_ospeed, CS5 ... CS8, CSTOPB and PARENB). Highkey iconic that it's directional like that. πŸ”₯

πŸ“ FILES πŸ“

  • /dev/nmdmN[AB] β€” nullmodem device nodes. Where the A node has a matching B node. Matching set, periodt. πŸŽ€

The nmdm driver implements β€œon-demand device creation” so simply accessing a given instance in /dev will create it. Not me being obsessed with lazy magic β€” it's just the vibe. ✨

🩺 DIAGNOSTICS 🩺

None. Literally none, bestie. πŸ’€

πŸ‘€ SEE ALSO πŸ‘€

Go read the supporting cast, iykyk. πŸ’…

πŸ“œ HISTORY πŸ“œ

The nmdm driver first appeared in FreeBSD 4.4. Vintage but still serving looks. 🌸


Cute sign-off time: this footer is Debian, dated July 11, 2020, and the page is NMDM(4). Bye bestie, go make that virtual null modem cable do its thing πŸ’–πŸŽ€

πŸ“¦ where this page comes from