hd.h File Reference

#include <stdio.h>
#include <inttypes.h>
#include <termios.h>
#include <sys/types.h>

Go to the source code of this file.

Data Structures

struct  hd_status_t
 Hardware status. More...
struct  hd_id_t
 Holds id/name pairs. More...
struct  s_str_list_t
 String list type. More...
struct  hd_bitmap_t
struct  memory_range_t
struct  smp_info_t
struct  vbe_mode_info_s
struct  vbe_info_t
struct  cpq_ctlorder_t
struct  bios32_info_t
struct  smbios_any_t
struct  smbios_biosinfo_t
struct  smbios_sysinfo_t
struct  smbios_boardinfo_t
struct  smbios_chassis_t
struct  smbios_processor_t
struct  smbios_cache_t
struct  smbios_connect_t
struct  smbios_slot_t
struct  smbios_onboard_t
struct  smbios_oem_t
struct  smbios_config_t
struct  smbios_lang_t
struct  smbios_group_t
struct  smbios_memarray_t
struct  smbios_memdevice_t
struct  smbios_memerror_t
struct  smbios_memarraymap_t
struct  smbios_memdevicemap_t
struct  smbios_mouse_t
struct  smbios_secure_t
struct  smbios_power_t
struct  smbios_mem64error_t
union  u_hd_smbios_t
struct  s_udevinfo_t
struct  s_sysfsdrv_t
struct  hd_dev_num_t
struct  s_pci_t
struct  usb_s
struct  isapnp_res_t
struct  isapnp_card_t
struct  isapnp_t
struct  isapnp_dev_t
struct  scsi_s
struct  devtree_s
struct  ccw_s
struct  cdrom_info_s
struct  floppy_info_t
struct  bios_info_t
struct  prom_info_t
struct  sys_info_t
struct  monitor_info_t
struct  cpu_info_t
struct  edd_info_t
struct  hddb_data_t
struct  hddb_list_s
struct  hddb2_data_t
struct  modinfo_t
struct  hal_prop_s
struct  hal_device_s
struct  res_any_t
struct  res_mem_t
struct  res_phys_mem_t
struct  res_io_t
struct  res_irq_t
struct  res_dma_t
struct  res_size_t
struct  res_baud_t
struct  res_cache_t
struct  res_disk_geo_t
struct  res_monitor_t
struct  res_init_strings_t
struct  res_pppd_option_t
struct  res_framebuffer_t
struct  res_hwaddr_t
struct  res_link_t
struct  res_wlan_t
union  u_hd_res_t
struct  misc_io_t
struct  misc_dma_t
struct  misc_irq_t
struct  misc_t
struct  s_serial_t
struct  s_ser_device_t
struct  isdn_parm_s
struct  driver_info_any_t
struct  driver_info_display_t
struct  driver_info_module_t
struct  driver_info_mouse_t
struct  driver_info_x11_t
struct  driver_info_isdn_t
struct  driver_info_dsl_t
struct  driver_info_kbd_t
union  driver_info_u
struct  hd_detail_pci_t
struct  hd_detail_usb_t
struct  hd_detail_isapnp_t
struct  hd_detail_cdrom_t
struct  hd_detail_floppy_t
struct  hd_detail_bios_t
struct  hd_detail_cpu_t
struct  hd_detail_prom_t
struct  hd_detail_monitor_t
struct  hd_detail_sys_t
struct  hd_detail_scsi_t
struct  hd_detail_devtree_t
struct  hd_detail_ccw_t
union  hd_detail_t
struct  hd_manual_s
struct  s_hd_t
 Individual hardware item. More...
struct  s_hd_t::is_s
struct  s_hd_t::tag_s
struct  hd_data_t
 Holds all data accumulated during hardware probing. More...
struct  hd_data_t::flag_struct
 Special flags. More...
struct  cdb_isdn_vendor
struct  cdb_isdn_card
struct  cdb_isdn_vario

Defines

#define HD_VERSION   12
#define HD_DEB_SHOW_LOG   (1 << 0)
#define HD_DEB_PROGRESS   (1 << 1)
#define HD_DEB_CREATION   (1 << 2)
#define HD_DEB_DRIVER_INFO   (1 << 3)
#define HD_DEB_PCI   (1 << 4)
#define HD_DEB_ISAPNP   (1 << 5)
#define HD_DEB_CDROM   (1 << 6)
#define HD_DEB_NET   (1 << 7)
#define HD_DEB_FLOPPY   (1 << 8)
#define HD_DEB_MISC   (1 << 9)
#define HD_DEB_SERIAL   (1 << 10)
#define HD_DEB_MONITOR   (1 << 11)
#define HD_DEB_CPU   (1 << 12)
#define HD_DEB_BIOS   (1 << 13)
#define HD_DEB_MOUSE   (1 << 14)
#define HD_DEB_IDE   (1 << 15)
#define HD_DEB_SCSI   (1 << 16)
#define HD_DEB_USB   (1 << 17)
#define HD_DEB_ADB   (1 << 18)
#define HD_DEB_MODEM   (1 << 19)
#define HD_DEB_PARALLEL   (1 << 20)
#define HD_DEB_ISA   (1 << 21)
#define HD_DEB_BOOT   (1 << 22)
#define HD_DEB_HDDB   (1 << 23)
#define HARDWARE_DIR   "/var/lib/hardware"
#define TAG_PCI   1
 PCI ids.
#define TAG_EISA   2
 EISA ids (monitors, ISA-PnP, modems, mice etc).
#define TAG_USB   3
 USB ids.
#define TAG_SPECIAL   4
 Internally used ids.
#define TAG_PCMCIA   5
 PCMCIA ids.
#define ID_VALUE(id)   ((id) & 0xffff)
 Get the real id value.
#define ID_TAG(id)   (((id) >> 16) & 0xf)
 Get the tag value.
#define MAKE_ID(tag, id_val)   ((tag << 16) | (id_val))
 Combine tag and id value.
#define CDBISDN_VERSION   0x0101
#define PCI_ANY_ID   0xffff
#define CDBISDN_P_NONE   0x0
#define CDBISDN_P_IRQ   0x1
#define CDBISDN_P_MEM   0x2
#define CDBISDN_P_IO   0x3

Typedefs

typedef enum probe_feature hd_probe_feature_t
typedef enum hw_item hd_hw_item_t
typedef enum base_classes hd_base_classes_t
typedef enum sc_monitor hd_sc_monitor_t
typedef enum sc_storage hd_sc_storage_t
typedef enum sc_display hd_sc_display_t
typedef enum sc_framebuffer hd_sc_framebuffer_t
typedef enum sc_bridge hd_sc_bridge_t
typedef enum sc_comm hd_sc_comm_t
typedef enum sc_system hd_sc_system_t
typedef enum sc_input hd_sc_input_t
typedef enum sc_serial hd_sc_serial_t
typedef enum sc_internal hd_sc_internal_t
typedef enum sc_mouse hd_sc_mouse_t
typedef enum sc_std hd_sc_std_t
typedef enum sc_net_if hd_sc_net_if_t
typedef enum sc_multimedia hd_sc_multimedia_t
typedef enum sc_keyboard hd_sc_keyboard_t
typedef enum sc_hub hd_sc_hub_t
typedef enum sc_camera hd_sc_camera_t
typedef enum sc_modem hd_sc_modem_t
typedef enum sc_dsl hd_sc_dsl_t
typedef enum pif_usb_e hd_pif_usb_t
typedef enum pif_cdrom hd_pif_cdrom_t
typedef enum pif_s390disk hd_pif_s390disk_t
typedef enum bus_types hd_bus_types_t
typedef s_str_list_t str_list_t
 String list type.
typedef vbe_mode_info_s vbe_mode_info_t
typedef u_hd_smbios_t hd_smbios_t
typedef s_udevinfo_t hd_udevinfo_t
typedef s_sysfsdrv_t hd_sysfsdrv_t
typedef s_pci_t pci_t
typedef enum pci_flags hd_pci_flags_t
typedef usb_s usb_t
typedef enum isapnp_flags hd_isapnp_flags_t
typedef scsi_s scsi_t
typedef devtree_s devtree_t
typedef ccw_s ccw_t
typedef cdrom_info_s cdrom_info_t
typedef enum cpu_arch hd_cpu_arch_t
typedef enum boot_arch hd_boot_arch_t
typedef uint32_t hddb_entry_mask_t
typedef hddb_list_s hddb_list_t
typedef enum modinfo_type_e modinfo_type_t
typedef hal_prop_s hal_prop_t
typedef hal_device_s hal_device_t
typedef enum resource_types hd_resource_types_t
typedef enum size_units hd_size_units_t
typedef enum access_flags hd_access_flags_t
typedef enum yes_no_flag hd_yes_no_flag_t
typedef enum geo_types hd_geo_types_t
typedef u_hd_res_t hd_res_t
typedef s_serial_t serial_t
typedef s_ser_device_t ser_device_t
typedef isdn_parm_s isdn_parm_t
typedef enum driver_info_type hd_driver_info_t
typedef driver_info_u driver_info_t
typedef enum hd_detail_type hd_detail_type_t
typedef hd_manual_s hd_manual_t
typedef s_hd_t hd_t
 Individual hardware item.

Enumerations

enum  probe_feature {
  pr_memory = 1, pr_pci, pr_isapnp, pr_net,
  pr_floppy, pr_misc, pr_misc_serial, pr_misc_par,
  pr_misc_floppy, pr_serial, pr_cpu, pr_bios,
  pr_monitor, pr_mouse, pr_scsi, pr_usb,
  pr_usb_mods, pr_adb, pr_modem, pr_modem_usb,
  pr_parallel, pr_parallel_lp, pr_parallel_zip, pr_isa,
  pr_isa_isdn, pr_isdn, pr_kbd, pr_prom,
  pr_sbus, pr_int, pr_braille, pr_braille_alva,
  pr_braille_fhp, pr_braille_ht, pr_ignx11, pr_sys,
  pr_bios_vbe, pr_isapnp_old, pr_isapnp_new, pr_isapnp_mod,
  pr_braille_baum, pr_manual, pr_fb, pr_veth,
  pr_pppoe, pr_scan, pr_pcmcia, pr_fork,
  pr_parallel_imm, pr_s390, pr_cpuemu, pr_sysfs,
  pr_s390disks, pr_udev, pr_block, pr_block_cdrom,
  pr_block_part, pr_edd, pr_edd_mod, pr_bios_ddc,
  pr_bios_fb, pr_bios_mode, pr_input, pr_block_mods,
  pr_bios_vesa, pr_cpuemu_debug, pr_scsi_noserial, pr_wlan,
  pr_bios_crc, pr_hal, pr_bios_vram, pr_max,
  pr_lxrc, pr_default, pr_all
}
enum  hw_item {
  hw_none = 0, hw_sys, hw_cpu, hw_keyboard,
  hw_braille, hw_mouse, hw_joystick, hw_printer,
  hw_scanner, hw_chipcard, hw_monitor, hw_tv,
  hw_display, hw_framebuffer, hw_camera, hw_sound,
  hw_storage_ctrl, hw_network_ctrl, hw_isdn, hw_modem,
  hw_network, hw_disk, hw_partition, hw_cdrom,
  hw_floppy, hw_manual, hw_usb_ctrl, hw_usb,
  hw_bios, hw_pci, hw_isapnp, hw_bridge,
  hw_hub, hw_scsi, hw_ide, hw_memory,
  hw_dvb, hw_pcmcia, hw_pcmcia_ctrl, hw_ieee1394,
  hw_ieee1394_ctrl, hw_hotplug, hw_hotplug_ctrl, hw_zip,
  hw_pppoe, hw_wlan, hw_redasd, hw_dsl,
  hw_block, hw_tape, hw_vbe, hw_bluetooth,
  hw_unknown, hw_all
}
enum  base_classes {
  bc_none, bc_storage, bc_network, bc_display,
  bc_multimedia, bc_memory, bc_bridge, bc_comm,
  bc_system, bc_input, bc_docking, bc_processor,
  bc_serial, bc_wireless, bc_i2o, bc_other = 0xff,
  bc_monitor = 0x100, bc_internal, bc_modem, bc_isdn,
  bc_ps2, bc_mouse, bc_storage_device, bc_network_interface,
  bc_keyboard, bc_printer, bc_hub, bc_braille,
  bc_scanner, bc_joystick, bc_chipcard, bc_camera,
  bc_framebuffer, bc_dvb, bc_tv, bc_partition,
  bc_dsl, bc_bluetooth
}
enum  sc_monitor { sc_mon_other, sc_mon_crt, sc_mon_lcd }
enum  sc_storage {
  sc_sto_scsi, sc_sto_ide, sc_sto_floppy, sc_sto_ipi,
  sc_sto_raid, sc_sto_other = 0x80
}
enum  sc_display { sc_dis_vga, sc_dis_xga, sc_dis_other = 0x80 }
enum  sc_framebuffer { sc_fb_vesa = 1 }
enum  sc_bridge {
  sc_bridge_host, sc_bridge_isa, sc_bridge_eisa, sc_bridge_mc,
  sc_bridge_pci, sc_bridge_pcmcia, sc_bridge_nubus, sc_bridge_cardbus,
  sc_bridge_other = 0x80
}
enum  sc_comm {
  sc_com_ser, sc_com_par, sc_com_multi, sc_com_modem,
  sc_com_other = 0x80
}
enum  sc_system {
  sc_sys_pic, sc_sys_dma, sc_sys_timer, sc_sys_rtc,
  sc_sys_other = 0x80
}
enum  sc_input { sc_inp_keyb, sc_inp_digit, sc_inp_mouse, sc_inp_other = 0x80 }
enum  sc_serial {
  sc_ser_fire, sc_ser_access, sc_ser_ssa, sc_ser_usb,
  sc_ser_fiber, sc_ser_smbus, sc_ser_other = 0x80
}
enum  sc_internal {
  sc_int_none, sc_int_isapnp_if, sc_int_main_mem, sc_int_cpu,
  sc_int_fpu, sc_int_bios, sc_int_prom, sc_int_sys
}
enum  sc_mouse {
  sc_mou_ps2, sc_mou_ser, sc_mou_bus, sc_mou_usb,
  sc_mou_sun, sc_mou_other = 0x80
}
enum  sc_std {
  sc_sdev_disk, sc_sdev_tape, sc_sdev_cdrom, sc_sdev_floppy,
  sc_sdev_scanner, sc_sdev_other = 0x80
}
enum  sc_net_if {
  sc_nif_loopback, sc_nif_ethernet, sc_nif_tokenring, sc_nif_fddi,
  sc_nif_ctc, sc_nif_iucv, sc_nif_hsi, sc_nif_qeth,
  sc_nif_escon, sc_nif_myrinet, sc_nif_wlan, sc_nif_xp,
  sc_nif_usb, sc_nif_other = 0x80, sc_nif_sit
}
enum  sc_multimedia { sc_multi_video, sc_multi_audio, sc_multi_other }
enum  sc_keyboard { sc_keyboard_kbd, sc_keyboard_console }
enum  sc_hub { sc_hub_other, sc_hub_usb }
enum  sc_camera { sc_camera_webcam, sc_camera_digital }
enum  sc_modem {
  sc_mod_at, sc_mod_win1, sc_mod_win2, sc_mod_win3,
  sc_mod_win4
}
enum  sc_dsl { sc_dsl_unknown, sc_dsl_pppoe, sc_dsl_capi, sc_dsl_capiisdn }
enum  pif_usb_e {
  pif_usb_uhci = 0, pif_usb_ohci = 0x10, pif_usb_ehci = 0x20, pif_usb_other = 0x80,
  pif_usb_device = 0xfe
}
enum  pif_cdrom {
  pif_cdrom, pif_cdr, pif_cdrw, pif_dvd,
  pif_dvdr, pif_dvdram
}
enum  pif_s390disk { pif_scsi, pif_dasd, pif_dasd_fba }
enum  bus_types {
  bus_none, bus_isa, bus_eisa, bus_mc,
  bus_pci, bus_pcmcia, bus_nubus, bus_cardbus,
  bus_other, bus_ps2 = 0x80, bus_serial, bus_parallel,
  bus_floppy, bus_scsi, bus_ide, bus_usb,
  bus_adb, bus_raid, bus_sbus, bus_i2o,
  bus_vio, bus_ccw, bus_iucv
}
enum  hd_status_value_t { status_no = 1, status_yes, status_unknown, status_new }
enum  hd_hotplug_t {
  hp_none, hp_pcmcia, hp_cardbus, hp_pci,
  hp_usb, hp_ieee1394
}
 Various types of hotplug devices. More...
enum  hd_smbios_type_t {
  sm_biosinfo, sm_sysinfo, sm_boardinfo, sm_chassis,
  sm_processor, sm_memctrl, sm_memmodule, sm_cache,
  sm_connect, sm_slot, sm_onboard, sm_oem,
  sm_config, sm_lang, sm_group, sm_eventlog,
  sm_memarray, sm_memdevice, sm_memerror, sm_memarraymap,
  sm_memdevicemap, sm_mouse, sm_battery, sm_reset,
  sm_secure, sm_power, sm_voltage, sm_cool,
  sm_temperature, sm_current, sm_outofband, sm_bis,
  sm_boot, sm_mem64error, sm_mandev, sm_mandevcomp,
  sm_mdtd, sm_inactive = 126, sm_end = 127
}
enum  pci_flags { pci_flag_ok, pci_flag_pm, pci_flag_agp }
enum  isapnp_flags { isapnp_flag_act }
enum  cpu_arch {
  arch_unknown = 0, arch_intel, arch_alpha, arch_sparc,
  arch_sparc64, arch_ppc, arch_ppc64, arch_68k,
  arch_ia64, arch_s390, arch_s390x, arch_arm,
  arch_mips, arch_x86_64
}
enum  boot_arch {
  boot_unknown = 0, boot_lilo, boot_milo, boot_aboot,
  boot_silo, boot_ppc, boot_elilo, boot_s390,
  boot_mips, boot_grub
}
enum  modinfo_type_e { mi_none = 0, mi_pci, mi_usb, mi_pcmcia }
enum  hal_prop_type_t {
  p_invalid, p_string, p_int32, p_uint64,
  p_double, p_bool, p_list
}
enum  resource_types {
  res_any, res_phys_mem, res_mem, res_io,
  res_irq, res_dma, res_monitor, res_size,
  res_disk_geo, res_cache, res_baud, res_init_strings,
  res_pppd_option, res_framebuffer, res_hwaddr, res_link,
  res_wlan
}
enum  size_units {
  size_unit_cm, size_unit_cinch, size_unit_byte, size_unit_sectors,
  size_unit_kbyte, size_unit_mbyte, size_unit_gbyte, size_unit_mm
}
enum  access_flags { acc_unknown, acc_ro, acc_wo, acc_rw }
enum  yes_no_flag { flag_unknown, flag_no, flag_yes }
enum  geo_types { geo_physical = 0, geo_logical, geo_bios_edd, geo_bios_legacy }
enum  driver_info_type {
  di_any, di_display, di_module, di_mouse,
  di_x11, di_isdn, di_kbd, di_dsl
}
enum  hd_detail_type {
  hd_detail_pci, hd_detail_usb, hd_detail_isapnp, hd_detail_cdrom,
  hd_detail_floppy, hd_detail_bios, hd_detail_cpu, hd_detail_prom,
  hd_detail_monitor, hd_detail_sys, hd_detail_scsi, hd_detail_devtree,
  hd_detail_ccw
}

Functions

void hd_scan (hd_data_t *hd_data)
hd_data_thd_free_hd_data (hd_data_t *hd_data)
 Free all data.
hd_thd_free_hd_list (hd_t *hd)
 Free hardware items returned by e.g. hd_list().
void hd_set_probe_feature (hd_data_t *hd_data, enum probe_feature feature)
void hd_clear_probe_feature (hd_data_t *hd_data, enum probe_feature feature)
int hd_probe_feature (hd_data_t *hd_data, enum probe_feature feature)
void hd_set_probe_feature_hw (hd_data_t *hd_data, hd_hw_item_t item)
enum probe_feature hd_probe_feature_by_name (char *name)
char * hd_probe_feature_by_value (enum probe_feature feature)
int hd_module_is_active (hd_data_t *hd_data, char *mod)
hd_thd_base_class_list (hd_data_t *hd_data, unsigned base_class)
hd_thd_sub_class_list (hd_data_t *hd_data, unsigned base_class, unsigned sub_class)
hd_thd_bus_list (hd_data_t *hd_data, unsigned bus)
const char * hd_busid_to_hwcfg (int busid)
hd_thd_list (hd_data_t *hd_data, hd_hw_item_t item, int rescan, hd_t *hd_old)
hd_thd_list_with_status (hd_data_t *hd_data, hd_hw_item_t item, hd_status_t status)
hd_thd_list2 (hd_data_t *hd_data, hd_hw_item_t *items, int rescan)
hd_thd_list_with_status2 (hd_data_t *hd_data, hd_hw_item_t *items, hd_status_t status)
int hd_has_pcmcia (hd_data_t *hd_data)
int hd_usb_support (hd_data_t *hd_data)
int hd_smp_support (hd_data_t *hd_data)
int hd_mac_color (hd_data_t *hd_data)
int hd_color (hd_data_t *hd_data)
int hd_is_uml (hd_data_t *hd_data)
unsigned hd_display_adapter (hd_data_t *hd_data)
unsigned hd_boot_disk (hd_data_t *hd_data, int *matches)
enum cpu_arch hd_cpu_arch (hd_data_t *hd_data)
enum boot_arch hd_boot_arch (hd_data_t *hd_data)
hd_thd_get_device_by_idx (hd_data_t *hd_data, unsigned idx)
void hd_set_hw_class (hd_t *hd, hd_hw_item_t hw_class)
int hd_is_hw_class (hd_t *hd, hd_hw_item_t hw_class)
int hd_is_sgi_altix (hd_data_t *hd_data)
char * hd_version (void)
hal_prop_thd_free_hal_properties (hal_prop_t *prop)
hal_prop_thd_read_properties (const char *udi)
int hd_write_properties (const char *udi, hal_prop_t *prop)
str_list_tget_hddb_packages (hd_data_t *hd_data)
void hddb_add_info (hd_data_t *hd_data, hd_t *hd)
void hddb_dump_raw (hddb2_data_t *hddb, FILE *f)
void hddb_dump (hddb2_data_t *hddb, FILE *f)
void hd_dump_entry (hd_data_t *hd_data, hd_t *hd, FILE *f)
cdrom_info_thd_read_cdrom_info (hd_data_t *hd_data, hd_t *hd)
hd_manual_thd_manual_read_entry (hd_data_t *hd_data, const char *id)
int hd_manual_write_entry (hd_data_t *hd_data, hd_manual_t *entry)
hd_manual_thd_free_manual (hd_manual_t *manual)
hd_thd_read_config (hd_data_t *hd_data, const char *id)
int hd_write_config (hd_data_t *hd_data, hd_t *hd)
char * hd_hw_item_name (hd_hw_item_t item)
hd_hw_item_t hd_hw_item_type (char *name)
char * hd_status_value_name (hd_status_value_t status)
int hd_change_status (const char *id, hd_status_t status, const char *config_string)
int hd_change_config_status (hd_data_t *hd_data, const char *id, hd_status_t status, const char *config_string)
int hd_read_mmap (hd_data_t *hd_data, char *name, unsigned char *buf, off_t start, unsigned size)
cdb_isdn_vendorhd_cdbisdn_get_vendor (int)
cdb_isdn_cardhd_cdbisdn_get_card (int)
cdb_isdn_variohd_cdbisdn_get_vario_from_type (int, int)
cdb_isdn_cardhd_cdbisdn_get_card_from_type (int, int)
cdb_isdn_cardhd_cdbisdn_get_card_from_id (int, int, int, int)
cdb_isdn_variohd_cdbisdn_get_vario (int)
int hd_cdbisdn_get_version (void)
int hd_cdbisdn_get_db_version (void)
char * hd_cdbisdn_get_db_date (void)


Define Documentation

#define CDBISDN_P_IO   0x3
 

#define CDBISDN_P_IRQ   0x1
 

#define CDBISDN_P_MEM   0x2
 

#define CDBISDN_P_NONE   0x0
 

#define CDBISDN_VERSION   0x0101
 

#define HARDWARE_DIR   "/var/lib/hardware"
 

#define HD_DEB_ADB   (1 << 18)
 

#define HD_DEB_BIOS   (1 << 13)
 

#define HD_DEB_BOOT   (1 << 22)
 

#define HD_DEB_CDROM   (1 << 6)
 

#define HD_DEB_CPU   (1 << 12)
 

#define HD_DEB_CREATION   (1 << 2)
 

#define HD_DEB_DRIVER_INFO   (1 << 3)
 

#define HD_DEB_FLOPPY   (1 << 8)
 

#define HD_DEB_HDDB   (1 << 23)
 

#define HD_DEB_IDE   (1 << 15)
 

#define HD_DEB_ISA   (1 << 21)
 

#define HD_DEB_ISAPNP   (1 << 5)
 

#define HD_DEB_MISC   (1 << 9)
 

#define HD_DEB_MODEM   (1 << 19)
 

#define HD_DEB_MONITOR   (1 << 11)
 

#define HD_DEB_MOUSE   (1 << 14)
 

#define HD_DEB_NET   (1 << 7)
 

#define HD_DEB_PARALLEL   (1 << 20)
 

#define HD_DEB_PCI   (1 << 4)
 

#define HD_DEB_PROGRESS   (1 << 1)
 

#define HD_DEB_SCSI   (1 << 16)
 

#define HD_DEB_SERIAL   (1 << 10)
 

#define HD_DEB_SHOW_LOG   (1 << 0)
 

#define HD_DEB_USB   (1 << 17)
 

#define HD_VERSION   12
 

#define PCI_ANY_ID   0xffff
 


Typedef Documentation

typedef struct ccw_s ccw_t
 

typedef struct cdrom_info_s cdrom_info_t
 

typedef struct devtree_s devtree_t
 

typedef union driver_info_u driver_info_t
 

typedef struct hal_device_s hal_device_t
 

typedef struct hal_prop_s hal_prop_t
 

typedef enum access_flags hd_access_flags_t
 

typedef enum base_classes hd_base_classes_t
 

typedef enum boot_arch hd_boot_arch_t
 

typedef enum bus_types hd_bus_types_t
 

typedef enum cpu_arch hd_cpu_arch_t
 

typedef enum hd_detail_type hd_detail_type_t
 

typedef enum driver_info_type hd_driver_info_t
 

typedef enum geo_types hd_geo_types_t
 

typedef enum hw_item hd_hw_item_t
 

typedef enum isapnp_flags hd_isapnp_flags_t
 

typedef struct hd_manual_s hd_manual_t
 

typedef enum pci_flags hd_pci_flags_t
 

typedef enum pif_cdrom hd_pif_cdrom_t
 

typedef enum pif_s390disk hd_pif_s390disk_t
 

typedef enum pif_usb_e hd_pif_usb_t
 

typedef enum probe_feature hd_probe_feature_t
 

typedef union u_hd_res_t hd_res_t
 

typedef enum resource_types hd_resource_types_t
 

typedef enum sc_bridge hd_sc_bridge_t
 

typedef enum sc_camera hd_sc_camera_t
 

typedef enum sc_comm hd_sc_comm_t
 

typedef enum sc_display hd_sc_display_t
 

typedef enum sc_dsl hd_sc_dsl_t
 

typedef enum sc_framebuffer hd_sc_framebuffer_t
 

typedef enum sc_hub hd_sc_hub_t
 

typedef enum sc_input hd_sc_input_t
 

typedef enum sc_internal hd_sc_internal_t
 

typedef enum sc_keyboard hd_sc_keyboard_t
 

typedef enum sc_modem hd_sc_modem_t
 

typedef enum sc_monitor hd_sc_monitor_t
 

typedef enum sc_mouse hd_sc_mouse_t
 

typedef enum sc_multimedia hd_sc_multimedia_t
 

typedef enum sc_net_if hd_sc_net_if_t
 

typedef enum sc_serial hd_sc_serial_t
 

typedef enum sc_std hd_sc_std_t
 

typedef enum sc_storage hd_sc_storage_t
 

typedef enum sc_system hd_sc_system_t
 

typedef enum size_units hd_size_units_t
 

typedef union u_hd_smbios_t hd_smbios_t
 

typedef struct s_sysfsdrv_t hd_sysfsdrv_t
 

typedef struct s_hd_t hd_t
 

Individual hardware item.

Every hardware component gets an hd_t entry. A list of all hardware items is in hd_data_t::hd.

typedef struct s_udevinfo_t hd_udevinfo_t
 

typedef enum yes_no_flag hd_yes_no_flag_t
 

typedef uint32_t hddb_entry_mask_t
 

typedef struct hddb_list_s hddb_list_t
 

typedef struct isdn_parm_s isdn_parm_t
 

typedef enum modinfo_type_e modinfo_type_t
 

typedef struct s_pci_t pci_t
 

typedef struct scsi_s scsi_t
 

typedef struct s_ser_device_t ser_device_t
 

typedef struct s_serial_t serial_t
 

typedef struct s_str_list_t str_list_t
 

String list type.

Used whenever we create a list of strings (e.g. file read).

typedef struct usb_s usb_t
 

typedef struct vbe_mode_info_s vbe_mode_info_t
 


Enumeration Type Documentation

enum access_flags
 

Enumerator:
acc_unknown 
acc_ro 
acc_wo 
acc_rw 

enum base_classes
 

Enumerator:
bc_none 
bc_storage 
bc_network 
bc_display 
bc_multimedia 
bc_memory 
bc_bridge 
bc_comm 
bc_system 
bc_input 
bc_docking 
bc_processor 
bc_serial 
bc_wireless 
bc_i2o 
bc_other 
bc_monitor 
bc_internal 
bc_modem 
bc_isdn 
bc_ps2 
bc_mouse 
bc_storage_device 
bc_network_interface 
bc_keyboard 
bc_printer 
bc_hub 
bc_braille 
bc_scanner 
bc_joystick 
bc_chipcard 
bc_camera 
bc_framebuffer 
bc_dvb 
bc_tv 
bc_partition 
bc_dsl 
bc_bluetooth 

enum boot_arch
 

Enumerator:
boot_unknown 
boot_lilo 
boot_milo 
boot_aboot 
boot_silo 
boot_ppc 
boot_elilo 
boot_s390 
boot_mips 
boot_grub 

enum bus_types
 

Enumerator:
bus_none 
bus_isa 
bus_eisa 
bus_mc 
bus_pci 
bus_pcmcia 
bus_nubus 
bus_cardbus 
bus_other 
bus_ps2 
bus_serial 
bus_parallel 
bus_floppy 
bus_scsi 
bus_ide 
bus_usb 
bus_adb 
bus_raid 
bus_sbus 
bus_i2o 
bus_vio 
bus_ccw 
bus_iucv 

enum cpu_arch
 

Enumerator:
arch_unknown 
arch_intel 
arch_alpha 
arch_sparc 
arch_sparc64 
arch_ppc 
arch_ppc64 
arch_68k 
arch_ia64 
arch_s390 
arch_s390x 
arch_arm 
arch_mips 
arch_x86_64 

enum driver_info_type
 

Enumerator:
di_any 
di_display 
di_module 
di_mouse 
di_x11 
di_isdn 
di_kbd 
di_dsl 

enum geo_types
 

Enumerator:
geo_physical 
geo_logical 
geo_bios_edd 
geo_bios_legacy 

enum hal_prop_type_t
 

Enumerator:
p_invalid 
p_string 
p_int32 
p_uint64 
p_double 
p_bool 
p_list 

enum hd_detail_type
 

Enumerator:
hd_detail_pci 
hd_detail_usb 
hd_detail_isapnp 
hd_detail_cdrom 
hd_detail_floppy 
hd_detail_bios 
hd_detail_cpu 
hd_detail_prom 
hd_detail_monitor 
hd_detail_sys 
hd_detail_scsi 
hd_detail_devtree 
hd_detail_ccw 

enum hd_hotplug_t
 

Various types of hotplug devices.

Enumerator:
hp_none  Not a hotpluggable device.
hp_pcmcia  PCMCIA device.
hp_cardbus  Cardbus device.
hp_pci  PCI hotplug device.
hp_usb  USB device.
hp_ieee1394  IEEE 1394 (FireWire) device.

enum hd_smbios_type_t
 

Enumerator:
sm_biosinfo 
sm_sysinfo 
sm_boardinfo 
sm_chassis 
sm_processor 
sm_memctrl 
sm_memmodule 
sm_cache 
sm_connect 
sm_slot 
sm_onboard 
sm_oem 
sm_config 
sm_lang 
sm_group 
sm_eventlog 
sm_memarray 
sm_memdevice 
sm_memerror 
sm_memarraymap 
sm_memdevicemap 
sm_mouse 
sm_battery 
sm_reset 
sm_secure 
sm_power 
sm_voltage 
sm_cool 
sm_temperature 
sm_current 
sm_outofband 
sm_bis 
sm_boot 
sm_mem64error 
sm_mandev 
sm_mandevcomp 
sm_mdtd 
sm_inactive 
sm_end 

enum hd_status_value_t
 

Enumerator:
status_no 
status_yes 
status_unknown 
status_new 

enum hw_item
 

Enumerator:
hw_none 
hw_sys 
hw_cpu 
hw_keyboard 
hw_braille 
hw_mouse 
hw_joystick 
hw_printer 
hw_scanner 
hw_chipcard 
hw_monitor 
hw_tv 
hw_display 
hw_framebuffer 
hw_camera 
hw_sound 
hw_storage_ctrl 
hw_network_ctrl 
hw_isdn 
hw_modem 
hw_network 
hw_disk 
hw_partition 
hw_cdrom 
hw_floppy 
hw_manual 
hw_usb_ctrl 
hw_usb 
hw_bios 
hw_pci 
hw_isapnp 
hw_bridge 
hw_hub 
hw_scsi 
hw_ide 
hw_memory 
hw_dvb 
hw_pcmcia 
hw_pcmcia_ctrl 
hw_ieee1394 
hw_ieee1394_ctrl 
hw_hotplug 
hw_hotplug_ctrl 
hw_zip 
hw_pppoe 
hw_wlan 
hw_redasd 
hw_dsl 
hw_block 
hw_tape 
hw_vbe 
hw_bluetooth 
hw_unknown 
hw_all 

enum isapnp_flags
 

Enumerator:
isapnp_flag_act 

enum modinfo_type_e
 

Enumerator:
mi_none 
mi_pci 
mi_usb 
mi_pcmcia 

enum pci_flags
 

Enumerator:
pci_flag_ok 
pci_flag_pm 
pci_flag_agp 

enum pif_cdrom
 

Enumerator:
pif_cdrom 
pif_cdr 
pif_cdrw 
pif_dvd 
pif_dvdr 
pif_dvdram 

enum pif_s390disk
 

Enumerator:
pif_scsi 
pif_dasd 
pif_dasd_fba 

enum pif_usb_e
 

Enumerator:
pif_usb_uhci 
pif_usb_ohci 
pif_usb_ehci 
pif_usb_other 
pif_usb_device 

enum probe_feature
 

Enumerator:
pr_memory 
pr_pci 
pr_isapnp 
pr_net 
pr_floppy 
pr_misc 
pr_misc_serial 
pr_misc_par 
pr_misc_floppy 
pr_serial 
pr_cpu 
pr_bios 
pr_monitor 
pr_mouse 
pr_scsi 
pr_usb 
pr_usb_mods 
pr_adb 
pr_modem 
pr_modem_usb 
pr_parallel 
pr_parallel_lp 
pr_parallel_zip 
pr_isa 
pr_isa_isdn 
pr_isdn 
pr_kbd 
pr_prom 
pr_sbus 
pr_int 
pr_braille 
pr_braille_alva 
pr_braille_fhp 
pr_braille_ht 
pr_ignx11 
pr_sys 
pr_bios_vbe 
pr_isapnp_old 
pr_isapnp_new 
pr_isapnp_mod 
pr_braille_baum 
pr_manual 
pr_fb 
pr_veth 
pr_pppoe 
pr_scan 
pr_pcmcia 
pr_fork 
pr_parallel_imm 
pr_s390 
pr_cpuemu 
pr_sysfs 
pr_s390disks 
pr_udev 
pr_block 
pr_block_cdrom 
pr_block_part 
pr_edd 
pr_edd_mod 
pr_bios_ddc 
pr_bios_fb 
pr_bios_mode 
pr_input 
pr_block_mods 
pr_bios_vesa 
pr_cpuemu_debug 
pr_scsi_noserial 
pr_wlan 
pr_bios_crc 
pr_hal 
pr_bios_vram 
pr_max 
pr_lxrc 
pr_default 
pr_all 

enum resource_types
 

Enumerator:
res_any 
res_phys_mem 
res_mem 
res_io 
res_irq 
res_dma 
res_monitor 
res_size 
res_disk_geo 
res_cache 
res_baud 
res_init_strings 
res_pppd_option 
res_framebuffer 
res_hwaddr 
res_link 
res_wlan 

enum sc_bridge
 

Enumerator:
sc_bridge_host 
sc_bridge_isa 
sc_bridge_eisa 
sc_bridge_mc 
sc_bridge_pci 
sc_bridge_pcmcia 
sc_bridge_nubus 
sc_bridge_cardbus 
sc_bridge_other 

enum sc_camera
 

Enumerator:
sc_camera_webcam 
sc_camera_digital 

enum sc_comm
 

Enumerator:
sc_com_ser 
sc_com_par 
sc_com_multi 
sc_com_modem 
sc_com_other 

enum sc_display
 

Enumerator:
sc_dis_vga 
sc_dis_xga 
sc_dis_other 

enum sc_dsl
 

Enumerator:
sc_dsl_unknown 
sc_dsl_pppoe 
sc_dsl_capi 
sc_dsl_capiisdn 

enum sc_framebuffer
 

Enumerator:
sc_fb_vesa 

enum sc_hub
 

Enumerator:
sc_hub_other 
sc_hub_usb 

enum sc_input
 

Enumerator:
sc_inp_keyb 
sc_inp_digit 
sc_inp_mouse 
sc_inp_other 

enum sc_internal
 

Enumerator:
sc_int_none 
sc_int_isapnp_if 
sc_int_main_mem 
sc_int_cpu 
sc_int_fpu 
sc_int_bios 
sc_int_prom 
sc_int_sys 

enum sc_keyboard
 

Enumerator:
sc_keyboard_kbd 
sc_keyboard_console 

enum sc_modem
 

Enumerator:
sc_mod_at 
sc_mod_win1 
sc_mod_win2 
sc_mod_win3 
sc_mod_win4 

enum sc_monitor
 

Enumerator:
sc_mon_other 
sc_mon_crt 
sc_mon_lcd 

enum sc_mouse
 

Enumerator:
sc_mou_ps2 
sc_mou_ser 
sc_mou_bus 
sc_mou_usb 
sc_mou_sun 
sc_mou_other 

enum sc_multimedia
 

Enumerator:
sc_multi_video 
sc_multi_audio 
sc_multi_other 

enum sc_net_if
 

Enumerator:
sc_nif_loopback 
sc_nif_ethernet 
sc_nif_tokenring 
sc_nif_fddi 
sc_nif_ctc 
sc_nif_iucv 
sc_nif_hsi 
sc_nif_qeth 
sc_nif_escon 
sc_nif_myrinet 
sc_nif_wlan 
sc_nif_xp 
sc_nif_usb 
sc_nif_other 
sc_nif_sit 

enum sc_serial
 

Enumerator:
sc_ser_fire 
sc_ser_access 
sc_ser_ssa 
sc_ser_usb 
sc_ser_fiber 
sc_ser_smbus 
sc_ser_other 

enum sc_std
 

Enumerator:
sc_sdev_disk 
sc_sdev_tape 
sc_sdev_cdrom 
sc_sdev_floppy 
sc_sdev_scanner 
sc_sdev_other 

enum sc_storage
 

Enumerator:
sc_sto_scsi 
sc_sto_ide 
sc_sto_floppy 
sc_sto_ipi 
sc_sto_raid 
sc_sto_other 

enum sc_system
 

Enumerator:
sc_sys_pic 
sc_sys_dma 
sc_sys_timer 
sc_sys_rtc 
sc_sys_other 

enum size_units
 

Enumerator:
size_unit_cm 
size_unit_cinch 
size_unit_byte 
size_unit_sectors 
size_unit_kbyte 
size_unit_mbyte 
size_unit_gbyte 
size_unit_mm 

enum yes_no_flag
 

Enumerator:
flag_unknown 
flag_no 
flag_yes 


Function Documentation

str_list_t* get_hddb_packages hd_data_t hd_data  ) 
 

hd_t* hd_base_class_list hd_data_t hd_data,
unsigned  base_class
 

enum boot_arch hd_boot_arch hd_data_t hd_data  ) 
 

unsigned hd_boot_disk hd_data_t hd_data,
int *  matches
 

hd_t* hd_bus_list hd_data_t hd_data,
unsigned  bus
 

const char* hd_busid_to_hwcfg int  busid  ) 
 

cdb_isdn_card* hd_cdbisdn_get_card int   ) 
 

cdb_isdn_card* hd_cdbisdn_get_card_from_id int  ,
int  ,
int  ,
int 
 

cdb_isdn_card* hd_cdbisdn_get_card_from_type int  ,
int 
 

char* hd_cdbisdn_get_db_date void   ) 
 

int hd_cdbisdn_get_db_version void   ) 
 

cdb_isdn_vario* hd_cdbisdn_get_vario int   ) 
 

cdb_isdn_vario* hd_cdbisdn_get_vario_from_type int  ,
int 
 

cdb_isdn_vendor* hd_cdbisdn_get_vendor int   ) 
 

int hd_cdbisdn_get_version void   ) 
 

int hd_change_config_status hd_data_t hd_data,
const char *  id,
hd_status_t  status,
const char *  config_string
 

int hd_change_status const char *  id,
hd_status_t  status,
const char *  config_string
 

void hd_clear_probe_feature hd_data_t hd_data,
enum probe_feature  feature
 

int hd_color hd_data_t hd_data  ) 
 

enum cpu_arch hd_cpu_arch hd_data_t hd_data  ) 
 

unsigned hd_display_adapter hd_data_t hd_data  ) 
 

void hd_dump_entry hd_data_t hd_data,
hd_t hd,
FILE *  f
 

hal_prop_t* hd_free_hal_properties hal_prop_t prop  ) 
 

hd_data_t* hd_free_hd_data hd_data_t hd_data  ) 
 

Free all data.

hd_t* hd_free_hd_list hd_t hd  ) 
 

Free hardware items returned by e.g. hd_list().

Note:
This may not free it.

hd_manual_t* hd_free_manual hd_manual_t manual  ) 
 

hd_t* hd_get_device_by_idx hd_data_t hd_data,
unsigned  idx
 

int hd_has_pcmcia hd_data_t hd_data  ) 
 

char* hd_hw_item_name hd_hw_item_t  item  ) 
 

hd_hw_item_t hd_hw_item_type char *  name  ) 
 

int hd_is_hw_class hd_t hd,
hd_hw_item_t  hw_class
 

int hd_is_sgi_altix hd_data_t hd_data  ) 
 

int hd_is_uml hd_data_t hd_data  ) 
 

hd_t* hd_list hd_data_t hd_data,
hd_hw_item_t  item,
int  rescan,
hd_t hd_old
 

hd_t* hd_list2 hd_data_t hd_data,
hd_hw_item_t items,
int  rescan
 

hd_t* hd_list_with_status hd_data_t hd_data,
hd_hw_item_t  item,
hd_status_t  status
 

hd_t* hd_list_with_status2 hd_data_t hd_data,
hd_hw_item_t items,
hd_status_t  status
 

int hd_mac_color hd_data_t hd_data  ) 
 

hd_manual_t* hd_manual_read_entry hd_data_t hd_data,
const char *  id
 

int hd_manual_write_entry hd_data_t hd_data,
hd_manual_t entry
 

int hd_module_is_active hd_data_t hd_data,
char *  mod
 

int hd_probe_feature hd_data_t hd_data,
enum probe_feature  feature
 

enum probe_feature hd_probe_feature_by_name char *  name  ) 
 

char* hd_probe_feature_by_value enum probe_feature  feature  ) 
 

cdrom_info_t* hd_read_cdrom_info hd_data_t hd_data,
hd_t hd
 

hd_t* hd_read_config hd_data_t hd_data,
const char *  id
 

int hd_read_mmap hd_data_t hd_data,
char *  name,
unsigned char *  buf,
off_t  start,
unsigned  size
 

hal_prop_t* hd_read_properties const char *  udi  ) 
 

void hd_scan hd_data_t hd_data  ) 
 

void hd_set_hw_class hd_t hd,
hd_hw_item_t  hw_class
 

void hd_set_probe_feature hd_data_t hd_data,
enum probe_feature  feature
 

void hd_set_probe_feature_hw hd_data_t hd_data,
hd_hw_item_t  item
 

int hd_smp_support hd_data_t hd_data  ) 
 

char* hd_status_value_name hd_status_value_t  status  ) 
 

hd_t* hd_sub_class_list hd_data_t hd_data,
unsigned  base_class,
unsigned  sub_class
 

int hd_usb_support hd_data_t hd_data  ) 
 

char* hd_version void   ) 
 

int hd_write_config hd_data_t hd_data,
hd_t hd
 

int hd_write_properties const char *  udi,
hal_prop_t prop
 

void hddb_add_info hd_data_t hd_data,
hd_t hd
 

void hddb_dump hddb2_data_t hddb,
FILE *  f
 

void hddb_dump_raw hddb2_data_t hddb,
FILE *  f