]>
Commit | Line | Data |
---|---|---|
d1ecb069 A |
1 | /* |
2 | * Copyright (c) 2004-2010 Apple Inc. All rights reserved. | |
3 | * | |
4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | |
0a7de745 | 5 | * |
d1ecb069 A |
6 | * This file contains Original Code and/or Modifications of Original Code |
7 | * as defined in and that are subject to the Apple Public Source License | |
8 | * Version 2.0 (the 'License'). You may not use this file except in | |
9 | * compliance with the License. The rights granted to you under the License | |
10 | * may not be used to create, or enable the creation or redistribution of, | |
11 | * unlawful or unlicensed copies of an Apple operating system, or to | |
12 | * circumvent, violate, or enable the circumvention or violation of, any | |
13 | * terms of an Apple operating system software license agreement. | |
0a7de745 | 14 | * |
d1ecb069 A |
15 | * Please obtain a copy of the License at |
16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | |
0a7de745 | 17 | * |
d1ecb069 A |
18 | * The Original Code and all software distributed under the License are |
19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | |
21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | |
23 | * Please see the License for the specific language governing rights and | |
24 | * limitations under the License. | |
0a7de745 | 25 | * |
d1ecb069 A |
26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ |
27 | */ | |
28 | ||
91447636 A |
29 | #ifndef _KERN_SYS_KERNELTYPES_H_ |
30 | #define _KERN_SYS_KERNELTYPES_H_ | |
31 | ||
32 | #include <sys/cdefs.h> | |
33 | #include <sys/types.h> | |
34 | #include <stdint.h> | |
35 | ||
36 | #ifdef BSD_BUILD | |
37 | /* Macros(?) to clear/set/test flags. */ | |
0a7de745 A |
38 | #define SET(t, f) (t) |= (f) |
39 | #define CLR(t, f) (t) &= ~(f) | |
40 | #define ISSET(t, f) ((t) & (f)) | |
91447636 A |
41 | #endif |
42 | ||
43 | ||
91447636 A |
44 | typedef int64_t daddr64_t; |
45 | ||
91447636 A |
46 | #ifndef BSD_BUILD |
47 | struct buf; | |
48 | typedef struct buf * buf_t; | |
49 | ||
50 | struct file; | |
51 | typedef struct file * file_t; | |
52 | ||
b0d623f7 | 53 | #ifndef __LP64__ |
91447636 A |
54 | struct ucred; |
55 | typedef struct ucred * ucred_t; | |
b0d623f7 | 56 | #endif |
91447636 | 57 | |
cb323159 | 58 | #if defined(KERNEL) || !defined(_SYS_MOUNT_H_) /* also defined in mount.h */ |
91447636 A |
59 | struct mount; |
60 | typedef struct mount * mount_t; | |
61 | ||
91447636 A |
62 | struct vnode; |
63 | typedef struct vnode * vnode_t; | |
cb323159 | 64 | #endif |
91447636 A |
65 | |
66 | struct proc; | |
67 | typedef struct proc * proc_t; | |
68 | ||
f427ee49 A |
69 | struct proc_ident; |
70 | typedef struct proc_ident * proc_ident_t; | |
71 | ||
91447636 A |
72 | struct uio; |
73 | typedef struct uio * uio_t; | |
74 | ||
75 | struct vfs_context; | |
76 | typedef struct vfs_context * vfs_context_t; | |
77 | ||
78 | struct vfstable; | |
79 | typedef struct vfstable * vfstable_t; | |
80 | ||
81 | struct __ifnet; | |
82 | struct __mbuf; | |
83 | struct __pkthdr; | |
84 | struct __socket; | |
85 | struct __sockopt; | |
86 | struct __ifaddr; | |
87 | struct __ifmultiaddr; | |
88 | struct __ifnet_filter; | |
89 | struct __rtentry; | |
d1ecb069 | 90 | struct __if_clone; |
7ddcb079 | 91 | struct __bufattr; |
91447636 | 92 | |
0a7de745 A |
93 | typedef struct __ifnet* ifnet_t; |
94 | typedef struct __mbuf* mbuf_t; | |
95 | typedef struct __pkthdr* pkthdr_t; | |
96 | typedef struct __socket* socket_t; | |
97 | typedef struct __sockopt* sockopt_t; | |
98 | typedef struct __ifaddr* ifaddr_t; | |
99 | typedef struct __ifmultiaddr* ifmultiaddr_t; | |
100 | typedef struct __ifnet_filter* interface_filter_t; | |
101 | typedef struct __rtentry* route_t; | |
102 | typedef struct __if_clone* if_clone_t; | |
103 | typedef struct __bufattr* bufattr_t; | |
91447636 A |
104 | |
105 | #else /* BSD_BUILD */ | |
106 | ||
107 | typedef struct buf * buf_t; | |
108 | typedef struct file * file_t; | |
b0d623f7 | 109 | #ifndef __LP64__ |
91447636 | 110 | typedef struct ucred * ucred_t; |
b0d623f7 | 111 | #endif |
cb323159 | 112 | #if defined(KERNEL) || !defined(_SYS_MOUNT_H_) /* also defined in mount.h */ |
91447636 A |
113 | typedef struct mount * mount_t; |
114 | typedef struct vnode * vnode_t; | |
cb323159 | 115 | #endif |
91447636 | 116 | typedef struct proc * proc_t; |
f427ee49 | 117 | typedef struct proc_ident * proc_ident_t; |
91447636 A |
118 | typedef struct uio * uio_t; |
119 | typedef struct user_iovec * user_iovec_t; | |
120 | typedef struct vfs_context * vfs_context_t; | |
121 | typedef struct vfstable * vfstable_t; | |
122 | ||
813fb2f6 | 123 | #ifdef KERNEL_PRIVATE |
91447636 | 124 | typedef struct kern_iovec * kern_iovec_t; |
0a7de745 A |
125 | typedef struct ifnet* ifnet_t; |
126 | typedef struct mbuf* mbuf_t; | |
127 | typedef struct pkthdr* pkthdr_t; | |
128 | typedef struct socket* socket_t; | |
129 | typedef struct sockopt* sockopt_t; | |
130 | typedef struct ifaddr* ifaddr_t; | |
131 | typedef struct ifmultiaddr* ifmultiaddr_t; | |
132 | typedef struct ifnet_filter* interface_filter_t; | |
133 | typedef struct rtentry* route_t; | |
134 | typedef struct if_clone* if_clone_t; | |
135 | typedef struct bufattr* bufattr_t; | |
91447636 A |
136 | #endif /* KERNEL_PRIVATE */ |
137 | ||
138 | #endif /* !BSD_BUILD */ | |
139 | ||
39236c6e | 140 | #include <sys/_types/_guid_t.h> |
91447636 A |
141 | |
142 | #ifndef _KAUTH_ACE | |
143 | #define _KAUTH_ACE | |
144 | struct kauth_ace; | |
145 | typedef struct kauth_ace * kauth_ace_t; | |
146 | #endif | |
147 | #ifndef _KAUTH_ACL | |
148 | #define _KAUTH_ACL | |
149 | struct kauth_acl; | |
150 | typedef struct kauth_acl * kauth_acl_t; | |
151 | #endif | |
152 | #ifndef _KAUTH_FILESEC | |
153 | #define _KAUTH_FILESEC | |
154 | struct kauth_filesec; | |
155 | typedef struct kauth_filesec * kauth_filesec_t; | |
156 | #endif | |
157 | ||
813fb2f6 A |
158 | #ifndef _KAUTH_ACTION_T |
159 | #define _KAUTH_ACTION_T | |
160 | typedef int kauth_action_t; | |
161 | #endif | |
162 | ||
91447636 | 163 | #endif /* !_KERN_SYS_KERNELTYPES_H_ */ |