#ifndef _DID_PROPS_H
#define _DID_PROPS_H
#include <sys/pci.h>
#include <fm/topo_mod.h>
#include <libdevinfo.h>
#include <libnvpair.h>
#include <did.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct txprop {
const char *tx_diprop;
const topo_pgroup_info_t *tx_tpgroup;
const char *tx_tprop;
int (*tx_xlate)(tnode_t *, did_t *,
const char *, const char *, const char *);
} txprop_t;
#define DI_DEVTYPPROP "device_type"
#define DI_VENDIDPROP "vendor-id"
#define DI_SUBVENDIDPROP "subsystem-vendor-id"
#define DI_SUBSYSTEMID "subsystem-id"
#define DI_DEVIDPROP "device-id"
#define DI_CLASSPROP "class-code"
#define DI_REGPROP "reg"
#define DI_CCPROP "class-code"
#define DI_PHYSPROP "physical-slot#"
#define DI_SLOTPROP "slot-names"
#define DI_AADDRPROP "assigned-addresses"
#define DI_RECEPTACLE_PHYMASK "receptacle-pm"
#define DI_RECEPTACLE_LABEL "receptacle-label"
#define DI_PCIE_MAX_WIDTH "pcie-link-maximum-width"
#define DI_PCIE_CUR_WIDTH "pcie-link-current-width"
#define DI_PCIE_CUR_SPEED "pcie-link-current-speed"
#define DI_PCIE_MAX_SPEED "pcie-link-maximum-speed"
#define DI_PCIE_SUP_SPEEDS "pcie-link-supported-speeds"
#define DI_PCIE_TARG_SPEED "pcie-link-target-speed"
#define DI_PCIE_ADMIN_TAG "pcie-link-admin-target-speed"
extern int did_props_set(tnode_t *, did_t *, txprop_t[], int);
extern tnode_t *find_predecessor(tnode_t *, char *);
extern char *pci_devtype_get(topo_mod_t *, di_node_t);
extern int pciex_cap_get(topo_mod_t *, di_node_t);
extern int pci_BDF_get(topo_mod_t *, di_node_t, int *, int *, int *);
extern int pci_classcode_get(topo_mod_t *, di_node_t, uint_t *, uint_t *);
extern int di_uintprop_get(topo_mod_t *, di_node_t, const char *, uint_t *);
extern int di_bytes_get(topo_mod_t *, di_node_t, const char *, int *,
uchar_t **);
extern int FRU_fmri_set(topo_mod_t *, tnode_t *);
#ifdef __cplusplus
}
#endif
#endif