FreeBSD/Linux Kernel Cross Reference
sys/geom/geom_ext.h
1 /*-
2 * Copyright (c) 2003 Poul-Henning Kamp
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. The names of the authors may not be used to endorse or promote
14 * products derived from this software without specific prior written
15 * permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * This file defines the interface between libgeom and the geom control device
30 * in the kernel, the interfaces defined herein are to be considered private
31 * and may only be used by libgeom. Applications wishing to interact with
32 * the geom subsystem must use libgeoms published APIs.
33 *
34 * $FreeBSD: releng/5.1/sys/geom/geom_ext.h 112709 2003-03-27 14:35:00Z phk $
35 */
36
37 #ifndef _GEOM_GEOM_EXT_H_
38 #define _GEOM_GEOM_EXT_H_
39
40 #include <sys/ioccom.h>
41 #include <geom/geom_ctl.h>
42
43 struct gctl_req_arg {
44 u_int nlen;
45 char *name;
46 off_t offset;
47 int flag;
48 int len;
49 void *value;
50 };
51
52 #define GCTL_PARAM_RD 1 /* Must match VM_PROT_READ */
53 #define GCTL_PARAM_WR 2 /* Must match VM_PROT_WRITE */
54 #define GCTL_PARAM_RW (GCTL_PARAM_RD | GCTL_PARAM_WR)
55 #define GCTL_PARAM_ASCII 4
56
57 struct gctl_req {
58 u_int version;
59 u_int serial;
60 enum gctl_request request;
61 u_int narg;
62 struct gctl_req_arg *arg;
63 u_int lerror;
64 char *error;
65 struct gctl_req_table *reqt;
66 };
67
68 #define GEOM_CTL _IOW('G', GCTL_VERSION, struct gctl_req)
69
70 #define PATH_GEOM_CTL "geom.ctl"
71
72 #endif /* _GEOM_GEOM_EXT_H_ */
Cache object: 28a90eea074abbcf2af04fc55535d525
|