2 .\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD
4 .\" Copyright (c) [year] [your name]
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
15 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 .\" Note: The date here should be updated whenever a non-trivial
30 .\" change is made to the manual page.
36 .Nd "example library function manual page"
38 .\" Note: list of available libraries is available in mdoc(7)
43 .Fn example "char *ptr" "int mode"
45 This is an example library function manual page for the
48 It is intended that this example can be used as a template
49 when writing a new manual page.
53 function takes two arguments:
59 may have one of the following values:
60 .Bl -tag -width ".Dv EXAMPLE_ONE"
62 First example of a defined variable.
69 The above values are defined in
76 .Sh IMPLEMENTATION NOTES
79 function is not actually implemented.
85 library function ignores the
89 .Bl -tag -width ".Pa /dev/null" -compact
91 Example of a file in the
100 function has no known compatibility issues.
102 .\" Delete any errno's that are not returned by your
103 .\" function or system call and then tailor the
104 .\" remaining text as needed.
107 function will fail if:
110 Operation not permitted.
112 No such file or directory.
116 Interrupted system call.
120 Device not configured.
122 Argument list too long.
130 Resource deadlock avoided.
132 Cannot allocate memory.
138 Block device required.
146 Operation not supported by device.
154 Too many open files in system.
158 Inappropriate ioctl for device.
164 No space left on device.
168 Read-only file system.
174 Numerical argument out of domain.
178 Resource temporarily unavailable.
179 .It Bq Er EWOULDBLOCK
180 Operation would block.
181 .It Bq Er EINPROGRESS
182 Operation now in progress.
184 Operation already in progress.
186 Socket operation on non-socket.
187 .It Bq Er EDESTADDRREQ
188 Destination address required.
192 Protocol wrong type for socket.
193 .It Bq Er ENOPROTOOPT
194 Protocol not available.
195 .It Bq Er EPROTONOSUPPORT
196 Protocol not supported.
197 .It Bq Er ESOCKTNOSUPPORT
198 Socket type not supported.
200 Operation not supported.
201 .It Bq Er EPFNOSUPPORT
202 Protocol family not supported.
203 .It Bq Er EAFNOSUPPORT
204 Address family not supported by protocol family.
206 Address already in use.
207 .It Bq Er EADDRNOTAVAIL
208 Cannot assign requested address.
211 .It Bq Er ENETUNREACH
212 Network is unreachable.
214 Network dropped connection on reset.
215 .It Bq Er ECONNABORTED
216 Software causes connection abort.
218 No buffer space available.
220 Socket is already connected.
222 Socket is not connected.
224 Cannot send after socket shutdown.
225 .It Bq Er ETOOMANYREFS
226 Too many references: cannot splice.
229 .It Bq Er ECONNREFUSED
232 Too many levels of symbolic links.
233 .It Bq Er ENAMETOOLONG
237 .It Bq Er EHOSTUNREACH
248 Stale NFS file handle.
250 Too many levels of remote in path.
253 .It Bq Er ERPCMISMATCH
255 .It Bq Er EPROGUNAVAIL
256 RPC program not available.
257 .It Bq Er EPROGMISMATCH
258 Program version wrong.
259 .It Bq Er EPROCUNAVAIL
260 Bad procedure for program.
264 Function not implemented.
266 Inappropriate file type or format.
268 Authentication error.
274 No message of desired type.
276 Value too large to be stored in data type.
280 Illegal byte sequence.
293 .%T "Example RFC Title"
298 .%B "Example Book Title"
299 .%O ISBN-0-000-00000-0
304 .%J "Example Journal Name"
305 .%T "Example Article Title"
308 If the function conforms to some standard, such as
312 it should be noted here.
316 manual page example first appeared in
321 section examples are:
325 manual page example first appeared in
330 manual page example first appeared in
334 manual page was written by
335 .An Mike Pritchard Aq Mt mpp@FreeBSD.org .
337 The actual code for this function is vaporware.