/[soft]/ldetect/trunk/libldetect.h
ViewVC logotype

Contents of /ldetect/trunk/libldetect.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1357 - (show annotations) (download)
Tue May 17 09:21:22 2011 UTC (12 years, 11 months ago) by dmorgan
File MIME type: text/plain
File size: 3178 byte(s)
Import  ldetect
1 #pragma GCC visibility push(default)
2 #ifndef LIBLDETECT
3 #define LIBLDETECT
4
5 #include <stdint.h>
6
7 /******************************************************************************/
8 /* pciusb *********************************************************************/
9 /******************************************************************************/
10 struct pciusb_entry {
11 uint16_t vendor; /* PCI vendor id */
12 uint16_t device; /* PCI device id */
13
14 uint16_t subvendor; /* 0xffff if not probe_type'd or no subid */
15 uint16_t subdevice; /* 0xffff if not probe_type'd or no subid */
16 unsigned long class_id; /* 0 if not probe_type'd ; big because of USB backend */
17
18 uint16_t pci_domain; /* PCI domain id (16 bits wide in libpci) */
19 uint8_t pci_bus; /* PCI bus id 8 bits wide */
20 uint8_t pci_device; /* PCI device id 5 bits wide */
21 uint8_t pci_function; /* PCI function id 3 bits wide */
22 uint8_t pci_revision; /* PCI revision 8 bits wide */
23
24 unsigned short usb_port; /* USB port */
25 uint8_t is_pciexpress:1; /* is it PCI express */
26 uint8_t already_found:1;
27
28 char *module;
29 char *text;
30 char* class;
31 };
32 struct pciusb_entries {
33 struct pciusb_entry *entries;
34 unsigned int nb;
35 };
36
37 extern void pciusb_free(struct pciusb_entries *entries);
38
39
40 /******************************************************************************/
41 /* pci ************************************************************************/
42 /******************************************************************************/
43 extern struct pciusb_entries pci_probe(void);
44 extern const char *pci_class2text(unsigned long class_id);
45 extern char *proc_pci_path;
46
47 /******************************************************************************/
48 /* usb ************************************************************************/
49 /******************************************************************************/
50 extern struct pciusb_entries usb_probe(void);
51
52 struct usb_class_text {
53 const char *usb_class_text;
54 const char *usb_sub_text;
55 const char *usb_prot_text;
56 };
57
58 extern struct usb_class_text usb_class2text(unsigned long class_id);
59
60 extern char *proc_usb_path;
61
62 /******************************************************************************/
63 /* dmi ************************************************************************/
64 /******************************************************************************/
65 struct dmi_entry {
66 char *constraints;
67 char *module;
68 };
69 struct dmi_entries {
70 struct dmi_entry *entries;
71 unsigned int nb;
72 };
73
74 extern struct dmi_entries dmi_probe(void);
75 extern void dmi_entries_free(struct dmi_entries entries);
76 extern char *dmidecode_file;
77
78 /******************************************************************************/
79 /* hid ************************************************************************/
80 /******************************************************************************/
81 struct hid_entry {
82 char *module;
83 char *text;
84 };
85 struct hid_entries {
86 struct hid_entry *entries;
87 unsigned int nb;
88 };
89
90 extern struct hid_entries hid_probe(void);
91 extern void hid_entries_free(struct hid_entries *entries);
92 extern const char *sysfs_hid_path;
93
94 #endif
95 #pragma GCC visibility pop

Properties

Name Value
svn:eol-style native

  ViewVC Help
Powered by ViewVC 1.1.30