LINEDISC(9)
π linedisc(9) β extensible line discipline framework π
okay so bestie, this page is from the Kernel Developer's Manual, section 9, and itβs giving βkernel modules deserve main character energy too.β Weβre talking about the NetBSD TTY line discipline framework, and it is extensible. Periodt. π«Ά
πΈ NAME πΈ
linedisc, ttyldisc_add, ttyldisc_lookup, ttyldisc_remove β extensible line discipline framework
β¨ SYNOPSIS β¨
#include <sys/conf.h>
int
ttyldisc_add(struct linesw *disc, int no);
struct linesw *
ttyldisc_remove(const char *name);
struct linesw *
ttyldisc_lookup(const char *name);
π DESCRIPTION π
The NetBSD TTY line discipline framework allows extensibility. Modules that need special line disciplines can add them as convenient and do not need to modify tty_conf.c. Line disciplines are now managed by a string, rather than number. Slay. β¨
Once the framework has been initialized, a new line discipline can be added by creating and initializing a struct linesw and calling ttyldisc_add().
Hereβs the brief tea on each function in the framework, bestie:
ttyldisc_add()β Register a line discipline. Thel_namefield of thestruct lineswshould point to a string which is to be the symbolic name of that line discipline. For compatibility purposes, a line discipline number can be passed inno, but for new disciplines this should be set to-1. Iconic registration moment. πttyldisc_lookup()β Look up a line discipline by name.NULLis returned if it can not be found. Vibe check failed? You getNULL. πttyldisc_remove()β Remove a line discipline called name and return a pointer to it. If the discipline cannot be found or removedttyldisc_remove()will returnNULL. Bye bestie, but make it safe. π
π¦ SEE ALSO π¦
tty(4)β go read this too, bestie π«Ά
π HISTORY π
The linedisc functions were added in NetBSD 1.6. Thatβs the lore. π
π AUTHORS π
The NetBSD extensible line discipline framework was created by Eduardo Horvath β¨eeh@NetBSD.orgβ©. We stan a framework creator. π
mwah π this pageβs footer energy is Debian, dated November 1, 2000 β thatβs the source/version and date, bestie. Periodt. πΈ
π¦ where this page comes from
- nixpkgs unstable: netbsd-source 11.0
- Copyright (c) 2000 Christopher G. Demetriou
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms