summaryrefslogtreecommitdiffstats
path: root/libldetect.h
blob: 2e985e3d6f21d3d5c50e0e036b5d36f1f760c56c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/******************************************************************************/
/* pciusb *********************************************************************/
/******************************************************************************/
struct pciusb_entry {
  unsigned short vendor; /* PCI vendor id */
  unsigned short device;

  unsigned short subvendor; /* 0xffff if not probe_type'd or no subid */
  unsigned short subdevice; /* 0xffff if not probe_type'd or no subid */
  unsigned long class_; /* 0 if not probe_type'd */

  unsigned short pci_bus; /* pci bus id 8 bits wide */
  unsigned short pci_device; /* pci device id 5 bits wide */
  unsigned short pci_function; /* pci function id 3 bits wide */

  char *module;
  char *text;
};
struct pciusb_entries {
  struct pciusb_entry *entries;
  unsigned int nb;
};

extern void pciusb_free(struct pciusb_entries *entries);


/******************************************************************************/
/* pci ************************************************************************/
/******************************************************************************/
extern struct pciusb_entries pci_probe(int probe_type); /* probe_type is boolean */
extern const char *pci_class2text(unsigned long class_);

/******************************************************************************/
/* usb ************************************************************************/
/******************************************************************************/
extern struct pciusb_entries usb_probe(void);
extern const char *usb_class2text(unsigned long class_);