17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * CDDL HEADER START 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 580ab886dSwesolows * Common Development and Distribution License (the "License"). 680ab886dSwesolows * You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate * 87c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate * and limitations under the License. 127c478bd9Sstevel@tonic-gate * 137c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate * 197c478bd9Sstevel@tonic-gate * CDDL HEADER END 207c478bd9Sstevel@tonic-gate */ 21d9638e54Smws 227c478bd9Sstevel@tonic-gate /* 23*f6e214c7SGavin Maltby * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. 247c478bd9Sstevel@tonic-gate */ 257c478bd9Sstevel@tonic-gate 267c478bd9Sstevel@tonic-gate #ifndef _FMD_API_H 277c478bd9Sstevel@tonic-gate #define _FMD_API_H 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gate #include <sys/types.h> 307c478bd9Sstevel@tonic-gate #include <libnvpair.h> 317c478bd9Sstevel@tonic-gate #include <stdarg.h> 32*f6e214c7SGavin Maltby #include <door.h> 337c478bd9Sstevel@tonic-gate 347c478bd9Sstevel@tonic-gate #ifdef __cplusplus 357c478bd9Sstevel@tonic-gate extern "C" { 367c478bd9Sstevel@tonic-gate #endif 377c478bd9Sstevel@tonic-gate 387c478bd9Sstevel@tonic-gate /* 397c478bd9Sstevel@tonic-gate * Fault Management Daemon Client Interfaces 407c478bd9Sstevel@tonic-gate * 417c478bd9Sstevel@tonic-gate * Note: The contents of this file are private to the implementation of the 427c478bd9Sstevel@tonic-gate * Solaris system and FMD subsystem and are subject to change at any time 437c478bd9Sstevel@tonic-gate * without notice. Applications and drivers using these interfaces will fail 447c478bd9Sstevel@tonic-gate * to run on future releases. These interfaces should not be used for any 457c478bd9Sstevel@tonic-gate * purpose until they are publicly documented for use outside of Sun. 467c478bd9Sstevel@tonic-gate */ 477c478bd9Sstevel@tonic-gate 487c478bd9Sstevel@tonic-gate #define FMD_API_VERSION_1 1 497c478bd9Sstevel@tonic-gate #define FMD_API_VERSION_2 2 50d9638e54Smws #define FMD_API_VERSION_3 3 5124db4641Seschrock #define FMD_API_VERSION_4 4 52*f6e214c7SGavin Maltby #define FMD_API_VERSION_5 5 537c478bd9Sstevel@tonic-gate 54*f6e214c7SGavin Maltby #define FMD_API_VERSION FMD_API_VERSION_5 557c478bd9Sstevel@tonic-gate 567c478bd9Sstevel@tonic-gate typedef struct fmd_hdl fmd_hdl_t; 577c478bd9Sstevel@tonic-gate typedef struct fmd_event fmd_event_t; 587c478bd9Sstevel@tonic-gate typedef struct fmd_case fmd_case_t; 59d9638e54Smws typedef struct fmd_xprt fmd_xprt_t; 607c478bd9Sstevel@tonic-gate 617aec1d6eScindi struct topo_hdl; 627aec1d6eScindi 637c478bd9Sstevel@tonic-gate #define FMD_B_FALSE 0 /* false value for booleans as int */ 647c478bd9Sstevel@tonic-gate #define FMD_B_TRUE 1 /* true value for booleans as int */ 657c478bd9Sstevel@tonic-gate 667c478bd9Sstevel@tonic-gate #ifndef MIN 677c478bd9Sstevel@tonic-gate #define MIN(x, y) ((x) < (y) ? (x) : (y)) 687c478bd9Sstevel@tonic-gate #endif 697c478bd9Sstevel@tonic-gate 707c478bd9Sstevel@tonic-gate #ifndef MAX 717c478bd9Sstevel@tonic-gate #define MAX(x, y) ((x) > (y) ? (x) : (y)) 727c478bd9Sstevel@tonic-gate #endif 737c478bd9Sstevel@tonic-gate 747c478bd9Sstevel@tonic-gate #define FMD_TYPE_BOOL 0 /* int */ 757c478bd9Sstevel@tonic-gate #define FMD_TYPE_INT32 1 /* int32_t */ 767c478bd9Sstevel@tonic-gate #define FMD_TYPE_UINT32 2 /* uint32_t */ 777c478bd9Sstevel@tonic-gate #define FMD_TYPE_INT64 3 /* int64_t */ 787c478bd9Sstevel@tonic-gate #define FMD_TYPE_UINT64 4 /* uint64_t */ 797c478bd9Sstevel@tonic-gate #define FMD_TYPE_STRING 5 /* const char* */ 807c478bd9Sstevel@tonic-gate #define FMD_TYPE_TIME 6 /* uint64_t */ 817c478bd9Sstevel@tonic-gate #define FMD_TYPE_SIZE 7 /* uint64_t */ 827c478bd9Sstevel@tonic-gate 837c478bd9Sstevel@tonic-gate typedef struct fmd_prop { 847c478bd9Sstevel@tonic-gate const char *fmdp_name; /* property name */ 857c478bd9Sstevel@tonic-gate uint_t fmdp_type; /* property type (see above) */ 867c478bd9Sstevel@tonic-gate const char *fmdp_defv; /* default value */ 877c478bd9Sstevel@tonic-gate } fmd_prop_t; 887c478bd9Sstevel@tonic-gate 897c478bd9Sstevel@tonic-gate typedef struct fmd_stat { 907c478bd9Sstevel@tonic-gate char fmds_name[32]; /* statistic name */ 917c478bd9Sstevel@tonic-gate uint_t fmds_type; /* statistic type (see above) */ 927c478bd9Sstevel@tonic-gate char fmds_desc[64]; /* statistic description */ 937c478bd9Sstevel@tonic-gate union { 947c478bd9Sstevel@tonic-gate int bool; /* FMD_TYPE_BOOL */ 957c478bd9Sstevel@tonic-gate int32_t i32; /* FMD_TYPE_INT32 */ 967c478bd9Sstevel@tonic-gate uint32_t ui32; /* FMD_TYPE_UINT32 */ 977c478bd9Sstevel@tonic-gate int64_t i64; /* FMD_TYPE_INT64 */ 987c478bd9Sstevel@tonic-gate uint64_t ui64; /* FMD_TYPE_UINT64, TIME, SIZE */ 997c478bd9Sstevel@tonic-gate char *str; /* FMD_TYPE_STRING */ 1007c478bd9Sstevel@tonic-gate } fmds_value; 1017c478bd9Sstevel@tonic-gate } fmd_stat_t; 1027c478bd9Sstevel@tonic-gate 1037c478bd9Sstevel@tonic-gate typedef struct fmd_hdl_ops { 1047c478bd9Sstevel@tonic-gate void (*fmdo_recv)(fmd_hdl_t *, fmd_event_t *, nvlist_t *, const char *); 1057c478bd9Sstevel@tonic-gate void (*fmdo_timeout)(fmd_hdl_t *, id_t, void *); 1067c478bd9Sstevel@tonic-gate void (*fmdo_close)(fmd_hdl_t *, fmd_case_t *); 1077c478bd9Sstevel@tonic-gate void (*fmdo_stats)(fmd_hdl_t *); 1087c478bd9Sstevel@tonic-gate void (*fmdo_gc)(fmd_hdl_t *); 109d9638e54Smws int (*fmdo_send)(fmd_hdl_t *, fmd_xprt_t *, fmd_event_t *, nvlist_t *); 11024db4641Seschrock void (*fmdo_topo)(fmd_hdl_t *, struct topo_hdl *); 1117c478bd9Sstevel@tonic-gate } fmd_hdl_ops_t; 1127c478bd9Sstevel@tonic-gate 113d9638e54Smws #define FMD_SEND_SUCCESS 0 /* fmdo_send queued event */ 114d9638e54Smws #define FMD_SEND_FAILED 1 /* fmdo_send unrecoverable error */ 115d9638e54Smws #define FMD_SEND_RETRY 2 /* fmdo_send requests retry */ 116d9638e54Smws 1177c478bd9Sstevel@tonic-gate typedef struct fmd_hdl_info { 1187c478bd9Sstevel@tonic-gate const char *fmdi_desc; /* fmd client description string */ 1197c478bd9Sstevel@tonic-gate const char *fmdi_vers; /* fmd client version string */ 1207c478bd9Sstevel@tonic-gate const fmd_hdl_ops_t *fmdi_ops; /* ops vector for client */ 1217c478bd9Sstevel@tonic-gate const fmd_prop_t *fmdi_props; /* array of configuration props */ 1227c478bd9Sstevel@tonic-gate } fmd_hdl_info_t; 1237c478bd9Sstevel@tonic-gate 1247c478bd9Sstevel@tonic-gate extern void _fmd_init(fmd_hdl_t *); 1257c478bd9Sstevel@tonic-gate extern void _fmd_fini(fmd_hdl_t *); 1267c478bd9Sstevel@tonic-gate 1277c478bd9Sstevel@tonic-gate extern int fmd_hdl_register(fmd_hdl_t *, int, const fmd_hdl_info_t *); 1287c478bd9Sstevel@tonic-gate extern void fmd_hdl_unregister(fmd_hdl_t *); 1297c478bd9Sstevel@tonic-gate 1307c478bd9Sstevel@tonic-gate extern void fmd_hdl_subscribe(fmd_hdl_t *, const char *); 1317c478bd9Sstevel@tonic-gate extern void fmd_hdl_unsubscribe(fmd_hdl_t *, const char *); 1327c478bd9Sstevel@tonic-gate 1337c478bd9Sstevel@tonic-gate extern void fmd_hdl_setspecific(fmd_hdl_t *, void *); 1347c478bd9Sstevel@tonic-gate extern void *fmd_hdl_getspecific(fmd_hdl_t *); 1357c478bd9Sstevel@tonic-gate 1367c478bd9Sstevel@tonic-gate extern void fmd_hdl_opendict(fmd_hdl_t *, const char *); 13724db4641Seschrock extern struct topo_hdl *fmd_hdl_topo_hold(fmd_hdl_t *, int); 13824db4641Seschrock extern void fmd_hdl_topo_rele(fmd_hdl_t *, struct topo_hdl *); 1397c478bd9Sstevel@tonic-gate 1407c478bd9Sstevel@tonic-gate #define FMD_NOSLEEP 0x0 /* do not sleep or retry on failure */ 1417c478bd9Sstevel@tonic-gate #define FMD_SLEEP 0x1 /* sleep or retry if alloc fails */ 1427c478bd9Sstevel@tonic-gate 1437c478bd9Sstevel@tonic-gate extern void *fmd_hdl_alloc(fmd_hdl_t *, size_t, int); 1447c478bd9Sstevel@tonic-gate extern void *fmd_hdl_zalloc(fmd_hdl_t *, size_t, int); 1457c478bd9Sstevel@tonic-gate extern void fmd_hdl_free(fmd_hdl_t *, void *, size_t); 1467c478bd9Sstevel@tonic-gate 1477c478bd9Sstevel@tonic-gate extern char *fmd_hdl_strdup(fmd_hdl_t *, const char *, int); 1487c478bd9Sstevel@tonic-gate extern void fmd_hdl_strfree(fmd_hdl_t *, char *); 1497c478bd9Sstevel@tonic-gate 15080ab886dSwesolows extern void fmd_hdl_vabort(fmd_hdl_t *, const char *, va_list) __NORETURN; 15180ab886dSwesolows extern void fmd_hdl_abort(fmd_hdl_t *, const char *, ...) __NORETURN; 1527c478bd9Sstevel@tonic-gate 1537c478bd9Sstevel@tonic-gate extern void fmd_hdl_verror(fmd_hdl_t *, const char *, va_list); 1547c478bd9Sstevel@tonic-gate extern void fmd_hdl_error(fmd_hdl_t *, const char *, ...); 1557c478bd9Sstevel@tonic-gate 1567c478bd9Sstevel@tonic-gate extern void fmd_hdl_vdebug(fmd_hdl_t *, const char *, va_list); 1577c478bd9Sstevel@tonic-gate extern void fmd_hdl_debug(fmd_hdl_t *, const char *, ...); 1587c478bd9Sstevel@tonic-gate 1597c478bd9Sstevel@tonic-gate extern int32_t fmd_prop_get_int32(fmd_hdl_t *, const char *); 1607c478bd9Sstevel@tonic-gate extern int64_t fmd_prop_get_int64(fmd_hdl_t *, const char *); 1617c478bd9Sstevel@tonic-gate extern char *fmd_prop_get_string(fmd_hdl_t *, const char *); 1627c478bd9Sstevel@tonic-gate extern void fmd_prop_free_string(fmd_hdl_t *, char *); 1637c478bd9Sstevel@tonic-gate 1647c478bd9Sstevel@tonic-gate #define FMD_STAT_NOALLOC 0x0 /* fmd should use caller's memory */ 1657c478bd9Sstevel@tonic-gate #define FMD_STAT_ALLOC 0x1 /* fmd should allocate stats memory */ 1667c478bd9Sstevel@tonic-gate 1677c478bd9Sstevel@tonic-gate extern fmd_stat_t *fmd_stat_create(fmd_hdl_t *, uint_t, uint_t, fmd_stat_t *); 1687c478bd9Sstevel@tonic-gate extern void fmd_stat_destroy(fmd_hdl_t *, uint_t, fmd_stat_t *); 1697c478bd9Sstevel@tonic-gate extern void fmd_stat_setstr(fmd_hdl_t *, fmd_stat_t *, const char *); 1707c478bd9Sstevel@tonic-gate 1717c478bd9Sstevel@tonic-gate extern fmd_case_t *fmd_case_open(fmd_hdl_t *, void *); 172*f6e214c7SGavin Maltby extern fmd_case_t *fmd_case_open_uuid(fmd_hdl_t *, const char *, void *); 1737c478bd9Sstevel@tonic-gate extern void fmd_case_reset(fmd_hdl_t *, fmd_case_t *); 1747c478bd9Sstevel@tonic-gate extern void fmd_case_solve(fmd_hdl_t *, fmd_case_t *); 1757c478bd9Sstevel@tonic-gate extern void fmd_case_close(fmd_hdl_t *, fmd_case_t *); 1767c478bd9Sstevel@tonic-gate 1777c478bd9Sstevel@tonic-gate extern const char *fmd_case_uuid(fmd_hdl_t *, fmd_case_t *); 1787c478bd9Sstevel@tonic-gate extern fmd_case_t *fmd_case_uulookup(fmd_hdl_t *, const char *); 1797c478bd9Sstevel@tonic-gate extern void fmd_case_uuclose(fmd_hdl_t *, const char *); 1807c478bd9Sstevel@tonic-gate extern int fmd_case_uuclosed(fmd_hdl_t *, const char *); 181*f6e214c7SGavin Maltby extern int fmd_case_uuisresolved(fmd_hdl_t *, const char *); 18225c6ff4bSstephh extern void fmd_case_uuresolved(fmd_hdl_t *, const char *); 1837c478bd9Sstevel@tonic-gate 1847c478bd9Sstevel@tonic-gate extern int fmd_case_solved(fmd_hdl_t *, fmd_case_t *); 1857c478bd9Sstevel@tonic-gate extern int fmd_case_closed(fmd_hdl_t *, fmd_case_t *); 1867c478bd9Sstevel@tonic-gate 1877c478bd9Sstevel@tonic-gate extern void fmd_case_add_ereport(fmd_hdl_t *, fmd_case_t *, fmd_event_t *); 1887c478bd9Sstevel@tonic-gate extern void fmd_case_add_serd(fmd_hdl_t *, fmd_case_t *, const char *); 1897c478bd9Sstevel@tonic-gate extern void fmd_case_add_suspect(fmd_hdl_t *, fmd_case_t *, nvlist_t *); 1907c478bd9Sstevel@tonic-gate 1917c478bd9Sstevel@tonic-gate extern void fmd_case_setspecific(fmd_hdl_t *, fmd_case_t *, void *); 1927c478bd9Sstevel@tonic-gate extern void *fmd_case_getspecific(fmd_hdl_t *, fmd_case_t *); 1937c478bd9Sstevel@tonic-gate 1947c478bd9Sstevel@tonic-gate extern void fmd_case_setprincipal(fmd_hdl_t *, fmd_case_t *, fmd_event_t *); 1957c478bd9Sstevel@tonic-gate extern fmd_event_t *fmd_case_getprincipal(fmd_hdl_t *, fmd_case_t *); 1967c478bd9Sstevel@tonic-gate 1977c478bd9Sstevel@tonic-gate extern fmd_case_t *fmd_case_next(fmd_hdl_t *, fmd_case_t *); 1987c478bd9Sstevel@tonic-gate extern fmd_case_t *fmd_case_prev(fmd_hdl_t *, fmd_case_t *); 1997c478bd9Sstevel@tonic-gate 2007c478bd9Sstevel@tonic-gate extern void fmd_buf_create(fmd_hdl_t *, fmd_case_t *, const char *, size_t); 2017c478bd9Sstevel@tonic-gate extern void fmd_buf_destroy(fmd_hdl_t *, fmd_case_t *, const char *); 2027c478bd9Sstevel@tonic-gate extern void fmd_buf_read(fmd_hdl_t *, fmd_case_t *, 2037c478bd9Sstevel@tonic-gate const char *, void *, size_t); 2047c478bd9Sstevel@tonic-gate extern void fmd_buf_write(fmd_hdl_t *, fmd_case_t *, 2057c478bd9Sstevel@tonic-gate const char *, const void *, size_t); 2067c478bd9Sstevel@tonic-gate extern size_t fmd_buf_size(fmd_hdl_t *, fmd_case_t *, const char *); 2077c478bd9Sstevel@tonic-gate 2087c478bd9Sstevel@tonic-gate extern void fmd_serd_create(fmd_hdl_t *, const char *, uint_t, hrtime_t); 2097c478bd9Sstevel@tonic-gate extern void fmd_serd_destroy(fmd_hdl_t *, const char *); 2107c478bd9Sstevel@tonic-gate extern int fmd_serd_exists(fmd_hdl_t *, const char *); 2117c478bd9Sstevel@tonic-gate extern void fmd_serd_reset(fmd_hdl_t *, const char *); 2127c478bd9Sstevel@tonic-gate extern int fmd_serd_record(fmd_hdl_t *, const char *, fmd_event_t *); 2137c478bd9Sstevel@tonic-gate extern int fmd_serd_fired(fmd_hdl_t *, const char *); 2147c478bd9Sstevel@tonic-gate extern int fmd_serd_empty(fmd_hdl_t *, const char *); 2157c478bd9Sstevel@tonic-gate 2167c478bd9Sstevel@tonic-gate extern pthread_t fmd_thr_create(fmd_hdl_t *, void (*)(void *), void *); 2177c478bd9Sstevel@tonic-gate extern void fmd_thr_destroy(fmd_hdl_t *, pthread_t); 2187c478bd9Sstevel@tonic-gate extern void fmd_thr_signal(fmd_hdl_t *, pthread_t); 21925351652SVuong Nguyen extern void fmd_thr_checkpoint(fmd_hdl_t *); 2207c478bd9Sstevel@tonic-gate 221*f6e214c7SGavin Maltby extern door_xcreate_server_func_t fmd_doorthr_create; 222*f6e214c7SGavin Maltby extern door_xcreate_thrsetup_func_t fmd_doorthr_setup; 223*f6e214c7SGavin Maltby 2247c478bd9Sstevel@tonic-gate extern id_t fmd_timer_install(fmd_hdl_t *, void *, fmd_event_t *, hrtime_t); 2257c478bd9Sstevel@tonic-gate extern void fmd_timer_remove(fmd_hdl_t *, id_t); 2267c478bd9Sstevel@tonic-gate 227*f6e214c7SGavin Maltby extern nvlist_t *fmd_nvl_create_defect(fmd_hdl_t *, 228*f6e214c7SGavin Maltby const char *, uint8_t, nvlist_t *, nvlist_t *, nvlist_t *); 2297c478bd9Sstevel@tonic-gate extern nvlist_t *fmd_nvl_create_fault(fmd_hdl_t *, 2307c478bd9Sstevel@tonic-gate const char *, uint8_t, nvlist_t *, nvlist_t *, nvlist_t *); 2317c478bd9Sstevel@tonic-gate 232*f6e214c7SGavin Maltby extern const nvlist_t *fmd_hdl_fmauth(fmd_hdl_t *); 233*f6e214c7SGavin Maltby extern const nvlist_t *fmd_hdl_modauth(fmd_hdl_t *); 234*f6e214c7SGavin Maltby 2357c478bd9Sstevel@tonic-gate extern int fmd_nvl_class_match(fmd_hdl_t *, nvlist_t *, const char *); 2367c478bd9Sstevel@tonic-gate extern int fmd_nvl_fmri_expand(fmd_hdl_t *, nvlist_t *); 2377c478bd9Sstevel@tonic-gate extern int fmd_nvl_fmri_present(fmd_hdl_t *, nvlist_t *); 2387c478bd9Sstevel@tonic-gate extern int fmd_nvl_fmri_unusable(fmd_hdl_t *, nvlist_t *); 239e4b86885SCheng Sean Ye extern int fmd_nvl_fmri_retire(fmd_hdl_t *, nvlist_t *); 240e4b86885SCheng Sean Ye extern int fmd_nvl_fmri_unretire(fmd_hdl_t *, nvlist_t *); 24125c6ff4bSstephh extern int fmd_nvl_fmri_replaced(fmd_hdl_t *, nvlist_t *); 24225c6ff4bSstephh extern int fmd_nvl_fmri_service_state(fmd_hdl_t *, nvlist_t *); 24325c6ff4bSstephh extern int fmd_nvl_fmri_has_fault(fmd_hdl_t *, nvlist_t *, int, char *); 24425c6ff4bSstephh 24525c6ff4bSstephh #define FMD_HAS_FAULT_FRU 0 24625c6ff4bSstephh #define FMD_HAS_FAULT_ASRU 1 24725c6ff4bSstephh #define FMD_HAS_FAULT_RESOURCE 2 24825c6ff4bSstephh 249e5dcf7beSRobert Johnston extern void fmd_repair_fru(fmd_hdl_t *, const char *); 250a62774dfSSinanallur Balasubramanian extern int fmd_repair_asru(fmd_hdl_t *, const char *); 251e5dcf7beSRobert Johnston 2527c478bd9Sstevel@tonic-gate extern int fmd_nvl_fmri_contains(fmd_hdl_t *, nvlist_t *, nvlist_t *); 253d9638e54Smws extern nvlist_t *fmd_nvl_fmri_translate(fmd_hdl_t *, nvlist_t *, nvlist_t *); 254d9638e54Smws 2559af3851aSeschrock extern nvlist_t *fmd_nvl_alloc(fmd_hdl_t *, int); 2569af3851aSeschrock extern nvlist_t *fmd_nvl_dup(fmd_hdl_t *, nvlist_t *, int); 2579af3851aSeschrock 258d9638e54Smws extern int fmd_event_local(fmd_hdl_t *, fmd_event_t *); 25924db4641Seschrock extern uint64_t fmd_event_ena_create(fmd_hdl_t *); 26024db4641Seschrock 261d9638e54Smws 262d9638e54Smws #define FMD_XPRT_RDONLY 0x1 /* transport is read-only */ 263d9638e54Smws #define FMD_XPRT_RDWR 0x3 /* transport is read-write */ 264d9638e54Smws #define FMD_XPRT_ACCEPT 0x4 /* transport is accepting connection */ 265d9638e54Smws #define FMD_XPRT_SUSPENDED 0x8 /* transport starts suspended */ 266cbf75e67SStephen Hanson #define FMD_XPRT_EXTERNAL 0x80 /* xprt is external to a chassis */ 267cbf75e67SStephen Hanson #define FMD_XPRT_NO_REMOTE_REPAIR 0x100 /* xprt does not allow remote repair */ 268cbf75e67SStephen Hanson #define FMD_XPRT_CACHE_AS_LOCAL 0x200 /* xprt caches fault as if local */ 269cbf75e67SStephen Hanson #define FMD_XPRT_HCONLY 0x400 /* xprt only proxies hc-scheme faults */ 270cbf75e67SStephen Hanson #define FMD_XPRT_HC_PRESENT_ONLY 0x800 /* only locally present hc faults */ 271d9638e54Smws 272d9638e54Smws extern fmd_xprt_t *fmd_xprt_open(fmd_hdl_t *, uint_t, nvlist_t *, void *); 273d9638e54Smws extern void fmd_xprt_close(fmd_hdl_t *, fmd_xprt_t *); 274d9638e54Smws extern void fmd_xprt_post(fmd_hdl_t *, fmd_xprt_t *, nvlist_t *, hrtime_t); 27525351652SVuong Nguyen extern void fmd_xprt_log(fmd_hdl_t *, fmd_xprt_t *, nvlist_t *, hrtime_t); 276d9638e54Smws extern void fmd_xprt_suspend(fmd_hdl_t *, fmd_xprt_t *); 277d9638e54Smws extern void fmd_xprt_resume(fmd_hdl_t *, fmd_xprt_t *); 278d9638e54Smws extern int fmd_xprt_error(fmd_hdl_t *, fmd_xprt_t *); 279d9638e54Smws extern nvlist_t *fmd_xprt_translate(fmd_hdl_t *, fmd_xprt_t *, fmd_event_t *); 280cbf75e67SStephen Hanson extern void fmd_xprt_add_domain(fmd_hdl_t *, nvlist_t *, char *); 281d9638e54Smws extern void fmd_xprt_setspecific(fmd_hdl_t *, fmd_xprt_t *, void *); 282d9638e54Smws extern void *fmd_xprt_getspecific(fmd_hdl_t *, fmd_xprt_t *); 2837c478bd9Sstevel@tonic-gate 2847c478bd9Sstevel@tonic-gate #ifdef __cplusplus 2857c478bd9Sstevel@tonic-gate } 2867c478bd9Sstevel@tonic-gate #endif 2877c478bd9Sstevel@tonic-gate 2887c478bd9Sstevel@tonic-gate #endif /* _FMD_API_H */ 289