xref: /freebsd/share/examples/kld/cdev/module/cdev.h (revision b3e7694832e81d7a904a10f525f8797b753bf0d3)
1abbcaa0aSDoug Rabson /* 08 Nov 1998*/
2*f0cfa1b1SPedro F. Giffuni /*-
3abbcaa0aSDoug Rabson  * cdev.h - header for sample kld module implementing a character device
4abbcaa0aSDoug Rabson  *          driver.
5abbcaa0aSDoug Rabson  *
6abbcaa0aSDoug Rabson  * 08 Nov 1998  Rajesh Vaidheeswarran
7abbcaa0aSDoug Rabson  *
8*f0cfa1b1SPedro F. Giffuni  * SPDX-License-Identifier: BSD-4-Clause
9*f0cfa1b1SPedro F. Giffuni  *
10abbcaa0aSDoug Rabson  * Copyright (c) 1998 Rajesh Vaidheeswarran
11abbcaa0aSDoug Rabson  * All rights reserved.
12abbcaa0aSDoug Rabson  *
13abbcaa0aSDoug Rabson  * Redistribution and use in source and binary forms, with or without
14abbcaa0aSDoug Rabson  * modification, are permitted provided that the following conditions
15abbcaa0aSDoug Rabson  * are met:
16abbcaa0aSDoug Rabson  * 1. Redistributions of source code must retain the above copyright
17abbcaa0aSDoug Rabson  *    notice, this list of conditions and the following disclaimer.
18abbcaa0aSDoug Rabson  * 2. Redistributions in binary form must reproduce the above copyright
19abbcaa0aSDoug Rabson  *    notice, this list of conditions and the following disclaimer in the
20abbcaa0aSDoug Rabson  *    documentation and/or other materials provided with the distribution.
21abbcaa0aSDoug Rabson  * 3. All advertising materials mentioning features or use of this software
22abbcaa0aSDoug Rabson  *    must display the following acknowledgement:
23abbcaa0aSDoug Rabson  *      This product includes software developed by Rajesh Vaidheeswarran.
24abbcaa0aSDoug Rabson  * 4. The name Rajesh Vaidheeswarran may not be used to endorse or promote
25abbcaa0aSDoug Rabson  *    products derived from this software without specific prior written
26abbcaa0aSDoug Rabson  *    permission.
27abbcaa0aSDoug Rabson  *
28abbcaa0aSDoug Rabson  * THIS SOFTWARE IS PROVIDED BY RAJESH VAIDHEESWARRAN ``AS IS'' AND ANY
29abbcaa0aSDoug Rabson  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30abbcaa0aSDoug Rabson  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
31abbcaa0aSDoug Rabson  * ARE DISCLAIMED.  IN NO EVENT SHALL THE RAJESH VAIDHEESWARRAN BE LIABLE
32abbcaa0aSDoug Rabson  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
33abbcaa0aSDoug Rabson  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
34abbcaa0aSDoug Rabson  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
35abbcaa0aSDoug Rabson  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
36abbcaa0aSDoug Rabson  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
37abbcaa0aSDoug Rabson  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
38abbcaa0aSDoug Rabson  * SUCH DAMAGE.
39abbcaa0aSDoug Rabson  *
40abbcaa0aSDoug Rabson  * Copyright (c) 1993 Terrence R. Lambert.
41abbcaa0aSDoug Rabson  * All rights reserved.
42abbcaa0aSDoug Rabson  *
43abbcaa0aSDoug Rabson  * Redistribution and use in source and binary forms, with or without
44abbcaa0aSDoug Rabson  * modification, are permitted provided that the following conditions
45abbcaa0aSDoug Rabson  * are met:
46abbcaa0aSDoug Rabson  * 1. Redistributions of source code must retain the above copyright
47abbcaa0aSDoug Rabson  *    notice, this list of conditions and the following disclaimer.
48abbcaa0aSDoug Rabson  * 2. Redistributions in binary form must reproduce the above copyright
49abbcaa0aSDoug Rabson  *    notice, this list of conditions and the following disclaimer in the
50abbcaa0aSDoug Rabson  *    documentation and/or other materials provided with the distribution.
51abbcaa0aSDoug Rabson  * 3. All advertising materials mentioning features or use of this software
52abbcaa0aSDoug Rabson  *    must display the following acknowledgement:
53abbcaa0aSDoug Rabson  *      This product includes software developed by Terrence R. Lambert.
54abbcaa0aSDoug Rabson  * 4. The name Terrence R. Lambert may not be used to endorse or promote
55abbcaa0aSDoug Rabson  *    products derived from this software without specific prior written
56abbcaa0aSDoug Rabson  *    permission.
57abbcaa0aSDoug Rabson  *
58abbcaa0aSDoug Rabson  * THIS SOFTWARE IS PROVIDED BY TERRENCE R. LAMBERT ``AS IS'' AND ANY
59abbcaa0aSDoug Rabson  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
60abbcaa0aSDoug Rabson  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
61abbcaa0aSDoug Rabson  * ARE DISCLAIMED.  IN NO EVENT SHALL THE TERRENCE R. LAMBERT BE LIABLE
62abbcaa0aSDoug Rabson  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
63abbcaa0aSDoug Rabson  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
64abbcaa0aSDoug Rabson  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
65abbcaa0aSDoug Rabson  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
66abbcaa0aSDoug Rabson  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
67abbcaa0aSDoug Rabson  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
68abbcaa0aSDoug Rabson  * SUCH DAMAGE.
69abbcaa0aSDoug Rabson  *
70abbcaa0aSDoug Rabson  */
71abbcaa0aSDoug Rabson 
72abbcaa0aSDoug Rabson #ifndef __CDEV_H_
73abbcaa0aSDoug Rabson #define __CDEV_H_
74abbcaa0aSDoug Rabson 
75abbcaa0aSDoug Rabson d_open_t	mydev_open;
76abbcaa0aSDoug Rabson d_close_t	mydev_close;
77abbcaa0aSDoug Rabson d_ioctl_t	mydev_ioctl;
787320fd3aSMaxim Sobolev d_read_t	mydev_read;
797320fd3aSMaxim Sobolev d_write_t	mydev_write;
80abbcaa0aSDoug Rabson 
81abbcaa0aSDoug Rabson #endif
82