1*f3e7f55eSRobert Mustacchi /* 2*f3e7f55eSRobert Mustacchi * This file and its contents are supplied under the terms of the 3*f3e7f55eSRobert Mustacchi * Common Development and Distribution License ("CDDL"), version 1.0. 4*f3e7f55eSRobert Mustacchi * You may only use this file in accordance with the terms of version 5*f3e7f55eSRobert Mustacchi * 1.0 of the CDDL. 6*f3e7f55eSRobert Mustacchi * 7*f3e7f55eSRobert Mustacchi * A full copy of the text of the CDDL should have accompanied this 8*f3e7f55eSRobert Mustacchi * source. A copy of the CDDL is also available via the Internet at 9*f3e7f55eSRobert Mustacchi * http://www.illumos.org/license/CDDL. 10*f3e7f55eSRobert Mustacchi */ 11*f3e7f55eSRobert Mustacchi 12*f3e7f55eSRobert Mustacchi /* 13*f3e7f55eSRobert Mustacchi * Copyright 2015 Joyent, Inc. 14*f3e7f55eSRobert Mustacchi */ 15*f3e7f55eSRobert Mustacchi 16*f3e7f55eSRobert Mustacchi #ifndef _LIBCTF_IMPL_H 17*f3e7f55eSRobert Mustacchi #define _LIBCTF_IMPL_H 18*f3e7f55eSRobert Mustacchi 19*f3e7f55eSRobert Mustacchi /* 20*f3e7f55eSRobert Mustacchi * Portions of libctf implementations that are only suitable for CTF's userland 21*f3e7f55eSRobert Mustacchi * library, eg. converting and merging related routines. 22*f3e7f55eSRobert Mustacchi */ 23*f3e7f55eSRobert Mustacchi 24*f3e7f55eSRobert Mustacchi #include <libelf.h> 25*f3e7f55eSRobert Mustacchi #include <libctf.h> 26*f3e7f55eSRobert Mustacchi #include <ctf_impl.h> 27*f3e7f55eSRobert Mustacchi 28*f3e7f55eSRobert Mustacchi #ifdef __cplusplus 29*f3e7f55eSRobert Mustacchi extern "C" { 30*f3e7f55eSRobert Mustacchi #endif 31*f3e7f55eSRobert Mustacchi 32*f3e7f55eSRobert Mustacchi typedef enum ctf_conv_status { 33*f3e7f55eSRobert Mustacchi CTF_CONV_SUCCESS = 0, 34*f3e7f55eSRobert Mustacchi CTF_CONV_ERROR = 1, 35*f3e7f55eSRobert Mustacchi CTF_CONV_NOTSUP = 2 36*f3e7f55eSRobert Mustacchi } ctf_conv_status_t; 37*f3e7f55eSRobert Mustacchi 38*f3e7f55eSRobert Mustacchi typedef ctf_conv_status_t (*ctf_convert_f)(int, Elf *, uint_t, int *, 39*f3e7f55eSRobert Mustacchi ctf_file_t **, char *, size_t); 40*f3e7f55eSRobert Mustacchi extern ctf_conv_status_t ctf_dwarf_convert(int, Elf *, uint_t, int *, 41*f3e7f55eSRobert Mustacchi ctf_file_t **, char *, size_t); 42*f3e7f55eSRobert Mustacchi 43*f3e7f55eSRobert Mustacchi /* 44*f3e7f55eSRobert Mustacchi * zlib compression routines 45*f3e7f55eSRobert Mustacchi */ 46*f3e7f55eSRobert Mustacchi extern int ctf_compress(ctf_file_t *fp, void **, size_t *, size_t *); 47*f3e7f55eSRobert Mustacchi 48*f3e7f55eSRobert Mustacchi extern int ctf_diff_self(ctf_diff_t *, ctf_diff_type_f, void *); 49*f3e7f55eSRobert Mustacchi 50*f3e7f55eSRobert Mustacchi /* 51*f3e7f55eSRobert Mustacchi * Internal debugging aids 52*f3e7f55eSRobert Mustacchi */ 53*f3e7f55eSRobert Mustacchi extern void ctf_phase_dump(ctf_file_t *, const char *); 54*f3e7f55eSRobert Mustacchi 55*f3e7f55eSRobert Mustacchi #ifdef __cplusplus 56*f3e7f55eSRobert Mustacchi } 57*f3e7f55eSRobert Mustacchi #endif 58*f3e7f55eSRobert Mustacchi 59*f3e7f55eSRobert Mustacchi #endif /* _LIBCTF_IMPL_H */ 60