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 32a5f14abfSJohn Baldwin enum sysdecode_abi { 335842bd68SJohn Baldwin SYSDECODE_ABI_UNKNOWN = 0, 345842bd68SJohn Baldwin SYSDECODE_ABI_FREEBSD, 355842bd68SJohn Baldwin SYSDECODE_ABI_FREEBSD32, 365842bd68SJohn Baldwin SYSDECODE_ABI_LINUX, 375842bd68SJohn Baldwin SYSDECODE_ABI_LINUX32, 385842bd68SJohn Baldwin SYSDECODE_ABI_CLOUDABI64 39a5f14abfSJohn Baldwin }; 40a5f14abfSJohn Baldwin 41*287b96ddSJohn Baldwin int sysdecode_abi_to_freebsd_errno(enum sysdecode_abi _abi, int _error); 42*287b96ddSJohn Baldwin int sysdecode_freebsd_to_abi_errno(enum sysdecode_abi _abi, int _error); 43265e5898SJohn Baldwin const char *sysdecode_ioctlname(unsigned long _val); 44a5f14abfSJohn Baldwin const char *sysdecode_syscallname(enum sysdecode_abi _abi, unsigned int _code); 45d6fb4894SJohn Baldwin int sysdecode_utrace(FILE *_fp, void *_buf, size_t _len); 46d6fb4894SJohn Baldwin 47d6fb4894SJohn Baldwin #endif /* !__SYSDECODE_H__ */ 48