1 .\" Copyright (c) [year] [your name]
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 .\" Note: The date here should be updated whenever a non-trivial
28 .\" change is made to the manual page.
29 .Dd September 27, 2006
34 .Nd "example kernel interface manual page"
38 .Fn example "char *ptr" "int mode"
40 This is an example manual page for the
43 It is intended that this example can be used as a template
44 when writing a new manual page.
48 function takes two arguments:
54 may have one of the following values:
55 .Bl -tag -width ".Dv EXAMPLE_ONE"
57 First example of a defined variable.
64 The above values are defined in
71 .Sh IMPLEMENTATION NOTES
74 function is not actually implemented.
78 lock must be held before
86 no sleepable locks (i.e.,
88 locks) can be acquired in
93 function returns the value 0 if successful;
94 otherwise one of the values listed in the
96 section is returned, to indicate the error.
101 mtx_lock(&example_lock);
102 if ((error = example(NULL, EXAMPLE_ONE)) != 0) {
103 mtx_unlock(&example_lock);
106 mtx_unlock(&example_lock);
111 function has no known compatibility issues.
113 .\" Delete any errno's that are not returned by your
114 .\" function or system call and then tailor the
115 .\" remaining text as needed.
118 function will fail if:
121 Operation not permitted.
123 No such file or directory.
127 Interrupted system call.
131 Device not configured.
133 Argument list too long.
141 Resource deadlock avoided.
143 Cannot allocate memory.
149 Block device required.
157 Operation not supported by device.
165 Too many open files in system.
169 Inappropriate ioctl for device.
175 No space left on device.
179 Read-only file system.
185 Numerical argument out of domain.
189 Resource temporarily unavailable.
190 .It Bq Er EWOULDBLOCK
191 Operation would block.
192 .It Bq Er EINPROGRESS
193 Operation now in progress.
195 Operation already in progress.
197 Socket operation on non-socket.
198 .It Bq Er EDESTADDRREQ
199 Destination address required.
203 Protocol wrong type for socket.
204 .It Bq Er ENOPROTOOPT
205 Protocol not available.
206 .It Bq Er EPROTONOSUPPORT
207 Protocol not supported.
208 .It Bq Er ESOCKTNOSUPPORT
209 Socket type not supported.
211 Operation not supported.
212 .It Bq Er EPFNOSUPPORT
213 Protocol family not supported.
214 .It Bq Er EAFNOSUPPORT
215 Address family not supported by protocol family.
217 Address already in use.
218 .It Bq Er EADDRNOTAVAIL
219 Cannot assign requested address.
222 .It Bq Er ENETUNREACH
223 Network is unreachable.
225 Network dropped connection on reset.
226 .It Bq Er ECONNABORTED
227 Software causes connection abort.
229 No buffer space available.
231 Socket is already connected.
233 Socket is not connected.
235 Cannot send after socket shutdown.
236 .It Bq Er ETOOMANYREFS
237 Too many references: cannot splice.
240 .It Bq Er ECONNREFUSED
243 Too many levels of symbolic links.
244 .It Bq Er ENAMETOOLONG
248 .It Bq Er EHOSTUNREACH
259 Stale NFS file handle.
261 Too many levels of remote in path.
264 .It Bq Er ERPCMISMATCH
266 .It Bq Er EPROGUNAVAIL
267 RPC program not available.
268 .It Bq Er EPROGMISMATCH
269 Program version wrong.
270 .It Bq Er EPROCUNAVAIL
271 Bad procedure for program.
275 Function not implemented.
277 Inappropriate file type or format.
279 Authentication error.
285 No message of desired type.
287 Value too large to be stored in data type.
291 Illegal byte sequence.
305 .%T "Example RFC Title"
310 .%B "Example Book Title"
311 .%O ISBN-0-000-00000-0
316 .%J "Example Journal Name"
317 .%T "Example Article Title"
322 manual page example first appeared in
327 section examples are:
331 manual page example first appeared in
336 manual page example first appeared in
340 manual page was written by
341 .An Giorgos Keramidas Aq keramida@FreeBSD.org .
343 The actual code for this function is vaporware.