xref: /netbsd-src/sys/rump/include/rump/rumpdefs.h (revision 413d532bcc3f62d122e56d92e13ac64825a40baf)
1 /*	$NetBSD: rumpdefs.h,v 1.30 2013/12/18 20:12:08 pooka Exp $	*/
2 
3 /*
4  *	AUTOMATICALLY GENERATED.  DO NOT EDIT.
5  */
6 
7 #ifndef _RUMP_RUMPDEFS_H_
8 #define _RUMP_RUMPDEFS_H_
9 
10 #include <rump/rump_namei.h>
11 
12 /*	NetBSD: fcntl.h,v 1.46 2013/09/15 10:41:20 njoly Exp 	*/
13 #define	RUMP_O_RDONLY	0x00000000	/* open for reading only */
14 #define	RUMP_O_WRONLY	0x00000001	/* open for writing only */
15 #define	RUMP_O_RDWR		0x00000002	/* open for reading and writing */
16 #define	RUMP_O_ACCMODE	0x00000003	/* mask for above modes */
17 #define	RUMP_O_NONBLOCK	0x00000004	/* no delay */
18 #define	RUMP_O_APPEND	0x00000008	/* set append mode */
19 #define	RUMP_O_SHLOCK	0x00000010	/* open with shared file lock */
20 #define	RUMP_O_EXLOCK	0x00000020	/* open with exclusive file lock */
21 #define	RUMP_O_ASYNC		0x00000040	/* signal pgrp when data ready */
22 #define	RUMP_O_SYNC		0x00000080	/* synchronous writes */
23 #define	RUMP_O_NOFOLLOW	0x00000100	/* don't follow symlinks on the last */
24 #define	RUMP_O_CREAT		0x00000200	/* create if nonexistent */
25 #define	RUMP_O_TRUNC		0x00000400	/* truncate to zero length */
26 #define	RUMP_O_EXCL		0x00000800	/* error if already exists */
27 #define	RUMP_O_NOCTTY	0x00008000	/* don't assign controlling terminal */
28 #define	RUMP_O_DSYNC		0x00010000	/* write: I/O data completion */
29 #define	RUMP_O_RSYNC		0x00020000	/* read: I/O completion as for write */
30 #define	RUMP_O_DIRECT	0x00080000	/* direct I/O hint */
31 #define	RUMP_O_DIRECTORY	0x00200000	/* fail if not a directory */
32 #define	RUMP_O_CLOEXEC	0x00400000	/* set close on exec */
33 #define	RUMP_O_SEARCH	0x00800000	/* skip search permission checks */
34 #define	RUMP_O_NOSIGPIPE	0x01000000	/* don't deliver sigpipe */
35 
36 /*	NetBSD: vnode.h,v 1.243 2013/12/01 17:29:40 christos Exp 	*/
37 enum rump_vtype	{ RUMP_VNON, RUMP_VREG, RUMP_VDIR, RUMP_VBLK, RUMP_VCHR, RUMP_VLNK, RUMP_VSOCK, RUMP_VFIFO, RUMP_VBAD };
38 #define	RUMP_LK_SHARED	0x00000001
39 #define	RUMP_LK_EXCLUSIVE	0x00000002
40 #define	RUMP_LK_NOWAIT	0x00000010
41 #define	RUMP_LK_RETRY	0x00020000
42 
43 /*	NetBSD: errno.h,v 1.40 2013/01/02 18:51:53 dsl Exp 	*/
44 #define	RUMP_EPERM		1		/* Operation not permitted */
45 #define	RUMP_ENOENT		2		/* No such file or directory */
46 #define	RUMP_ESRCH		3		/* No such process */
47 #define	RUMP_EINTR		4		/* Interrupted system call */
48 #define	RUMP_EIO		5		/* Input/output error */
49 #define	RUMP_ENXIO		6		/* Device not configured */
50 #define	RUMP_E2BIG		7		/* Argument list too long */
51 #define	RUMP_ENOEXEC		8		/* Exec format error */
52 #define	RUMP_EBADF		9		/* Bad file descriptor */
53 #define	RUMP_ECHILD		10		/* No child processes */
54 #define	RUMP_EDEADLK		11		/* Resource deadlock avoided */
55 #define	RUMP_ENOMEM		12		/* Cannot allocate memory */
56 #define	RUMP_EACCES		13		/* Permission denied */
57 #define	RUMP_EFAULT		14		/* Bad address */
58 #define	RUMP_ENOTBLK		15		/* Block device required */
59 #define	RUMP_EBUSY		16		/* Device busy */
60 #define	RUMP_EEXIST		17		/* File exists */
61 #define	RUMP_EXDEV		18		/* Cross-device link */
62 #define	RUMP_ENODEV		19		/* Operation not supported by device */
63 #define	RUMP_ENOTDIR		20		/* Not a directory */
64 #define	RUMP_EISDIR		21		/* Is a directory */
65 #define	RUMP_EINVAL		22		/* Invalid argument */
66 #define	RUMP_ENFILE		23		/* Too many open files in system */
67 #define	RUMP_EMFILE		24		/* Too many open files */
68 #define	RUMP_ENOTTY		25		/* Inappropriate ioctl for device */
69 #define	RUMP_ETXTBSY		26		/* Text file busy */
70 #define	RUMP_EFBIG		27		/* File too large */
71 #define	RUMP_ENOSPC		28		/* No space left on device */
72 #define	RUMP_ESPIPE		29		/* Illegal seek */
73 #define	RUMP_EROFS		30		/* Read-only file system */
74 #define	RUMP_EMLINK		31		/* Too many links */
75 #define	RUMP_EPIPE		32		/* Broken pipe */
76 #define	RUMP_EDOM		33		/* Numerical argument out of domain */
77 #define	RUMP_ERANGE		34		/* Result too large or too small */
78 #define	RUMP_EAGAIN		35		/* Resource temporarily unavailable */
79 #define	RUMP_EWOULDBLOCK	EAGAIN		/* Operation would block */
80 #define	RUMP_EINPROGRESS	36		/* Operation now in progress */
81 #define	RUMP_EALREADY	37		/* Operation already in progress */
82 #define	RUMP_ENOTSOCK	38		/* Socket operation on non-socket */
83 #define	RUMP_EDESTADDRREQ	39		/* Destination address required */
84 #define	RUMP_EMSGSIZE	40		/* Message too long */
85 #define	RUMP_EPROTOTYPE	41		/* Protocol wrong type for socket */
86 #define	RUMP_ENOPROTOOPT	42		/* Protocol option not available */
87 #define	RUMP_EPROTONOSUPPORT	43		/* Protocol not supported */
88 #define	RUMP_ESOCKTNOSUPPORT	44		/* Socket type not supported */
89 #define	RUMP_EOPNOTSUPP	45		/* Operation not supported */
90 #define	RUMP_EPFNOSUPPORT	46		/* Protocol family not supported */
91 #define	RUMP_EAFNOSUPPORT	47		/* Address family not supported by protocol family */
92 #define	RUMP_EADDRINUSE	48		/* Address already in use */
93 #define	RUMP_EADDRNOTAVAIL	49		/* Can't assign requested address */
94 #define	RUMP_ENETDOWN	50		/* Network is down */
95 #define	RUMP_ENETUNREACH	51		/* Network is unreachable */
96 #define	RUMP_ENETRESET	52		/* Network dropped connection on reset */
97 #define	RUMP_ECONNABORTED	53		/* Software caused connection abort */
98 #define	RUMP_ECONNRESET	54		/* Connection reset by peer */
99 #define	RUMP_ENOBUFS		55		/* No buffer space available */
100 #define	RUMP_EISCONN		56		/* Socket is already connected */
101 #define	RUMP_ENOTCONN	57		/* Socket is not connected */
102 #define	RUMP_ESHUTDOWN	58		/* Can't send after socket shutdown */
103 #define	RUMP_ETOOMANYREFS	59		/* Too many references: can't splice */
104 #define	RUMP_ETIMEDOUT	60		/* Operation timed out */
105 #define	RUMP_ECONNREFUSED	61		/* Connection refused */
106 #define	RUMP_ELOOP		62		/* Too many levels of symbolic links */
107 #define	RUMP_ENAMETOOLONG	63		/* File name too long */
108 #define	RUMP_EHOSTDOWN	64		/* Host is down */
109 #define	RUMP_EHOSTUNREACH	65		/* No route to host */
110 #define	RUMP_ENOTEMPTY	66		/* Directory not empty */
111 #define	RUMP_EPROCLIM	67		/* Too many processes */
112 #define	RUMP_EUSERS		68		/* Too many users */
113 #define	RUMP_EDQUOT		69		/* Disc quota exceeded */
114 #define	RUMP_ESTALE		70		/* Stale NFS file handle */
115 #define	RUMP_EREMOTE		71		/* Too many levels of remote in path */
116 #define	RUMP_EBADRPC		72		/* RPC struct is bad */
117 #define	RUMP_ERPCMISMATCH	73		/* RPC version wrong */
118 #define	RUMP_EPROGUNAVAIL	74		/* RPC prog. not avail */
119 #define	RUMP_EPROGMISMATCH	75		/* Program version wrong */
120 #define	RUMP_EPROCUNAVAIL	76		/* Bad procedure for program */
121 #define	RUMP_ENOLCK		77		/* No locks available */
122 #define	RUMP_ENOSYS		78		/* Function not implemented */
123 #define	RUMP_EFTYPE		79		/* Inappropriate file type or format */
124 #define	RUMP_EAUTH		80		/* Authentication error */
125 #define	RUMP_ENEEDAUTH	81		/* Need authenticator */
126 #define	RUMP_EIDRM		82		/* Identifier removed */
127 #define	RUMP_ENOMSG		83		/* No message of desired type */
128 #define	RUMP_EOVERFLOW	84		/* Value too large to be stored in data type */
129 #define	RUMP_EILSEQ		85		/* Illegal byte sequence */
130 #define RUMP_ENOTSUP		86		/* Not supported */
131 #define RUMP_ECANCELED	87		/* Operation canceled */
132 #define RUMP_EBADMSG		88		/* Bad or Corrupt message */
133 #define RUMP_ENODATA		89		/* No message available */
134 #define RUMP_ENOSR		90		/* No STREAM resources */
135 #define RUMP_ENOSTR		91		/* Not a STREAM */
136 #define RUMP_ETIME		92		/* STREAM ioctl timeout */
137 #define	RUMP_ENOATTR		93		/* Attribute not found */
138 #define	RUMP_EMULTIHOP	94		/* Multihop attempted */
139 #define	RUMP_ENOLINK		95		/* Link has been severed */
140 #define	RUMP_EPROTO		96		/* Protocol error */
141 #define	RUMP_ELAST		96		/* Must equal largest errno */
142 #define	RUMP_EJUSTRETURN	-2		/* don't modify regs, just return */
143 #define	RUMP_ERESTART	-3		/* restart syscall */
144 #define	RUMP_EPASSTHROUGH	-4		/* ioctl not handled by this layer */
145 #define	RUMP_EDUPFD		-5		/* Dup given fd */
146 #define	RUMP_EMOVEFD		-6		/* Move given fd */
147 
148 /*	NetBSD: reboot.h,v 1.25 2007/12/25 18:33:48 perry Exp 	*/
149 #define	RUMP_RB_AUTOBOOT	0
150 #define	RUMP_RB_ASKNAME	0x00000001
151 #define	RUMP_RB_SINGLE	0x00000002
152 #define	RUMP_RB_NOSYNC	0x00000004
153 #define	RUMP_RB_HALT		0x00000008
154 #define	RUMP_RB_INITNAME	0x00000010
155 #define	__RUMP_RB_UNUSED1	0x00000020
156 #define	RUMP_RB_KDB		0x00000040
157 #define	RUMP_RB_RDONLY	0x00000080
158 #define	RUMP_RB_DUMP		0x00000100
159 #define	RUMP_RB_MINIROOT	0x00000200
160 #define	RUMP_RB_STRING	0x00000400
161 #define	RUMP_RB_POWERDOWN	(RUMP_RB_HALT|0x800)
162 #define RUMP_RB_USERCONF	0x00001000
163 #define	RUMP_RB_MD1		0x10000000
164 #define	RUMP_RB_MD2		0x20000000
165 #define	RUMP_RB_MD3		0x40000000
166 #define	RUMP_RB_MD4		0x80000000
167 #define	RUMP_AB_NORMAL	0x00000000
168 #define	RUMP_AB_QUIET	0x00010000
169 #define	RUMP_AB_VERBOSE	0x00020000
170 #define	RUMP_AB_SILENT	0x00040000
171 #define	RUMP_AB_DEBUG	0x00080000
172 
173 /*	NetBSD: socket.h,v 1.108 2013/01/31 14:30:47 joerg Exp 	*/
174 #define	RUMP_SOCK_STREAM	1
175 #define	RUMP_SOCK_DGRAM	2
176 #define	RUMP_SOCK_RAW	3
177 #define	RUMP_SOCK_RDM	4
178 #define	RUMP_SOCK_SEQPACKET	5
179 #define	RUMP_SOCK_CLOEXEC	0x10000000
180 #define	RUMP_SOCK_NONBLOCK	0x20000000
181 #define	RUMP_SOCK_NOSIGPIPE	0x40000000
182 #define	RUMP_SOCK_FLAGS_MASK	0xf0000000
183 #define	RUMP_AF_UNSPEC	0
184 #define	RUMP_AF_LOCAL	1
185 #define	RUMP_AF_UNIX		RUMP_AF_LOCAL
186 #define	RUMP_AF_INET		2
187 #define	RUMP_AF_IMPLINK	3
188 #define	RUMP_AF_PUP		4
189 #define	RUMP_AF_CHAOS	5
190 #define	RUMP_AF_NS		6
191 #define	RUMP_AF_ISO		7
192 #define	RUMP_AF_OSI		RUMP_AF_ISO
193 #define	RUMP_AF_ECMA		8
194 #define	RUMP_AF_DATAKIT	9
195 #define	RUMP_AF_CCITT	10
196 #define	RUMP_AF_SNA		11
197 #define RUMP_AF_DECnet	12
198 #define RUMP_AF_DLI		13
199 #define RUMP_AF_LAT		14
200 #define	RUMP_AF_HYLINK	15
201 #define	RUMP_AF_APPLETALK	16
202 #define	RUMP_AF_OROUTE	17
203 #define	RUMP_AF_LINK		18
204 #define	RUMP_AF_COIP		20
205 #define	RUMP_AF_CNT		21
206 #define	RUMP_AF_IPX		23
207 #define	RUMP_AF_INET6	24
208 #define RUMP_AF_ISDN		26
209 #define RUMP_AF_E164		RUMP_AF_ISDN
210 #define RUMP_AF_NATM		27
211 #define RUMP_AF_ARP		28
212 #define RUMP_AF_BLUETOOTH	31
213 #define	RUMP_AF_IEEE80211	32
214 #define	RUMP_AF_MPLS		33
215 #define	RUMP_AF_ROUTE	34
216 #define	RUMP_AF_MAX		35
217 #define	RUMP_PF_UNSPEC	RUMP_AF_UNSPEC
218 #define	RUMP_PF_LOCAL	RUMP_AF_LOCAL
219 #define	RUMP_PF_UNIX		RUMP_PF_LOCAL
220 #define	RUMP_PF_INET		RUMP_AF_INET
221 #define	RUMP_PF_IMPLINK	RUMP_AF_IMPLINK
222 #define	RUMP_PF_PUP		RUMP_AF_PUP
223 #define	RUMP_PF_CHAOS	RUMP_AF_CHAOS
224 #define	RUMP_PF_NS		RUMP_AF_NS
225 #define	RUMP_PF_ISO		RUMP_AF_ISO
226 #define	RUMP_PF_OSI		RUMP_AF_ISO
227 #define	RUMP_PF_ECMA		RUMP_AF_ECMA
228 #define	RUMP_PF_DATAKIT	RUMP_AF_DATAKIT
229 #define	RUMP_PF_CCITT	RUMP_AF_CCITT
230 #define	RUMP_PF_SNA		RUMP_AF_SNA
231 #define RUMP_PF_DECnet	RUMP_AF_DECnet
232 #define RUMP_PF_DLI		RUMP_AF_DLI
233 #define RUMP_PF_LAT		RUMP_AF_LAT
234 #define	RUMP_PF_HYLINK	RUMP_AF_HYLINK
235 #define	RUMP_PF_APPLETALK	RUMP_AF_APPLETALK
236 #define	RUMP_PF_OROUTE	RUMP_AF_OROUTE
237 #define	RUMP_PF_LINK		RUMP_AF_LINK
238 #define	RUMP_PF_XTP		pseudo_RUMP_AF_XTP
239 #define	RUMP_PF_COIP		RUMP_AF_COIP
240 #define	RUMP_PF_CNT		RUMP_AF_CNT
241 #define	RUMP_PF_INET6	RUMP_AF_INET6
242 #define	RUMP_PF_IPX		RUMP_AF_IPX
243 #define RUMP_PF_RTIP		pseudo_RUMP_AF_RTIP
244 #define RUMP_PF_PIP		pseudo_RUMP_AF_PIP
245 #define RUMP_PF_ISDN		RUMP_AF_ISDN
246 #define RUMP_PF_E164		RUMP_AF_E164
247 #define RUMP_PF_NATM		RUMP_AF_NATM
248 #define RUMP_PF_ARP		RUMP_AF_ARP
249 #define RUMP_PF_KEY 		pseudo_RUMP_AF_KEY
250 #define RUMP_PF_BLUETOOTH	RUMP_AF_BLUETOOTH
251 #define	RUMP_PF_MPLS		RUMP_AF_MPLS
252 #define	RUMP_PF_ROUTE	RUMP_AF_ROUTE
253 #define	RUMP_PF_MAX		RUMP_AF_MAX
254 #define	RUMP_SO_DEBUG	0x0001
255 #define	RUMP_SO_ACCEPTCONN	0x0002
256 #define	RUMP_SO_REUSEADDR	0x0004
257 #define	RUMP_SO_KEEPALIVE	0x0008
258 #define	RUMP_SO_DONTROUTE	0x0010
259 #define	RUMP_SO_BROADCAST	0x0020
260 #define	RUMP_SO_USELOOPBACK	0x0040
261 #define	RUMP_SO_LINGER	0x0080
262 #define	RUMP_SO_OOBINLINE	0x0100
263 #define	RUMP_SO_REUSEPORT	0x0200
264 #define	RUMP_SO_NOSIGPIPE	0x0800
265 #define	RUMP_SO_ACCEPTFILTER	0x1000
266 #define	RUMP_SO_TIMESTAMP	0x2000
267 #define RUMP_SO_SNDBUF	0x1001
268 #define RUMP_SO_RCVBUF	0x1002
269 #define RUMP_SO_SNDLOWAT	0x1003
270 #define RUMP_SO_RCVLOWAT	0x1004
271 #define	RUMP_SO_ERROR	0x1007
272 #define	RUMP_SO_TYPE		0x1008
273 #define	RUMP_SO_OVERFLOWED	0x1009
274 #define	RUMP_SO_NOHEADER	0x100a
275 #define RUMP_SO_SNDTIMEO	0x100b
276 #define RUMP_SO_RCVTIMEO	0x100c
277 #define	RUMP_SOL_SOCKET	0xffff
278 #define	RUMP_MSG_OOB		0x0001
279 #define	RUMP_MSG_PEEK	0x0002
280 #define	RUMP_MSG_DONTROUTE	0x0004
281 #define	RUMP_MSG_EOR		0x0008
282 #define	RUMP_MSG_TRUNC	0x0010
283 #define	RUMP_MSG_CTRUNC	0x0020
284 #define	RUMP_MSG_WAITALL	0x0040
285 #define	RUMP_MSG_DONTWAIT	0x0080
286 #define	RUMP_MSG_BCAST	0x0100
287 #define	RUMP_MSG_MCAST	0x0200
288 #define	RUMP_MSG_NOSIGNAL	0x0400
289 #define	RUMP_MSG_CRUMP_MSG_CLOEXEC 0x0800
290 #define	RUMP_MSG_NBIO	0x1000
291 #define	RUMP_MSG_WAITFORONE	0x2000
292 #define	RUMP_MSG_USERFLAGS	0x0ffffff
293 #define RUMP_MSG_NAMEMBUF	0x1000000
294 #define RUMP_MSG_CONTROLMBUF	0x2000000
295 #define RUMP_MSG_IOVUSRSPACE	0x4000000
296 #define RUMP_MSG_LENUSRSPACE	0x8000000
297 
298 /*	NetBSD: in.h,v 1.89 2013/06/27 19:38:16 christos Exp 	*/
299 #define	RUMP_IP_OPTIONS		1
300 #define	RUMP_IP_HDRINCL		2
301 #define	RUMP_IP_TOS			3
302 #define	RUMP_IP_TTL			4
303 #define	RUMP_IP_RECVOPTS		5
304 #define	RUMP_IP_RECVRETOPTS		6
305 #define	RUMP_IP_RECVDSTADDR		7
306 #define	RUMP_IP_RETOPTS		8
307 #define	RUMP_IP_MULTICAST_IF		9
308 #define	RUMP_IP_MULTICAST_TTL	10
309 #define	RUMP_IP_MULTICAST_LOOP	11
310 #define	RUMP_IP_ADD_MEMBERSHIP	12
311 #define	RUMP_IP_DROP_MEMBERSHIP	13
312 #define	RUMP_IP_PORTALGO		18
313 #define	RUMP_IP_PORTRANGE		19
314 #define	RUMP_IP_RECVIF		20
315 #define	RUMP_IP_ERRORMTU		21
316 #define	RUMP_IP_IPSEC_POLICY		22
317 #define	RUMP_IP_RECVTTL		23
318 #define	RUMP_IP_MINTTL		24
319 #define	RUMP_IP_PKTINFO		25
320 #define	RUMP_IP_RECVPKTINFO		26
321 #define	RUMP_IP_DEFAULT_MULTICAST_TTL  1
322 #define	RUMP_IP_DEFAULT_MULTICAST_LOOP 1
323 #define	RUMP_IP_MAX_MEMBERSHIPS	20
324 #define	RUMP_IP_PORTRANGE_DEFAULT	0
325 #define	RUMP_IP_PORTRANGE_HIGH	1
326 #define	RUMP_IP_PORTRANGE_LOW	2
327 #define	RUMP_IPPROTO_IP		0
328 #define	RUMP_IPPROTO_HOPOPTS		0
329 #define	RUMP_IPPROTO_ICMP		1
330 #define	RUMP_IPPROTO_IGMP		2
331 #define	RUMP_IPPROTO_GGP		3
332 #define	RUMP_IPPROTO_IPV4		4
333 #define	RUMP_IPPROTO_IPIP		4
334 #define	RUMP_IPPROTO_TCP		6
335 #define	RUMP_IPPROTO_EGP		8
336 #define	RUMP_IPPROTO_PUP		12
337 #define	RUMP_IPPROTO_UDP		17
338 #define	RUMP_IPPROTO_IDP		22
339 #define	RUMP_IPPROTO_TP		29
340 #define	RUMP_IPPROTO_IPV6		41
341 #define	RUMP_IPPROTO_ROUTING		43
342 #define	RUMP_IPPROTO_FRAGMENT	44
343 #define	RUMP_IPPROTO_RSVP		46
344 #define	RUMP_IPPROTO_GRE		47
345 #define	RUMP_IPPROTO_ESP		50
346 #define	RUMP_IPPROTO_AH		51
347 #define	RUMP_IPPROTO_MOBILE		55
348 #define	RUMP_IPPROTO_IPV6_ICMP	58
349 #define	RUMP_IPPROTO_ICMPV6		58
350 #define	RUMP_IPPROTO_NONE		59
351 #define	RUMP_IPPROTO_DSTOPTS		60
352 #define	RUMP_IPPROTO_EON		80
353 #define	RUMP_IPPROTO_ETHERIP		97
354 #define	RUMP_IPPROTO_ENCAP		98
355 #define	RUMP_IPPROTO_PIM		103
356 #define	RUMP_IPPROTO_IPCOMP		108
357 #define	RUMP_IPPROTO_VRRP		112
358 #define	RUMP_IPPROTO_CARP		112
359 #define RUMP_IPPROTO_PFSYNC      240
360 #define	RUMP_IPPROTO_RAW		255
361 #define	RUMP_IPPROTO_MAX		256
362 #define	RUMP_IPPROTO_DONE		257
363 #define	RUMP_IPPROTO_MAXID	(RUMP_IPPROTO_AH + 1)
364 
365 /*	NetBSD: tcp.h,v 1.30 2012/01/07 20:20:22 christos Exp 	*/
366 #define	RUMP_TCP_MSS		536
367 #define	RUMP_TCP_MINMSS	216
368 #define	RUMP_TCP_MAXWIN	65535
369 #define	RUMP_TCP_MAX_WINSHIFT	14
370 #define	RUMP_TCP_MAXBURST	4
371 #define	RUMP_TCP_NODELAY	1
372 #define	RUMP_TCP_MAXSEG	2
373 #define	RUMP_TCP_KEEPIDLE	3
374 #define	RUMP_TCP_NOPUSH	4
375 #define	RUMP_TCP_KEEPINTVL	5
376 #define	RUMP_TCP_KEEPCNT	6
377 #define	RUMP_TCP_KEEPINIT	7
378 #define	RUMP_TCP_NOOPT	8
379 #define	RUMP_TCP_MD5SIG	0x10
380 #define	RUMP_TCP_CONGCTL	0x20
381 
382 /*	NetBSD: mount.h,v 1.210 2013/11/23 13:35:36 christos Exp 	*/
383 #define	RUMP_MOUNT_FFS	"ffs"
384 #define	RUMP_MOUNT_UFS	RUMP_MOUNT_FFS
385 #define	RUMP_MOUNT_NFS	"nfs"
386 #define	RUMP_MOUNT_MFS	"mfs"
387 #define	RUMP_MOUNT_MSDOS	"msdos"
388 #define	RUMP_MOUNT_LFS	"lfs"
389 #define	RUMP_MOUNT_FDESC	"fdesc"
390 #define	RUMP_MOUNT_NULL	"null"
391 #define	RUMP_MOUNT_OVERLAY	"overlay"
392 #define	RUMP_MOUNT_UMAP	"umap"
393 #define	RUMP_MOUNT_KERNFS	"kernfs"
394 #define	RUMP_MOUNT_PROCFS	"procfs"
395 #define	RUMP_MOUNT_AFS	"afs"
396 #define	RUMP_MOUNT_CD9660	"cd9660"
397 #define	RUMP_MOUNT_UNION	"union"
398 #define	RUMP_MOUNT_ADOSFS	"adosfs"
399 #define	RUMP_MOUNT_EXT2FS	"ext2fs"
400 #define	RUMP_MOUNT_CFS	"coda"
401 #define	RUMP_MOUNT_CODA	RUMP_MOUNT_CFS
402 #define	RUMP_MOUNT_FILECORE	"filecore"
403 #define	RUMP_MOUNT_NTFS	"ntfs"
404 #define	RUMP_MOUNT_SMBFS	"smbfs"
405 #define	RUMP_MOUNT_PTYFS	"ptyfs"
406 #define	RUMP_MOUNT_TMPFS	"tmpfs"
407 #define RUMP_MOUNT_UDF	"udf"
408 #define	RUMP_MOUNT_SYSVBFS	"sysvbfs"
409 #define RUMP_MOUNT_PUFFS	"puffs"
410 #define RUMP_MOUNT_HFS	"hfs"
411 #define RUMP_MOUNT_EFS	"efs"
412 #define RUMP_MOUNT_ZFS	"zfs"
413 #define RUMP_MOUNT_NILFS	"nilfs"
414 #define RUMP_MOUNT_RUMPFS	"rumpfs"
415 #define	RUMP_MOUNT_V7FS	"v7fs"
416 
417 /*	NetBSD: fstypes.h,v 1.32 2012/11/26 16:22:21 drochner Exp 	*/
418 #define	RUMP_MNT_RDONLY	0x00000001
419 #define	RUMP_MNT_SYNCHRONOUS	0x00000002
420 #define	RUMP_MNT_NOEXEC	0x00000004
421 #define	RUMP_MNT_NOSUID	0x00000008
422 #define	RUMP_MNT_NODEV	0x00000010
423 #define	RUMP_MNT_UNION	0x00000020
424 #define	RUMP_MNT_ASYNC	0x00000040
425 #define	RUMP_MNT_NOCOREDUMP	0x00008000
426 #define	RUMP_MNT_RELATIME	0x00020000
427 #define	RUMP_MNT_IGNORE	0x00100000
428 #define	RUMP_MNT_DISCARD	0x00800000
429 #define	RUMP_MNT_EXTATTR	0x01000000
430 #define	RUMP_MNT_LOG		0x02000000
431 #define	RUMP_MNT_NOATIME	0x04000000
432 #define	RUMP_MNT_SYMPERM	0x20000000
433 #define	RUMP_MNT_NODEVMTIME	0x40000000
434 #define	RUMP_MNT_SOFTDEP	0x80000000
435 #define	RUMP_MNT_EXRDONLY	0x00000080
436 #define	RUMP_MNT_EXPORTED	0x00000100
437 #define	RUMP_MNT_DEFEXPORTED	0x00000200
438 #define	RUMP_MNT_EXPORTANON	0x00000400
439 #define	RUMP_MNT_EXKERB	0x00000800
440 #define	RUMP_MNT_EXNORESPORT	0x08000000
441 #define	RUMP_MNT_EXPUBLIC	0x10000000
442 #define	RUMP_MNT_LOCAL	0x00001000
443 #define	RUMP_MNT_QUOTA	0x00002000
444 #define	RUMP_MNT_ROOTFS	0x00004000
445 #define	RUMP_MNT_UPDATE	0x00010000
446 #define	RUMP_MNT_RELOAD	0x00040000
447 #define	RUMP_MNT_FORCE	0x00080000
448 #define	RUMP_MNT_GETARGS	0x00400000
449 #define	RUMP_MNT_OP_FLAGS	(RUMP_MNT_UPDATE|RUMP_MNT_RELOAD|RUMP_MNT_FORCE|RUMP_MNT_GETARGS)
450 #define	RUMP_MNT_WAIT	1
451 #define	RUMP_MNT_NOWAIT	2
452 #define	RUMP_MNT_LAZY 	3
453 
454 /*	NetBSD: ioccom.h,v 1.11 2011/10/19 10:53:12 yamt Exp 	*/
455 #define	RUMP_IOCPARM_MASK	0x1fff
456 #define	RUMP_IOCPARM_SHIFT	16
457 #define	RUMP_IOCGROUP_SHIFT	8
458 #define	RUMP_IOCPARM_LEN(x)	(((x) >> RUMP_IOCPARM_SHIFT) & RUMP_IOCPARM_MASK)
459 #define	RUMP_IOCBASECMD(x)	((x) & ~(RUMP_IOCPARM_MASK << RUMP_IOCPARM_SHIFT))
460 #define	RUMP_IOCGROUP(x)	(((x) >> RUMP_IOCGROUP_SHIFT) & 0xff)
461 #define	RUMP_IOCPARM_MAX	NBPG
462 #define	RUMP_IOC_VOID	(unsigned long)0x20000000
463 #define	RUMP_IOC_OUT		(unsigned long)0x40000000
464 #define	RUMP_IOC_IN		(unsigned long)0x80000000
465 #define	RUMP_IOC_INOUT	(RUMP_IOC_IN|RUMP_IOC_OUT)
466 #define	RUMP_IOC_DIRMASK	(unsigned long)0xe0000000
467 #define	_RUMP_IOC(inout, group, num, len) \
468     ((inout) | (((len) & RUMP_IOCPARM_MASK) << RUMP_IOCPARM_SHIFT) | \
469     ((group) << RUMP_IOCGROUP_SHIFT) | (num))
470 #define	_RUMP_IO(g,n)	_RUMP_IOC(RUMP_IOC_VOID,	(g), (n), 0)
471 #define	_RUMP_IOR(g,n,t)	_RUMP_IOC(RUMP_IOC_OUT,	(g), (n), sizeof(t))
472 #define	_RUMP_IOW(g,n,t)	_RUMP_IOC(RUMP_IOC_IN,	(g), (n), sizeof(t))
473 #define	_RUMP_IOWR(g,n,t)	_RUMP_IOC(RUMP_IOC_INOUT,	(g), (n), sizeof(t))
474 
475 /*	NetBSD: ktrace.h,v 1.61 2013/12/09 17:43:58 pooka Exp 	*/
476 #define RUMP_KTROP_SET		0
477 #define RUMP_KTROP_CLEAR		1
478 #define RUMP_KTROP_CLEARFILE		2
479 #define	RUMP_KTROP_MASK		0x3
480 #define	RUMP_KTR_SHIMLEN	offsetof(struct ktr_header, ktr_pid)
481 #define RUMP_KTR_SYSCALL	1
482 #define RUMP_KTR_SYSRET	2
483 #define RUMP_KTR_NAMEI	3
484 #define RUMP_KTR_GENIO	4
485 #define	RUMP_KTR_PSIG	5
486 #define RUMP_KTR_CSW		6
487 #define RUMP_KTR_EMUL	7
488 #define	RUMP_KTR_USER	8
489 #define RUMP_KTR_USER_MAXIDLEN	20
490 #define RUMP_KTR_USER_MAXLEN		2048
491 #define RUMP_KTR_EXEC_ARG		10
492 #define RUMP_KTR_EXEC_ENV		11
493 #define	RUMP_KTR_SAUPCALL	13
494 #define RUMP_KTR_MIB		14
495 #define RUMP_KTR_EXEC_FD		15
496 #define RUMP_KTRFAC_MASK	0x00ffffff
497 #define RUMP_KTRFAC_SYSCALL	(1<<RUMP_KTR_SYSCALL)
498 #define RUMP_KTRFAC_SYSRET	(1<<RUMP_KTR_SYSRET)
499 #define RUMP_KTRFAC_NAMEI	(1<<RUMP_KTR_NAMEI)
500 #define RUMP_KTRFAC_GENIO	(1<<RUMP_KTR_GENIO)
501 #define	RUMP_KTRFAC_PSIG	(1<<RUMP_KTR_PSIG)
502 #define RUMP_KTRFAC_CSW	(1<<RUMP_KTR_CSW)
503 #define RUMP_KTRFAC_EMUL	(1<<RUMP_KTR_EMUL)
504 #define	RUMP_KTRFAC_USER	(1<<RUMP_KTR_USER)
505 #define RUMP_KTRFAC_EXEC_ARG	(1<<RUMP_KTR_EXEC_ARG)
506 #define RUMP_KTRFAC_EXEC_ENV	(1<<RUMP_KTR_EXEC_ENV)
507 #define	RUMP_KTRFAC_MIB	(1<<RUMP_KTR_MIB)
508 #define	RUMP_KTRFAC_EXEC_FD	(1<<RUMP_KTR_EXEC_FD)
509 #define RUMP_KTRFAC_PERSISTENT	0x80000000
510 #define RUMP_KTRFAC_INHERIT	0x40000000
511 #define RUMP_KTRFAC_TRC_EMUL	0x10000000
512 #define	RUMP_KTRFAC_VER_MASK	0x0f000000
513 #define	RUMP_KTRFAC_VER_SHIFT	24
514 #define	RUMP_KTRFAC_VERSION(tf)	(((tf) & RUMP_KTRFAC_VER_MASK) >> RUMP_KTRFAC_VER_SHIFT)
515 #define	RUMP_KTRFACv0	(0 << RUMP_KTRFAC_VER_SHIFT)
516 #define	RUMP_KTRFACv1	(1 << RUMP_KTRFAC_VER_SHIFT)
517 #define	RUMP_KTRFACv2	(2 << RUMP_KTRFAC_VER_SHIFT)
518 
519 /*	NetBSD: module.h,v 1.34 2013/10/23 18:57:40 mbalmer Exp 	*/
520 struct rump_modctl_load {
521 	const char *ml_filename;
522 
523 	int ml_flags;
524 
525 	const char *ml_props;
526 	size_t ml_propslen;
527 };
528 enum rump_modctl {
529 	RUMP_MODCTL_LOAD,		/* modctl_load_t *ml */
530 	RUMP_MODCTL_UNLOAD,		/* char *name */
531 	RUMP_MODCTL_STAT,		/* struct iovec *buffer */
532 	RUMP_MODCTL_EXISTS		/* enum: 0: load, 1: autoload */
533 };
534 
535 /*	NetBSD: ufsmount.h,v 1.41 2013/08/11 04:36:17 dholland Exp 	*/
536 struct rump_ufs_args {
537 	char	*fspec;			/* block special device to mount */
538 };
539 
540 /*	NetBSD: sysvbfs_args.h,v 1.1 2008/09/04 12:07:30 pooka Exp 	*/
541 struct rump_sysvbfs_args {
542 	char	*fspec;		/* blocks special holding the fs to mount */
543 };
544 
545 /*	NetBSD: dirent.h,v 1.28 2011/09/27 01:40:32 christos Exp 	*/
546 struct rump_dirent {
547 	uint64_t d_fileno;			/* file number of entry */
548 	uint16_t d_reclen;		/* length of this record */
549 	uint16_t d_namlen;		/* length of string in d_name */
550 	uint8_t  d_type; 		/* file type, see below */
551 	char	d_name[511 + 1];	/* name must be no longer than this */
552 };
553 
554 #endif /* _RUMP_RUMPDEFS_H_ */
555