Add manpage for new line discipline stuff.

This commit is contained in:
eeh 2000-11-02 23:15:10 +00:00
parent ab161cd2e1
commit 26f192b24a
2 changed files with 106 additions and 2 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.70 2000/10/13 04:19:58 itojun Exp $ # $NetBSD: Makefile,v 1.71 2000/11/02 23:15:10 eeh Exp $
# Makefile for section 9 (kernel function and variable) manual pages. # Makefile for section 9 (kernel function and variable) manual pages.
@ -6,7 +6,7 @@ MAN= access.9 arp.9 audio.9 bitmask_snprintf.9 bus_dma.9 bus_space.9 \
callout.9 copy.9 cpu_reboot.9 ctxsw.9 disk.9 disklabel.9 \ callout.9 copy.9 cpu_reboot.9 ctxsw.9 disk.9 disklabel.9 \
dopowerhooks.9 doshutdownhooks.9 ethersubr.9 evcnt.9 \ dopowerhooks.9 doshutdownhooks.9 ethersubr.9 evcnt.9 \
extent.9 fetch.9 fork1.9 humanize_number.9 inittodr.9 \ extent.9 fetch.9 fork1.9 humanize_number.9 inittodr.9 \
intro.9 ioctl.9 kprintf.9 lock.9 log.9 malloc.9 mbuf.9 \ intro.9 ioctl.9 kprintf.9 linedisc.9 lock.9 log.9 malloc.9 mbuf.9 \
microtime.9 panic.9 pfil.9 physio.9 pool.9 \ microtime.9 panic.9 pfil.9 physio.9 pool.9 \
powerhook_establish.9 ppsratecheck.9 psignal.9 \ powerhook_establish.9 ppsratecheck.9 psignal.9 \
ratecheck.9 resettodr.9 rnd.9 rt_timer.9 \ ratecheck.9 resettodr.9 rnd.9 rt_timer.9 \

104
share/man/man9/linedisc.9 Normal file
View File

@ -0,0 +1,104 @@
.\" $NetBSD: linedisc.9,v 1.1 2000/11/02 23:15:10 eeh Exp $
.\"
.\" Copyright (c) 2000 Christopher G. Demetriou.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed for the
.\" NetBSD Project. See http://www.netbsd.org/ for
.\" information about NetBSD.
.\" 4. The name of the author may not be used to endorse or promote products
.\" derived from this software without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.\" --(license Id: LICENSE.proto,v 1.1 2000/06/13 21:40:26 cgd Exp )--
.\"
.Dd Nov 1, 2000
.Dt LINEDISC 9
.Os
.Sh NAME
.Nm ttyldisc_add ,
.Nm ttyldisc_lookup ,
.Nm ttyldisc_remove
.Nd extensible line discipline framework
.Sh SYNOPSIS
.Fd #include <sys/conf.h>
.Ft int
.Fn ttyldisc_add "struct linesw *disc" "int no"
.Ft struct linesw *
.Fn ttyldisc_remove "char *name"
.Ft struct linesw *
.Fn ttyldisc_lookup "char *name"
.Sh DESCRIPTION
The
.Nx
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.
.Pp
Once the framework has been initialized, a new line
discipline can be added by creating and initializing a
.Fa struct linesw
and calling
.Fn ttyldisc_add .
.Pp
The following is a brief description of each function in the framework:
.Bl -tag -width "ttyldisc_remove()"
.It Fn ttyldisc_add
Register a line discipline. The
.Fa l_name
field of the
.Fa struct linesw
should 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 in
.Fa no ,
but for new disciplines this should be set to
.Dv -1 .
.It Fn ttyldisc_lookup
Look up a line discipline by
.Fa name .
.Dv NULL
is returned if it can not be found.
.It Fn ttyldisc_remove
Remove a line discipline called
.Fa name
and return a pointer to it. If the discipline cannot
be found or removed
.Fn ttyldisc_remove
will return
.Dv NULL .
.El
.Sh AUTHOR
The
.Nx
extensible line discipline framework was created by
Eduardo Horvath <eeh@NetBSD.ORG>.
.Sh SEE ALSO
.\" .Xr spl 9
.Sh HISTORY
The
.Nm
functions were added in
.Nx 1.6 .