[BACK]Return to util.3 CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / lib / libutil

File: [cvs.NetBSD.org] / src / lib / libutil / util.3 (download)

Revision 1.26, Thu Mar 30 20:00:21 2017 UTC (3 years ago) by abhinav
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, phil-wifi-base, pgoyette-localcount-20170426, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, matt-nb8-mediatek-base, matt-nb8-mediatek, bouyer-socketcan-base1
Branch point for: phil-wifi
Changes since 1.25: +2 -2 lines

Use Sy to highlight the table header.

.\"     $NetBSD: util.3,v 1.26 2017/03/30 20:00:21 abhinav Exp $
.\"
.\" Copyright (c) 2001 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" This code is derived from software contributed to The NetBSD Foundation
.\" by Gregory McGarry.
.\"
.\" 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.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
.\" ``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 FOUNDATION OR CONTRIBUTORS
.\" 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.
.\"
.Dd March 31, 2017
.Dt UTIL 3
.Os
.Sh NAME
.Nm util ,
.Nm libutil
.Nd system utilities library
.Sh LIBRARY
.Lb libutil
.Sh DESCRIPTION
The
.Nm
library is the system utilities library and contains various
system-dependent utility routines used in a wide variety of system daemons.
The abstracted functions are mostly related to pseudo-terminals
and login accounting.
These routines are
.Nx Ns -specific
and are not portable.
Their use should be restricted.
.Pp
Declarations for these functions may be obtained from the include file
.In util.h .
The
.Nm
library and the associated functions are implemented within the
.Pa /usr/src/lib/libutil
directory.
.Sh LIST OF FUNCTIONS
.Bl -column ".Xr sockaddr_snprintf 3" -compact
.It Sy Name Ta Sy Description
.It Xr disklabel_dkcksum 3 Ta compute the checksum for a disklabel
.It Xr disklabel_scan 3 Ta scan a buffer for a valid disklabel
.It Xr efun 3 Ta error checked utility functions
.It Xr forkpty 3 Ta tty utility function
.It Xr getbootfile 3 Ta get the name of the booted kernel file
.It Xr getbyteorder 3 Ta get the current byte order
.It Xr getdiskrawname 3 Ta get the the block/character device name for a disk
.It Xr getfsspecname 3 Ta get the underlying wedge name from a label
.It Xr getfstypename 3 Ta convert a partition file system type integer to a wedge
partition type name
.It Xr getlabeloffset 3 Ta get the sector number and offset of the disklabel
.It Xr getlabelsector 3 Ta get the sector number and offset of the disklabel
.It Xr getmaxpartitions 3 Ta get the maximum number of partitions allowed per disk
.It Xr getmntopts 3 Ta scan mount options
.It Xr getrawpartition 3 Ta get the system ``raw'' partition
.It Xr kinfo_getvmmap 3 Ta get per-process memory map information
.It Xr login 3 Ta login utility function
.It Xr login_cap 3 Ta query login.conf database about a user class
.It Xr login_close 3 Ta query login.conf database about a user class
.It Xr login_getcapbool 3 Ta query login.conf database about a user class
.It Xr login_getcapnum 3 Ta query login.conf database about a user class
.It Xr login_getcapsize 3 Ta query login.conf database about a user class
.It Xr login_getcapstr 3 Ta query login.conf database about a user class
.It Xr login_getcaptime 3 Ta query login.conf database about a user class
.It Xr login_getclass 3 Ta query login.conf database about a user class
.It Xr login_tty 3 Ta tty utility function
.It Xr loginx 3 Ta login utility function
.It Xr logout 3 Ta login utility function
.It Xr logoutx 3 Ta login utility function
.It Xr logwtmp 3 Ta login utility function
.It Xr logwtmpx 3 Ta login utility function
.It Xr opendisk 3 Ta open a disk partition
.It Xr openpty 3 Ta tty utility function
.It Xr pidfile 3 Ta write a daemon pid file
.It Xr pidlock 3 Ta locks based on files containing PIDs
.It Xr proc_compare 3 Ta compare two processes' interactivity
.It Xr pw_abort 3 Ta passwd file update function
.It Xr pw_copy 3 Ta utility function for interactive passwd file updates
.It Xr pw_edit 3 Ta utility function for interactive passwd file updates
.It Xr pw_error 3 Ta utility function for interactive passwd file updates
.It Xr pw_getconf 3 Ta password encryption configuration access function
.It Xr pw_getprefix 3 Ta passwd file update function
.It Xr pw_init 3 Ta utility function for interactive passwd file updates
.It Xr pw_lock 3 Ta passwd file update function
.It Xr pw_mkdb 3 Ta passwd file update function
.It Xr pw_prompt 3 Ta utility function for interactive passwd file updates
.It Xr pw_scan 3 Ta utility function for interactive passwd file updates
.It Xr pw_setprefix 3 Ta passwd file update function
.It Xr raise_default_signal 3 Ta raise the default signal handler
.It Xr secure_path 3 Ta determine if a file appears to be ``secure''
.It Xr setclasscontext 3 Ta query login.conf database about a user class
.It Xr setusercontext 3 Ta query login.conf database about a user class
.It Xr snprintb 3 Ta bitmask output conversion
.It Xr sockaddr_snprintf 3 Ta socket address formatting function
.It Xr strpct 3 Ta decimal percent formatter
.It Xr ttyaction 3 Ta ttyaction utility function
.It Xr ttylock 3 Ta locks based on files containing PIDs
.It Xr ttymsg 3 Ta ttymsg utility function
.It Xr ttyunlock 3 Ta locks based on files containing PIDs
.El
.Sh FILES
.Bl -tag -width /usr/lib/libutil_p.a -compact
.It Pa /usr/lib/libutil.a
static util library
.It Pa /usr/lib/libutil.so
dynamic util library
.It Pa /usr/lib/libutil_p.a
static util library compiled for profiling
.El
.Sh SEE ALSO
.Xr efun 3 ,
.Xr intro 3