xref: /freebsd/lib/libsysdecode/sysdecode.h (revision a5f14abfd231777ed4f1ab2e7d4aeeb4418156f2)
1d6fb4894SJohn Baldwin /*-
2d6fb4894SJohn Baldwin  * Copyright (c) 2015 John H. Baldwin <jhb@FreeBSD.org>
3d6fb4894SJohn Baldwin  * All rights reserved.
4d6fb4894SJohn Baldwin  *
5d6fb4894SJohn Baldwin  * Redistribution and use in source and binary forms, with or without
6d6fb4894SJohn Baldwin  * modification, are permitted provided that the following conditions
7d6fb4894SJohn Baldwin  * are met:
8d6fb4894SJohn Baldwin  * 1. Redistributions of source code must retain the above copyright
9d6fb4894SJohn Baldwin  *    notice, this list of conditions and the following disclaimer.
10d6fb4894SJohn Baldwin  * 2. Redistributions in binary form must reproduce the above copyright
11d6fb4894SJohn Baldwin  *    notice, this list of conditions and the following disclaimer in the
12d6fb4894SJohn Baldwin  *    documentation and/or other materials provided with the distribution.
13d6fb4894SJohn Baldwin  *
14d6fb4894SJohn Baldwin  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15d6fb4894SJohn Baldwin  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16d6fb4894SJohn Baldwin  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17d6fb4894SJohn Baldwin  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18d6fb4894SJohn Baldwin  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19d6fb4894SJohn Baldwin  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20d6fb4894SJohn Baldwin  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21d6fb4894SJohn Baldwin  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22d6fb4894SJohn Baldwin  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23d6fb4894SJohn Baldwin  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24d6fb4894SJohn Baldwin  * SUCH DAMAGE.
25d6fb4894SJohn Baldwin  *
26d6fb4894SJohn Baldwin  * $FreeBSD$
27d6fb4894SJohn Baldwin  */
28d6fb4894SJohn Baldwin 
29d6fb4894SJohn Baldwin #ifndef __SYSDECODE_H__
30d6fb4894SJohn Baldwin #define	__SYSDECODE_H__
31d6fb4894SJohn Baldwin 
32*a5f14abfSJohn Baldwin enum sysdecode_abi {
33*a5f14abfSJohn Baldwin 	UNKNOWN_ABI = 0,
34*a5f14abfSJohn Baldwin 	FREEBSD,
35*a5f14abfSJohn Baldwin 	FREEBSD32,
36*a5f14abfSJohn Baldwin 	LINUX,
37*a5f14abfSJohn Baldwin 	LINUX32,
38*a5f14abfSJohn Baldwin 	CLOUDABI64
39*a5f14abfSJohn Baldwin };
40*a5f14abfSJohn Baldwin 
41265e5898SJohn Baldwin const char *sysdecode_ioctlname(unsigned long _val);
42*a5f14abfSJohn Baldwin const char *sysdecode_syscallname(enum sysdecode_abi _abi, unsigned int _code);
43d6fb4894SJohn Baldwin int	sysdecode_utrace(FILE *_fp, void *_buf, size_t _len);
44d6fb4894SJohn Baldwin 
45d6fb4894SJohn Baldwin #endif /* !__SYSDECODE_H__ */
46