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

Contents of /ldetect/trunk/libldetect.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2043 - (show annotations) (download)
Tue Oct 18 17:27:32 2011 UTC (12 years, 6 months ago) by tv
File MIME type: text/plain
File size: 3242 byte(s)
(get_pci_description) introduce new API for drakx's stage1 in order to find unknown PCI devices
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 extern char *get_pci_description(int vendor_id, int device_id);
47
48 /******************************************************************************/
49 /* usb ************************************************************************/
50 /******************************************************************************/
51 extern struct pciusb_entries usb_probe(void);
52
53 struct usb_class_text {
54 const char *usb_class_text;
55 const char *usb_sub_text;
56 const char *usb_prot_text;
57 };
58
59 extern struct usb_class_text usb_class2text(unsigned long class_id);
60
61 extern char *proc_usb_path;
62
63 /******************************************************************************/
64 /* dmi ************************************************************************/
65 /******************************************************************************/
66 struct dmi_entry {
67 char *constraints;
68 char *module;
69 };
70 struct dmi_entries {
71 struct dmi_entry *entries;
72 unsigned int nb;
73 };
74
75 extern struct dmi_entries dmi_probe(void);
76 extern void dmi_entries_free(struct dmi_entries entries);
77 extern char *dmidecode_file;
78
79 /******************************************************************************/
80 /* hid ************************************************************************/
81 /******************************************************************************/
82 struct hid_entry {
83 char *module;
84 char *text;
85 };
86 struct hid_entries {
87 struct hid_entry *entries;
88 unsigned int nb;
89 };
90
91 extern struct hid_entries hid_probe(void);
92 extern void hid_entries_free(struct hid_entries *entries);
93 extern const char *sysfs_hid_path;
94
95 #endif
96 #pragma GCC visibility pop

Properties

Name Value
svn:eol-style native

  ViewVC Help
Powered by ViewVC 1.1.30