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