1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
|
.\" $NetBSD: intro.3,v 1.38 2025/09/30 10:18:45 uwe Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993
.\" The Regents of the University of California. 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. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
.\"
.\" @(#)intro.3 8.1 (Berkeley) 6/5/93
.\"
.Dd April 14, 2021
.Dt INTRO 3
.Os
.Sh NAME
.Nm intro
.Nd introduction to the system libraries
.Sh DESCRIPTION
This section provides an overview of the system libraries, their
functions, error returns and other common definitions and concepts.
Most of these functions are available from the standard C library,
.Em libc .
Other libraries, such as the math library,
.Em libm ,
must be indicated at compile time with the
.Fl l
option of the compiler.
.\" .Pp
.\" A subset of the
.\" .Xr libc functions
.\" are available from Fortran;
.\" they are described separately in
.\" .Xr intro 3f .
.Pp
The various system libraries supplied in
.Nx
(followed by the linker flags) are:
.Bl -tag -width "libc (-lc)"
.It Em libasn1 Pq Fl l Ns Ar asn1
The abstract syntax notation (ASN) library provides routines for the
specification of abstract data types.
.It Em libbz2 Pq Fl l Ns Ar bz2
Block-sorting compressor library providing routines for fast and
efficient compression.
.It Em libc Pq Fl l Ns Ar c
The standard C library.
When using the C compiler
.Xr cc 1 ,
it is not necessary to supply the linker flag
.Fl l Ns Ar c
for these functions.
There are several subsystems included inside
.Em libc :
.Bl -tag -width "XXXXXX"
.It standard I/O routines
see
.Xr stdio 3
.It database routines
see
.Xr db 3
.It bit operators
see
.Xr bitstring 3
.It string operators
see
.Xr string 3
.It character tests and character operators
.It encryption and hash routines
see
.Xr md4 3
and
.Xr md5 3 .
.It storage allocation
see
.Xr mpool 3
and
.Xr malloc 3
.It time functions
see
.Xr time 3
.It signal handling
see
.Xr signal 3
.El
.It Em libcom_err Pq Fl l Ns Ar com_err
The common error description library.
See
.Xr com_err 3 .
.It Em libcompat Pq Fl l Ns Ar compat
Functions which are obsolete but are available for compatibility with
.Bx 4.3 .
In particular, a number of system call interfaces provided in previous
releases of
.Bx
have been included for source code compatibility.
Use of these routines should, for the most part, be avoided.
The manual page entry
for each compatibility routine indicates the proper interface to use.
.It Em libcrypt Pq Fl l Ns Ar crypt
The crypt library.
See
.Xr crypt 3 .
.It Em libcrypto Pq Fl l Ns Ar crypto
The OpenSSL cryptographic library.
See
.Xr crypto 7 .
.It Em libcurses Pq Fl l Ns Ar curses Fl l Ns Ar terminfo
Terminal independent screen management routines
for two dimensional non-bitmap display terminals.
See
.Xr curses 3 .
.It Em libdes Pq Fl l Ns Ar des
The OpenSSL cryptographic library for the DES algorithms.
See
.Xr des 3 .
.It Em libdm Pq Fl l Ns Ar dm
The device-mapper driver access library used for communication with
kernel driver
.Xr dm 4
and for
.Xr lvm 8
subsystem.
.It Em libedit Pq Fl l Ns Ar edit
The command-line editor or editline library.
The editline library provides generic editing and history functions.
See
.Xr editline 3 .
.It Em libform Pq Fl l Ns Ar form
The curses form library provides a terminal-independent form system
using the curses library.
The form library provides facilities for defining forms on terminals.
See
.Xr forms 3 .
.It Em libgssapi Pq Fl l Ns Ar gssapi
The Generic Security Services (GSS) API library.
This library provides
verification services to applications and usually sits above the
cryptographic libraries.
.It Em libhdb Pq Fl l Ns Ar hdb
The Heimdal Kerberos 5 authentication/authorisation database access
library.
.It Em libintl Pq Fl l Ns Ar intl
The internationalized message handling library.
See
.Xr gettext 3 .
.It Em libipsec Pq Fl l Ns Ar ipsec
The IPsec policy control library.
See
.Xr ipsec_set_policy 3
and
.Xr ipsec_strerror 3 .
.It Em libkadm5clnt Pq Fl l Ns Ar kadm5clnt
The Kerberos 5 administration client library.
.It Em libkadm5srv Pq Fl l Ns Ar kadm5srv
The Kerberos 5 administration server library.
See
.Xr kadm5_pwcheck 3 .
.It Em libkafs Pq Fl l Ns Ar kafs
The Kerberos IV AFS library.
See
.Xr kafs 3 .
.It Em libkdb Pq Fl l Ns Ar kdb
The Kerberos IV authentication/authorisation database access library.
.It Em libkrb Pq Fl l Ns Ar krb
The Kerberos IV library.
.It Em libkrb5 Pq Fl l Ns Ar krb5
The Kerberos 5 library.
See
.Xr krb5 3 .
.It Em libkstream Pq Fl l Ns Ar kstream
Kerberos IV encrypted stream library.
.It Em libkvm Pq Fl l Ns Ar kvm
Kernel data access library.
See
.Xr kvm 3 .
.It Em libl Pq Fl l Ns Ar l
The library for
.Xr lex 1 .
.It Em libm Pq Fl l Ns Ar m
The math library.
See
.Xr math 3 .
.\" The math library is loaded as needed by the Pascal compiler
.\" .Xr pc 1 ,
.\" but not by the C compiler which requires the
.\" .Fl l Ns Ar m
.\" flag (see
.\" .Xr math 3 ) .
.\" .It Em libmp Pq Fl l Ns Ar mp
.\" .It Em libom
.\" Old math library.
.\" .It Em libplot Pq Fl l Ns Ar plot
.\" Device independent plotting functions (see
.\" .Xr plot 3 ) .
.\" .It Em libplotf77 Pq Fl l Ns Ar plotf77
.\" The device independent plotting functions for fortran (see
.\" .Xr plot 3 ) .
.\" .It Em libresolv Pq Fl l Ns Ar resolv
.\" Routines for network address resolution.
.It Em libmenu Pq Fl l Ns Ar menu
The curses menu library.
See
.Xr menus 3 .
.It Em libnvmm Pq Fl l Ns Ar nvmm
.Nx
Virtualization API.
See
.Xr libnvmm 3 .
.It Em libossaudio Pq Fl l Ns Ar ossaudio
Open Sound System compatibility library.
See
.Xr ossaudio 3 .
.It Em libpanel Pq Fl l Ns Ar panel
The curses panel library.
See
.Xr panel 3 .
.It Em libpcap Pq Fl l Ns Ar pcap
The packet capture library.
See
.Xr pcap 3 .
.It Em libpci Pq Fl l Ns Ar pci
The PCI bus access library.
See
.Xr pci 3 .
.It Em libposix Pq Fl l Ns Ar posix
The POSIX compatibility library provides a compatibility interface for
POSIX functions which differ from the standard BSD interfaces.
See
.Xr chown 2
and
.Xr rename 2 .
.It Em libresolv Pq Fl l Ns Ar resolv
The DNS resolver library.
.It Em librmt Pq Fl l Ns Ar rmt
Remote magnetic tape library.
See
.Xr rmtops 3 .
.It Em libroken Pq Fl l Ns Ar roken
A library containing compatibility functions used by Kerberos.
It implements functionality required by the Kerberos implementation not
implemented in the standard
.Nx
libraries.
.It Em librpcsvc Pq Fl l Ns Ar rpcsvc
The Remote Procedure Call (RPC) services library.
See
.Xr rpc 3 .
.It Em libskey Pq Fl l Ns Ar skey
The S/Key one-time password library.
See
.Xr skey 3 .
.It Em libsl Pq Fl l Ns Ar sl
.It Em libss Pq Fl l Ns Ar ss
.It Em libssl Pq Fl l Ns Ar ssl
The secure sockets layer (SSL) library.
See
.Xr ssl 7 .
.It Em libtelnet Pq Fl l Ns Ar telnet
The telnet library.
.It Em libterminfo Pq Fl l Ns Ar terminfo
The terminal-independent operation library.
See
.Xr terminfo 3 .
.It Em libusbhid Pq Fl l Ns Ar usbhid
The Universal Serial Bus (USB) Human Interface Devices access library.
See
.Xr libusbhid 3 .
.It Em libutil Pq Fl l Ns Ar util
The system utilities library.
See
.Xr util 3 .
.It Em libwrap Pq Fl l Ns Ar wrap
The TCP wrappers library.
See
.Xr hosts_access 3 .
.It Em liby Pq Fl l Ns Ar y
The library for
.Xr yacc 1 .
.It Em libz Pq Fl l Ns Ar z
General-purpose compression library.
See
.Xr zlib 3 .
.El
.Sh SEE ALSO
.Xr cc 1 ,
.Xr ld 1 ,
.Xr nm 1 ,
.Xr rtld 1 ,
.Xr intro 2
.Sh HISTORY
An
.Nm
manual appeared in
.At v7 .
|