1 .\" Copyright (c) [year] [your name]
3 .\" Redistribution and use in source and binary forms, with or without
4 .\" modification, are permitted provided that the following conditions
6 .\" 1. Redistributions of source code must retain the above copyright
7 .\" notice, this list of conditions and the following disclaimer.
8 .\" 2. Redistributions in binary form must reproduce the above copyright
9 .\" notice, this list of conditions and the following disclaimer in the
10 .\" documentation and/or other materials provided with the distribution.
12 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
13 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
15 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
16 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 .\" Note: The date here should be updated whenever a non-trivial
27 .\" change is made to the manual page.
28 .Dd September 27, 2006
33 .Nd "example kernel interface manual page"
37 .Fn example "char *ptr" "int mode"
39 This is an example manual page for the
42 It is intended that this example can be used as a template
43 when writing a new manual page.
47 function takes two arguments:
53 may have one of the following values:
54 .Bl -tag -width ".Dv EXAMPLE_ONE"
56 First example of a defined variable.
63 The above values are defined in
70 .Sh IMPLEMENTATION NOTES
73 function is not actually implemented.
77 lock must be held before
85 no sleepable locks (i.e.,
87 locks) can be acquired in
92 function returns the value 0 if successful;
93 otherwise one of the values listed in the
95 section is returned, to indicate the error.
100 mtx_lock(&example_lock);
101 if ((error = example(NULL, EXAMPLE_ONE)) != 0) {
102 mtx_unlock(&example_lock);
105 mtx_unlock(&example_lock);
110 function has no known compatibility issues.
112 .\" Delete any errno's that are not returned by your
113 .\" function or system call and then tailor the
114 .\" remaining text as needed.
117 function will fail if:
120 Operation not permitted.
122 No such file or directory.
126 Interrupted system call.
130 Device not configured.
132 Argument list too long.
140 Resource deadlock avoided.
142 Cannot allocate memory.
148 Block device required.
156 Operation not supported by device.
164 Too many open files in system.
168 Inappropriate ioctl for device.
174 No space left on device.
178 Read-only file system.
184 Numerical argument out of domain.
188 Resource temporarily unavailable.
189 .It Bq Er EWOULDBLOCK
190 Operation would block.
191 .It Bq Er EINPROGRESS
192 Operation now in progress.
194 Operation already in progress.
196 Socket operation on non-socket.
197 .It Bq Er EDESTADDRREQ
198 Destination address required.
202 Protocol wrong type for socket.
203 .It Bq Er ENOPROTOOPT
204 Protocol not available.
205 .It Bq Er EPROTONOSUPPORT
206 Protocol not supported.
207 .It Bq Er ESOCKTNOSUPPORT
208 Socket type not supported.
210 Operation not supported.
211 .It Bq Er EPFNOSUPPORT
212 Protocol family not supported.
213 .It Bq Er EAFNOSUPPORT
214 Address family not supported by protocol family.
216 Address already in use.
217 .It Bq Er EADDRNOTAVAIL
218 Cannot assign requested address.
221 .It Bq Er ENETUNREACH
222 Network is unreachable.
224 Network dropped connection on reset.
225 .It Bq Er ECONNABORTED
226 Software causes connection abort.
228 No buffer space available.
230 Socket is already connected.
232 Socket is not connected.
234 Cannot send after socket shutdown.
235 .It Bq Er ETOOMANYREFS
236 Too many references: cannot splice.
239 .It Bq Er ECONNREFUSED
242 Too many levels of symbolic links.
243 .It Bq Er ENAMETOOLONG
247 .It Bq Er EHOSTUNREACH
258 Stale NFS file handle.
260 Too many levels of remote in path.
263 .It Bq Er ERPCMISMATCH
265 .It Bq Er EPROGUNAVAIL
266 RPC program not available.
267 .It Bq Er EPROGMISMATCH
268 Program version wrong.
269 .It Bq Er EPROCUNAVAIL
270 Bad procedure for program.
274 Function not implemented.
276 Inappropriate file type or format.
278 Authentication error.
284 No message of desired type.
286 Value too large to be stored in data type.
290 Illegal byte sequence.
304 .%T "Example RFC Title"
309 .%B "Example Book Title"
310 .%O ISBN-0-000-00000-0
315 .%J "Example Journal Name"
316 .%T "Example Article Title"
321 manual page example first appeared in
326 section examples are:
330 manual page example first appeared in
335 manual page example first appeared in
339 manual page was written by
340 .An Giorgos Keramidas Aq Mt keramida@FreeBSD.org .
342 The actual code for this function is vaporware.