24 * All Rights Reserved
25 *
26 * Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
27 * Copyright 2012 DEY Storage Systems, Inc. All rights reserved.
28 */
29
30 #ifndef _CONV_H
31 #define _CONV_H
32
33 /*
34 * Global include file for conversion library.
35 */
36
37 #include <stdlib.h>
38 #include <libelf.h>
39 #include <dlfcn.h>
40 #include <libld.h>
41 #include <sgs.h>
42 #include <sgsmsg.h>
43
44 #ifdef __cplusplus
45 extern "C" {
46 #endif
47
48 /*
49 * Configuration features available - maintained here (instead of debug.h)
50 * to save libconv from having to include debug.h which results in numerous
51 * "declared but not used or defined" lint errors.
52 */
53 #define CONF_EDLIBPATH 0x000100 /* ELF default library path */
54 #define CONF_ESLIBPATH 0x000200 /* ELF secure library path */
55 #define CONF_ADLIBPATH 0x000400 /* AOUT default library path */
56 #define CONF_ASLIBPATH 0x000800 /* AOUT secure library path */
57 #define CONF_DIRCFG 0x001000 /* directory configuration available */
58 #define CONF_OBJALT 0x002000 /* object alternatives available */
59 #define CONF_MEMRESV 0x004000 /* memory reservation required */
60 #define CONF_ENVS 0x008000 /* environment variables available */
61 #define CONF_FLTR 0x010000 /* filter information available */
62 #define CONF_FEATMSK 0xffff00
63
308 #define CONV_CNOTE_PR_FLAGS_BUFSIZE 254
309 typedef union {
310 Conv_inv_buf_t inv_buf;
311 char buf[CONV_CNOTE_PR_FLAGS_BUFSIZE];
312 } Conv_cnote_pr_flags_buf_t;
313
314 /* conv_cnote_old_pr_flags() */
315 #define CONV_CNOTE_OLD_PR_FLAGS_BUFSIZE 174
316 typedef union {
317 Conv_inv_buf_t inv_buf;
318 char buf[CONV_CNOTE_OLD_PR_FLAGS_BUFSIZE];
319 } Conv_cnote_old_pr_flags_buf_t;
320
321 /* conv_cnote_proc_flag() */
322 #define CONV_CNOTE_PROC_FLAG_BUFSIZE 39
323 typedef union {
324 Conv_inv_buf_t inv_buf;
325 char buf[CONV_CNOTE_PROC_FLAG_BUFSIZE];
326 } Conv_cnote_proc_flag_buf_t;
327
328
329 /* conv_cnote_sigset() */
330 #define CONV_CNOTE_SIGSET_BUFSIZE 639
331 typedef union {
332 Conv_inv_buf_t inv_buf;
333 char buf[CONV_CNOTE_SIGSET_BUFSIZE];
334 } Conv_cnote_sigset_buf_t;
335
336 /* conv_cnote_fltset() */
337 #define CONV_CNOTE_FLTSET_BUFSIZE 511
338 typedef union {
339 Conv_inv_buf_t inv_buf;
340 char buf[CONV_CNOTE_FLTSET_BUFSIZE];
341 } Conv_cnote_fltset_buf_t;
342
343 /* conv_cnote_sysset() */
344 #define CONV_CNOTE_SYSSET_BUFSIZE 3195
345 typedef union {
346 Conv_inv_buf_t inv_buf;
347 char buf[CONV_CNOTE_SYSSET_BUFSIZE];
805 extern const char *conv_cnote_fltset(uint32_t *, int,
806 Conv_fmt_flags_t, Conv_cnote_fltset_buf_t *);
807 extern const char *conv_cnote_old_pr_flags(int, Conv_fmt_flags_t,
808 Conv_cnote_old_pr_flags_buf_t *);
809 extern const char *conv_cnote_pr_dmodel(Word, Conv_fmt_flags_t,
810 Conv_inv_buf_t *);
811 extern const char *conv_cnote_pr_flags(int, Conv_fmt_flags_t,
812 Conv_cnote_pr_flags_buf_t *);
813 extern const char *conv_cnote_proc_flag(int, Conv_fmt_flags_t,
814 Conv_cnote_proc_flag_buf_t *);
815 extern const char *conv_cnote_pr_regname(Half, int, Conv_fmt_flags_t,
816 Conv_inv_buf_t *inv_buf);
817 extern const char *conv_cnote_pr_stype(Word, Conv_fmt_flags_t,
818 Conv_inv_buf_t *);
819 extern const char *conv_cnote_pr_what(short, short, Conv_fmt_flags_t,
820 Conv_inv_buf_t *);
821 extern const char *conv_cnote_pr_why(short, Conv_fmt_flags_t,
822 Conv_inv_buf_t *);
823 extern const char *conv_cnote_priv(int, Conv_fmt_flags_t,
824 Conv_inv_buf_t *);
825 extern const char *conv_cnote_psetid(int, Conv_fmt_flags_t,
826 Conv_inv_buf_t *);
827 extern const char *conv_cnote_sa_flags(int, Conv_fmt_flags_t,
828 Conv_cnote_sa_flags_buf_t *);
829 extern const char *conv_cnote_signal(Word, Conv_fmt_flags_t,
830 Conv_inv_buf_t *);
831 extern const char *conv_cnote_si_code(Half, int, int, Conv_fmt_flags_t,
832 Conv_inv_buf_t *);
833 extern const char *conv_cnote_sigset(uint32_t *, int,
834 Conv_fmt_flags_t, Conv_cnote_sigset_buf_t *);
835 extern const char *conv_cnote_ss_flags(int, Conv_fmt_flags_t,
836 Conv_cnote_ss_flags_buf_t *);
837 extern const char *conv_cnote_syscall(Word, Conv_fmt_flags_t,
838 Conv_inv_buf_t *);
839 extern const char *conv_cnote_sysset(uint32_t *, int,
840 Conv_fmt_flags_t, Conv_cnote_sysset_buf_t *);
841 extern const char *conv_cnote_fileflags(uint32_t, Conv_fmt_flags_t,
842 char *, size_t);
843 extern const char *conv_cnote_filemode(uint32_t, Conv_fmt_flags_t,
844 char *, size_t);
|
24 * All Rights Reserved
25 *
26 * Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
27 * Copyright 2012 DEY Storage Systems, Inc. All rights reserved.
28 */
29
30 #ifndef _CONV_H
31 #define _CONV_H
32
33 /*
34 * Global include file for conversion library.
35 */
36
37 #include <stdlib.h>
38 #include <libelf.h>
39 #include <dlfcn.h>
40 #include <libld.h>
41 #include <sgs.h>
42 #include <sgsmsg.h>
43
44 #include <sys/secflags.h>
45
46 #ifdef __cplusplus
47 extern "C" {
48 #endif
49
50 /*
51 * Configuration features available - maintained here (instead of debug.h)
52 * to save libconv from having to include debug.h which results in numerous
53 * "declared but not used or defined" lint errors.
54 */
55 #define CONF_EDLIBPATH 0x000100 /* ELF default library path */
56 #define CONF_ESLIBPATH 0x000200 /* ELF secure library path */
57 #define CONF_ADLIBPATH 0x000400 /* AOUT default library path */
58 #define CONF_ASLIBPATH 0x000800 /* AOUT secure library path */
59 #define CONF_DIRCFG 0x001000 /* directory configuration available */
60 #define CONF_OBJALT 0x002000 /* object alternatives available */
61 #define CONF_MEMRESV 0x004000 /* memory reservation required */
62 #define CONF_ENVS 0x008000 /* environment variables available */
63 #define CONF_FLTR 0x010000 /* filter information available */
64 #define CONF_FEATMSK 0xffff00
65
310 #define CONV_CNOTE_PR_FLAGS_BUFSIZE 254
311 typedef union {
312 Conv_inv_buf_t inv_buf;
313 char buf[CONV_CNOTE_PR_FLAGS_BUFSIZE];
314 } Conv_cnote_pr_flags_buf_t;
315
316 /* conv_cnote_old_pr_flags() */
317 #define CONV_CNOTE_OLD_PR_FLAGS_BUFSIZE 174
318 typedef union {
319 Conv_inv_buf_t inv_buf;
320 char buf[CONV_CNOTE_OLD_PR_FLAGS_BUFSIZE];
321 } Conv_cnote_old_pr_flags_buf_t;
322
323 /* conv_cnote_proc_flag() */
324 #define CONV_CNOTE_PROC_FLAG_BUFSIZE 39
325 typedef union {
326 Conv_inv_buf_t inv_buf;
327 char buf[CONV_CNOTE_PROC_FLAG_BUFSIZE];
328 } Conv_cnote_proc_flag_buf_t;
329
330 /* conv_prsecflags() */
331 #define CONV_PRSECFLAGS_BUFSIZE 57
332 typedef union {
333 Conv_inv_buf_t inv_buf;
334 char buf[CONV_PRSECFLAGS_BUFSIZE];
335 } Conv_secflags_buf_t;
336
337 /* conv_cnote_sigset() */
338 #define CONV_CNOTE_SIGSET_BUFSIZE 639
339 typedef union {
340 Conv_inv_buf_t inv_buf;
341 char buf[CONV_CNOTE_SIGSET_BUFSIZE];
342 } Conv_cnote_sigset_buf_t;
343
344 /* conv_cnote_fltset() */
345 #define CONV_CNOTE_FLTSET_BUFSIZE 511
346 typedef union {
347 Conv_inv_buf_t inv_buf;
348 char buf[CONV_CNOTE_FLTSET_BUFSIZE];
349 } Conv_cnote_fltset_buf_t;
350
351 /* conv_cnote_sysset() */
352 #define CONV_CNOTE_SYSSET_BUFSIZE 3195
353 typedef union {
354 Conv_inv_buf_t inv_buf;
355 char buf[CONV_CNOTE_SYSSET_BUFSIZE];
813 extern const char *conv_cnote_fltset(uint32_t *, int,
814 Conv_fmt_flags_t, Conv_cnote_fltset_buf_t *);
815 extern const char *conv_cnote_old_pr_flags(int, Conv_fmt_flags_t,
816 Conv_cnote_old_pr_flags_buf_t *);
817 extern const char *conv_cnote_pr_dmodel(Word, Conv_fmt_flags_t,
818 Conv_inv_buf_t *);
819 extern const char *conv_cnote_pr_flags(int, Conv_fmt_flags_t,
820 Conv_cnote_pr_flags_buf_t *);
821 extern const char *conv_cnote_proc_flag(int, Conv_fmt_flags_t,
822 Conv_cnote_proc_flag_buf_t *);
823 extern const char *conv_cnote_pr_regname(Half, int, Conv_fmt_flags_t,
824 Conv_inv_buf_t *inv_buf);
825 extern const char *conv_cnote_pr_stype(Word, Conv_fmt_flags_t,
826 Conv_inv_buf_t *);
827 extern const char *conv_cnote_pr_what(short, short, Conv_fmt_flags_t,
828 Conv_inv_buf_t *);
829 extern const char *conv_cnote_pr_why(short, Conv_fmt_flags_t,
830 Conv_inv_buf_t *);
831 extern const char *conv_cnote_priv(int, Conv_fmt_flags_t,
832 Conv_inv_buf_t *);
833 extern const char *conv_prsecflags(secflagset_t, Conv_fmt_flags_t,
834 Conv_secflags_buf_t *);
835 extern const char *conv_cnote_psetid(int, Conv_fmt_flags_t,
836 Conv_inv_buf_t *);
837 extern const char *conv_cnote_sa_flags(int, Conv_fmt_flags_t,
838 Conv_cnote_sa_flags_buf_t *);
839 extern const char *conv_cnote_signal(Word, Conv_fmt_flags_t,
840 Conv_inv_buf_t *);
841 extern const char *conv_cnote_si_code(Half, int, int, Conv_fmt_flags_t,
842 Conv_inv_buf_t *);
843 extern const char *conv_cnote_sigset(uint32_t *, int,
844 Conv_fmt_flags_t, Conv_cnote_sigset_buf_t *);
845 extern const char *conv_cnote_ss_flags(int, Conv_fmt_flags_t,
846 Conv_cnote_ss_flags_buf_t *);
847 extern const char *conv_cnote_syscall(Word, Conv_fmt_flags_t,
848 Conv_inv_buf_t *);
849 extern const char *conv_cnote_sysset(uint32_t *, int,
850 Conv_fmt_flags_t, Conv_cnote_sysset_buf_t *);
851 extern const char *conv_cnote_fileflags(uint32_t, Conv_fmt_flags_t,
852 char *, size_t);
853 extern const char *conv_cnote_filemode(uint32_t, Conv_fmt_flags_t,
854 char *, size_t);
|